forked from enlightenment/efl
elementary / entry, list, scroller, fileselector_button, config, photocam, map, pan, bg, store, priv, pager, conform, box, clock, flipselector
fixed indentation, removed white spaces. SVN revision: 58267
This commit is contained in:
parent
de0b570b30
commit
5176a3f867
|
@ -18,12 +18,12 @@ struct _Widget_Data
|
|||
const char *window_title;
|
||||
Evas_Coord w, h;
|
||||
struct
|
||||
{
|
||||
const char *path;
|
||||
Eina_Bool expandable : 1;
|
||||
Eina_Bool folder_only : 1;
|
||||
Eina_Bool is_save : 1;
|
||||
} fsd;
|
||||
{
|
||||
const char *path;
|
||||
Eina_Bool expandable : 1;
|
||||
Eina_Bool folder_only : 1;
|
||||
Eina_Bool is_save : 1;
|
||||
} fsd;
|
||||
Eina_Bool inwin_mode : 1;
|
||||
};
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ _theme_hook(Evas_Object *obj)
|
|||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
Evas_Coord w, h;
|
||||
|
||||
_elm_theme_object_set(obj, wd->base, "bg", "base",
|
||||
_elm_theme_object_set(obj, wd->base, "bg", "base",
|
||||
elm_widget_style_get(obj));
|
||||
|
||||
if (wd->rect)
|
||||
|
@ -80,7 +80,7 @@ _custom_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void
|
|||
nw = bw;
|
||||
nh = bh;
|
||||
|
||||
switch (wd->option)
|
||||
switch (wd->option)
|
||||
{
|
||||
case ELM_BG_OPTION_CENTER:
|
||||
fw = nw = iw;
|
||||
|
@ -149,7 +149,7 @@ elm_bg_add(Evas_Object *parent)
|
|||
_elm_theme_object_set(obj, wd->base, "bg", "base", "default");
|
||||
elm_widget_resize_object_set(obj, wd->base);
|
||||
|
||||
evas_object_event_callback_add(wd->base, EVAS_CALLBACK_RESIZE,
|
||||
evas_object_event_callback_add(wd->base, EVAS_CALLBACK_RESIZE,
|
||||
_custom_resize, wd);
|
||||
|
||||
wd->option = ELM_BG_OPTION_SCALE;
|
||||
|
@ -241,8 +241,8 @@ elm_bg_file_get(const Evas_Object *obj, const char **file, const char **group)
|
|||
*
|
||||
* @ingroup Bg
|
||||
*/
|
||||
EAPI void
|
||||
elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option)
|
||||
EAPI void
|
||||
elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||
Widget_Data *wd;
|
||||
|
@ -282,8 +282,8 @@ elm_bg_option_get(const Evas_Object *obj)
|
|||
*
|
||||
* @ingroup Bg
|
||||
*/
|
||||
EAPI void
|
||||
elm_bg_color_set(Evas_Object *obj, int r, int g, int b)
|
||||
EAPI void
|
||||
elm_bg_color_set(Evas_Object *obj, int r, int g, int b)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||
Widget_Data *wd;
|
||||
|
|
|
@ -225,7 +225,7 @@ _transition_layout_calculate_coords(Evas_Object *obj, Evas_Object_Box_Data *priv
|
|||
Evas_Coord x, y, w, h;
|
||||
const double curtime = ecore_loop_time_get();
|
||||
|
||||
layout_data->duration =
|
||||
layout_data->duration =
|
||||
layout_data->duration - (curtime - layout_data->initial_time);
|
||||
layout_data->initial_time = curtime;
|
||||
|
||||
|
@ -286,11 +286,11 @@ _transition_layout_animation_start(Evas_Object *obj, Evas_Object_Box_Data *priv,
|
|||
return EINA_FALSE;
|
||||
_transition_layout_calculate_coords(obj, priv, layout_data);
|
||||
|
||||
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE,
|
||||
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE,
|
||||
_transition_layout_obj_resize_cb, layout_data);
|
||||
evas_object_smart_callback_add(obj, SIG_CHILD_ADDED,
|
||||
evas_object_smart_callback_add(obj, SIG_CHILD_ADDED,
|
||||
_transition_layout_child_added, layout_data);
|
||||
evas_object_smart_callback_add(obj, SIG_CHILD_REMOVED,
|
||||
evas_object_smart_callback_add(obj, SIG_CHILD_REMOVED,
|
||||
_transition_layout_child_removed, layout_data);
|
||||
if (!layout_data->animator)
|
||||
layout_data->animator = ecore_animator_add(transition_animation_cb, obj);
|
||||
|
@ -398,24 +398,24 @@ elm_box_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
|
|||
if (!wd) return;
|
||||
wd->horizontal = !!horizontal;
|
||||
evas_object_smart_calculate(wd->box);
|
||||
/*if (wd->horizontal)
|
||||
/*if (wd->horizontal)
|
||||
{
|
||||
if (wd->homogeneous)
|
||||
evas_object_box_layout_set(wd->box,
|
||||
evas_object_box_layout_homogeneous_horizontal, NULL, NULL);
|
||||
else
|
||||
evas_object_box_layout_set(wd->box, evas_object_box_layout_horizontal,
|
||||
NULL, NULL);
|
||||
if (wd->homogeneous)
|
||||
evas_object_box_layout_set(wd->box,
|
||||
evas_object_box_layout_homogeneous_horizontal, NULL, NULL);
|
||||
else
|
||||
evas_object_box_layout_set(wd->box, evas_object_box_layout_horizontal,
|
||||
NULL, NULL);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if (wd->homogeneous)
|
||||
evas_object_box_layout_set(wd->box,
|
||||
evas_object_box_layout_homogeneous_vertical, NULL, NULL);
|
||||
else
|
||||
evas_object_box_layout_set(wd->box, evas_object_box_layout_horizontal,
|
||||
NULL, NULL);
|
||||
}*/
|
||||
if (wd->homogeneous)
|
||||
evas_object_box_layout_set(wd->box,
|
||||
evas_object_box_layout_homogeneous_vertical, NULL, NULL);
|
||||
else
|
||||
evas_object_box_layout_set(wd->box, evas_object_box_layout_horizontal,
|
||||
NULL, NULL);
|
||||
} */
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -454,24 +454,24 @@ elm_box_homogenous_set(Evas_Object *obj, Eina_Bool homogenous)
|
|||
if (!wd) return;
|
||||
wd->homogeneous = !!homogenous;
|
||||
evas_object_smart_calculate(wd->box);
|
||||
/*if (wd->horizontal)
|
||||
/*if (wd->horizontal)
|
||||
{
|
||||
if (wd->homogeneous)
|
||||
evas_object_box_layout_set(wd->box,
|
||||
evas_object_box_layout_homogeneous_horizontal, NULL, NULL);
|
||||
else
|
||||
evas_object_box_layout_set(wd->box, evas_object_box_layout_horizontal,
|
||||
NULL, NULL);
|
||||
if (wd->homogeneous)
|
||||
evas_object_box_layout_set(wd->box,
|
||||
evas_object_box_layout_homogeneous_horizontal, NULL, NULL);
|
||||
else
|
||||
evas_object_box_layout_set(wd->box, evas_object_box_layout_horizontal,
|
||||
NULL, NULL);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if (wd->homogeneous)
|
||||
evas_object_box_layout_set(wd->box,
|
||||
evas_object_box_layout_homogeneous_vertical, NULL, NULL);
|
||||
else
|
||||
evas_object_box_layout_set(wd->box, evas_object_box_layout_horizontal,
|
||||
NULL, NULL);
|
||||
}*/
|
||||
if (wd->homogeneous)
|
||||
evas_object_box_layout_set(wd->box,
|
||||
evas_object_box_layout_homogeneous_vertical, NULL, NULL);
|
||||
else
|
||||
evas_object_box_layout_set(wd->box, evas_object_box_layout_horizontal,
|
||||
NULL, NULL);
|
||||
} */
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,14 +25,14 @@ struct _Widget_Data
|
|||
Evas_Object *sel_obj;
|
||||
Ecore_Timer *ticker, *spin;
|
||||
struct
|
||||
{
|
||||
int hrs, min, sec;
|
||||
char ampm;
|
||||
Eina_Bool seconds : 1;
|
||||
Eina_Bool am_pm : 1;
|
||||
Eina_Bool edit : 1;
|
||||
Elm_Clock_Digedit digedit;
|
||||
} cur;
|
||||
{
|
||||
int hrs, min, sec;
|
||||
char ampm;
|
||||
Eina_Bool seconds : 1;
|
||||
Eina_Bool am_pm : 1;
|
||||
Eina_Bool edit : 1;
|
||||
Elm_Clock_Digedit digedit;
|
||||
} cur;
|
||||
};
|
||||
|
||||
static const char *widtype = NULL;
|
||||
|
|
|
@ -1573,10 +1573,10 @@ _env_get(void)
|
|||
if (s) _elm_config->longpress_timeout = atof(s);
|
||||
if (_elm_config->longpress_timeout < 0.0)
|
||||
_elm_config->longpress_timeout = 0.0;
|
||||
|
||||
|
||||
s = getenv("ELM_EFFECT_ENABLE");
|
||||
if (s) _elm_config->effect_enable = !!atoi(s);
|
||||
|
||||
|
||||
s = getenv("ELM_DESKTOP_ENTRY");
|
||||
if (s) _elm_config->desktop_entry = !!atoi(s);
|
||||
}
|
||||
|
|
|
@ -102,32 +102,32 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
|
|||
* visible when the vkbd comes and goes by moving the conformant obj (and thus
|
||||
* its children) to show the focused widget (and if focus changes follow)
|
||||
|
||||
static Evas_Object *
|
||||
_focus_object_get(const Evas_Object *obj)
|
||||
{
|
||||
Evas_Object *win, *foc;
|
||||
static Evas_Object *
|
||||
_focus_object_get(const Evas_Object *obj)
|
||||
{
|
||||
Evas_Object *win, *foc;
|
||||
|
||||
win = elm_widget_top_get(obj);
|
||||
if (!win) return NULL;
|
||||
foc = elm_widget_top_get(win);
|
||||
}
|
||||
win = elm_widget_top_get(obj);
|
||||
if (!win) return NULL;
|
||||
foc = elm_widget_top_get(win);
|
||||
}
|
||||
|
||||
static void
|
||||
_focus_object_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
|
||||
{
|
||||
evas_object_geometry_get(obj, x, y, w, h);
|
||||
}
|
||||
static void
|
||||
_focus_object_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
|
||||
{
|
||||
evas_object_geometry_get(obj, x, y, w, h);
|
||||
}
|
||||
|
||||
static void
|
||||
_focus_change_del(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
// called from toplevel when the focused window shanges
|
||||
static void
|
||||
_focus_change_del(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
// called from toplevel when the focused window shanges
|
||||
}
|
||||
|
||||
static void
|
||||
_autoscroll_move(Evas_Object *obj)
|
||||
{
|
||||
// move conformant edje by delta to show focused widget
|
||||
// move conformant edje by delta to show focused widget
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -683,7 +683,7 @@ _hoversel_position(Evas_Object *obj)
|
|||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
Evas_Coord cx, cy, cw, ch, x, y, mw, mh;
|
||||
if (!wd) return;
|
||||
|
||||
|
||||
cx = cy = 0;
|
||||
cw = ch = 1;
|
||||
evas_object_geometry_get(wd->ent, &x, &y, NULL, NULL);
|
||||
|
@ -1434,17 +1434,17 @@ _event_selection_notify(void *data, int type __UNUSED__, void *event)
|
|||
static Eina_Bool
|
||||
_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 ECORE_CALLBACK_PASS_ON;
|
||||
if (!wd->have_selection) return ECORE_CALLBACK_PASS_ON;
|
||||
if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
|
||||
(ev->selection == ECORE_X_SELECTION_PRIMARY))
|
||||
{
|
||||
elm_entry_select_none(data);
|
||||
}
|
||||
return 1;*/
|
||||
/*
|
||||
Widget_Data *wd = elm_widget_data_get(data);
|
||||
Ecore_X_Event_Selection_Clear *ev = event;
|
||||
if (!wd) return ECORE_CALLBACK_PASS_ON;
|
||||
if (!wd->have_selection) return ECORE_CALLBACK_PASS_ON;
|
||||
if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
|
||||
(ev->selection == ECORE_X_SELECTION_PRIMARY))
|
||||
{
|
||||
elm_entry_select_none(data);
|
||||
}
|
||||
return 1; */
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
|
||||
#define DATA_GET eina_list_data_get
|
||||
|
||||
struct _Elm_Flipselector_Item {
|
||||
struct _Elm_Flipselector_Item
|
||||
{
|
||||
Elm_Widget_Item base;
|
||||
const char *label;
|
||||
Evas_Smart_Cb func;
|
||||
|
@ -42,7 +43,8 @@ struct _Elm_Flipselector_Item {
|
|||
|
||||
typedef struct _Widget_Data Widget_Data;
|
||||
|
||||
struct _Widget_Data {
|
||||
struct _Widget_Data
|
||||
{
|
||||
Evas_Object *self;
|
||||
Evas_Object *base;
|
||||
Eina_List *items;
|
||||
|
|
|
@ -84,12 +84,12 @@ static Eina_Bool _event_hook(Evas_Object *obj, Evas_Object *src,
|
|||
Evas_Callback_Type type, void *event_info);
|
||||
static Eina_Bool _deselect_all_items(Widget_Data *wd);
|
||||
|
||||
#define ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, ...) \
|
||||
#define ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, ...) \
|
||||
ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, __VA_ARGS__); \
|
||||
if (it->deleted) \
|
||||
{ \
|
||||
ERR("ERROR: "#it" has been DELETED.\n"); \
|
||||
return __VA_ARGS__; \
|
||||
if (it->deleted) \
|
||||
{ \
|
||||
ERR("ERROR: "#it" has been DELETED.\n"); \
|
||||
return __VA_ARGS__; \
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
|
@ -682,8 +682,8 @@ grid_place(Evas_Object *obj, Grid *g, Evas_Coord px, Evas_Coord py, Evas_Coord o
|
|||
evas_object_resize(gi->img, ww, hh);
|
||||
|
||||
/*evas_object_move(gi->txt,
|
||||
xx - px + ax + ox,
|
||||
yy - py + ay + oy);
|
||||
xx - px + ax + ox,
|
||||
yy - py + ay + oy);
|
||||
|
||||
evas_object_resize(gi->txt, ww, hh);
|
||||
*/
|
||||
|
@ -958,14 +958,14 @@ grid_load(Evas_Object *obj, Grid *g)
|
|||
evas_object_pass_events_set(gi->img, EINA_TRUE);
|
||||
evas_object_stack_below(gi->img, wd->sep_maps_markers);
|
||||
|
||||
/*gi->txt = evas_object_text_add(evas_object_evas_get(obj));
|
||||
evas_object_text_font_set(gi->txt, "Vera", 12);
|
||||
evas_object_color_set(gi->txt, 100, 100, 100, 255);
|
||||
evas_object_smart_member_add(gi->txt,
|
||||
wd->pan_smart);
|
||||
elm_widget_sub_object_add(obj, gi->txt);
|
||||
evas_object_pass_events_set(gi->txt, EINA_TRUE);
|
||||
*/
|
||||
/* gi->txt = evas_object_text_add(evas_object_evas_get(obj));
|
||||
evas_object_text_font_set(gi->txt, "Vera", 12);
|
||||
evas_object_color_set(gi->txt, 100, 100, 100, 255);
|
||||
evas_object_smart_member_add(gi->txt,
|
||||
wd->pan_smart);
|
||||
elm_widget_sub_object_add(obj, gi->txt);
|
||||
evas_object_pass_events_set(gi->txt, EINA_TRUE);
|
||||
*/
|
||||
eina_matrixsparse_data_idx_set(g->grid, y, x, gi);
|
||||
}
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ _move(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSE
|
|||
if (!wd) return;
|
||||
evas_object_geometry_get(obj, &x, &y, NULL, NULL);
|
||||
EINA_LIST_FOREACH(wd->stack, l, it)
|
||||
evas_object_move(it->base, x, y);
|
||||
evas_object_move(it->base, x, y);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -68,9 +68,9 @@ struct _Grid_Item
|
|||
Widget_Data *wd;
|
||||
Evas_Object *img;
|
||||
struct
|
||||
{
|
||||
int x, y, w, h;
|
||||
} src, out;
|
||||
{
|
||||
int x, y, w, h;
|
||||
} src, out;
|
||||
Eina_Bool want : 1;
|
||||
Eina_Bool have : 1;
|
||||
};
|
||||
|
@ -104,20 +104,20 @@ struct _Widget_Data
|
|||
Ecore_Animator *zoom_animator;
|
||||
double t_start, t_end;
|
||||
struct
|
||||
{
|
||||
int imw, imh;
|
||||
int w, h;
|
||||
int ow, oh, nw, nh;
|
||||
struct
|
||||
{
|
||||
double x, y;
|
||||
} spos;
|
||||
} size;
|
||||
{
|
||||
int imw, imh;
|
||||
int w, h;
|
||||
int ow, oh, nw, nh;
|
||||
struct
|
||||
{
|
||||
double x, y;
|
||||
} spos;
|
||||
} size;
|
||||
struct
|
||||
{
|
||||
Eina_Bool show : 1;
|
||||
Evas_Coord x, y ,w ,h;
|
||||
} show;
|
||||
{
|
||||
Eina_Bool show : 1;
|
||||
Evas_Coord x, y ,w ,h;
|
||||
} show;
|
||||
int tsize;
|
||||
Evas_Object *img; // low res version of image (scale down == 8)
|
||||
int nosmooth;
|
||||
|
@ -729,16 +729,16 @@ _theme_hook(Evas_Object *obj)
|
|||
}
|
||||
|
||||
/*
|
||||
static void
|
||||
_show_region_hook(void *data, Evas_Object *obj)
|
||||
{
|
||||
static void
|
||||
_show_region_hook(void *data, Evas_Object *obj)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(data);
|
||||
Evas_Coord x, y, w, h;
|
||||
if (!wd) return;
|
||||
elm_widget_show_region_get(obj, &x, &y, &w, &h);
|
||||
elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
|
||||
}
|
||||
*/
|
||||
}
|
||||
*/
|
||||
|
||||
static void
|
||||
_sizing_eval(Evas_Object *obj)
|
||||
|
|
|
@ -158,7 +158,7 @@ const void *_elm_module_symbol_get(Elm_Module *m, const char *name);
|
|||
void _elm_widget_type_clear(void);
|
||||
void _elm_widget_focus_region_show(const Evas_Object *obj);
|
||||
|
||||
void _elm_unneed_ethumb(void);
|
||||
void _elm_unneed_ethumb(void);
|
||||
|
||||
void _elm_rescale(void);
|
||||
void _elm_widget_mirrored_reload(Evas_Object *obj);
|
||||
|
|
|
@ -30,50 +30,50 @@
|
|||
|
||||
struct _Elm_Store
|
||||
{
|
||||
EINA_MAGIC;
|
||||
void (*free)(Elm_Store *store);
|
||||
struct {
|
||||
void (*free)(Elm_Store_Item *item);
|
||||
} item;
|
||||
Evas_Object *genlist;
|
||||
Ecore_Thread *list_th;
|
||||
Eina_Inlist *items;
|
||||
Eina_List *realized;
|
||||
int realized_count;
|
||||
int cache_max;
|
||||
struct {
|
||||
struct {
|
||||
Elm_Store_Item_List_Cb func;
|
||||
void *data;
|
||||
} list;
|
||||
struct {
|
||||
Elm_Store_Item_Fetch_Cb func;
|
||||
void *data;
|
||||
} fetch;
|
||||
struct {
|
||||
Elm_Store_Item_Unfetch_Cb func;
|
||||
void *data;
|
||||
} unfetch;
|
||||
} cb;
|
||||
Eina_Bool sorted : 1;
|
||||
Eina_Bool fetch_thread : 1;
|
||||
EINA_MAGIC;
|
||||
void (*free)(Elm_Store *store);
|
||||
struct {
|
||||
void (*free)(Elm_Store_Item *item);
|
||||
} item;
|
||||
Evas_Object *genlist;
|
||||
Ecore_Thread *list_th;
|
||||
Eina_Inlist *items;
|
||||
Eina_List *realized;
|
||||
int realized_count;
|
||||
int cache_max;
|
||||
struct {
|
||||
struct {
|
||||
Elm_Store_Item_List_Cb func;
|
||||
void *data;
|
||||
} list;
|
||||
struct {
|
||||
Elm_Store_Item_Fetch_Cb func;
|
||||
void *data;
|
||||
} fetch;
|
||||
struct {
|
||||
Elm_Store_Item_Unfetch_Cb func;
|
||||
void *data;
|
||||
} unfetch;
|
||||
} cb;
|
||||
Eina_Bool sorted : 1;
|
||||
Eina_Bool fetch_thread : 1;
|
||||
};
|
||||
|
||||
struct _Elm_Store_Item
|
||||
{
|
||||
EINA_INLIST;
|
||||
EINA_MAGIC;
|
||||
Elm_Store *store;
|
||||
Elm_Genlist_Item *item;
|
||||
Ecore_Thread *fetch_th;
|
||||
Ecore_Job *eval_job;
|
||||
const Elm_Store_Item_Mapping *mapping;
|
||||
void *data;
|
||||
LK(lock);
|
||||
Eina_Bool live : 1;
|
||||
Eina_Bool was_live : 1;
|
||||
Eina_Bool realized : 1;
|
||||
Eina_Bool fetched : 1;
|
||||
EINA_INLIST;
|
||||
EINA_MAGIC;
|
||||
Elm_Store *store;
|
||||
Elm_Genlist_Item *item;
|
||||
Ecore_Thread *fetch_th;
|
||||
Ecore_Job *eval_job;
|
||||
const Elm_Store_Item_Mapping *mapping;
|
||||
void *data;
|
||||
LK(lock);
|
||||
Eina_Bool live : 1;
|
||||
Eina_Bool was_live : 1;
|
||||
Eina_Bool realized : 1;
|
||||
Eina_Bool fetched : 1;
|
||||
};
|
||||
|
||||
struct _Elm_Store_Filesystem
|
||||
|
|
|
@ -48,30 +48,30 @@ _elm_smart_pan_child_set(Evas_Object *obj, Evas_Object *child)
|
|||
if (child == sd->child_obj) return;
|
||||
if (sd->child_obj)
|
||||
{
|
||||
evas_object_clip_unset(sd->child_obj);
|
||||
evas_object_smart_member_del(sd->child_obj);
|
||||
evas_object_clip_unset(sd->child_obj);
|
||||
evas_object_smart_member_del(sd->child_obj);
|
||||
evas_object_event_callback_del_full(sd->child_obj, EVAS_CALLBACK_FREE, _smart_child_del_hook, sd);
|
||||
evas_object_event_callback_del_full(sd->child_obj, EVAS_CALLBACK_RESIZE, _smart_child_resize_hook, sd);
|
||||
sd->child_obj = NULL;
|
||||
evas_object_event_callback_del_full(sd->child_obj, EVAS_CALLBACK_RESIZE, _smart_child_resize_hook, sd);
|
||||
sd->child_obj = NULL;
|
||||
}
|
||||
if (child)
|
||||
{
|
||||
Evas_Coord w, h;
|
||||
int r, g, b, a;
|
||||
Evas_Coord w, h;
|
||||
int r, g, b, a;
|
||||
|
||||
sd->child_obj = child;
|
||||
evas_object_smart_member_add(sd->child_obj, sd->smart_obj);
|
||||
evas_object_geometry_get(sd->child_obj, NULL, NULL, &w, &h);
|
||||
sd->child_w = w;
|
||||
sd->child_h = h;
|
||||
evas_object_event_callback_add(child, EVAS_CALLBACK_FREE, _smart_child_del_hook, sd);
|
||||
evas_object_event_callback_add(child, EVAS_CALLBACK_RESIZE, _smart_child_resize_hook, sd);
|
||||
evas_object_color_get(sd->smart_obj, &r, &g, &b, &a);
|
||||
evas_object_color_set(sd->child_obj, r, g, b, a);
|
||||
evas_object_clip_set(sd->child_obj, evas_object_clip_get(sd->smart_obj));
|
||||
if (evas_object_visible_get(sd->smart_obj)) evas_object_show(sd->child_obj);
|
||||
else evas_object_hide(sd->child_obj);
|
||||
_smart_reconfigure(sd);
|
||||
sd->child_obj = child;
|
||||
evas_object_smart_member_add(sd->child_obj, sd->smart_obj);
|
||||
evas_object_geometry_get(sd->child_obj, NULL, NULL, &w, &h);
|
||||
sd->child_w = w;
|
||||
sd->child_h = h;
|
||||
evas_object_event_callback_add(child, EVAS_CALLBACK_FREE, _smart_child_del_hook, sd);
|
||||
evas_object_event_callback_add(child, EVAS_CALLBACK_RESIZE, _smart_child_resize_hook, sd);
|
||||
evas_object_color_get(sd->smart_obj, &r, &g, &b, &a);
|
||||
evas_object_color_set(sd->child_obj, r, g, b, a);
|
||||
evas_object_clip_set(sd->child_obj, evas_object_clip_get(sd->smart_obj));
|
||||
if (evas_object_visible_get(sd->smart_obj)) evas_object_show(sd->child_obj);
|
||||
else evas_object_hide(sd->child_obj);
|
||||
_smart_reconfigure(sd);
|
||||
}
|
||||
evas_object_smart_callback_call(sd->smart_obj, "changed", NULL);
|
||||
}
|
||||
|
@ -87,10 +87,10 @@ void
|
|||
_elm_smart_pan_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||
{
|
||||
API_ENTRY return;
|
||||
// if (x > (sd->child_w - sd->w)) x = sd->child_w - sd->w;
|
||||
// if (y > (sd->child_h - sd->h)) y = sd->child_h - sd->h;
|
||||
// if (x < 0) x = 0;
|
||||
// if (y < 0) y = 0;
|
||||
// if (x > (sd->child_w - sd->w)) x = sd->child_w - sd->w;
|
||||
// if (y > (sd->child_h - sd->h)) y = sd->child_h - sd->h;
|
||||
// if (x < 0) x = 0;
|
||||
// if (y < 0) y = 0;
|
||||
if ((x == sd->px) && (y == sd->py)) return;
|
||||
sd->px = x;
|
||||
sd->py = y;
|
||||
|
@ -112,13 +112,13 @@ _elm_smart_pan_max_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y)
|
|||
API_ENTRY return;
|
||||
if (x)
|
||||
{
|
||||
if (sd->w < sd->child_w) *x = sd->child_w - sd->w;
|
||||
else *x = 0;
|
||||
if (sd->w < sd->child_w) *x = sd->child_w - sd->w;
|
||||
else *x = 0;
|
||||
}
|
||||
if (y)
|
||||
{
|
||||
if (sd->h < sd->child_h) *y = sd->child_h - sd->h;
|
||||
else *y = 0;
|
||||
if (sd->h < sd->child_h) *y = sd->child_h - sd->h;
|
||||
else *y = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -161,9 +161,9 @@ _smart_child_resize_hook(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
|
|||
evas_object_geometry_get(sd->child_obj, NULL, NULL, &w, &h);
|
||||
if ((w != sd->child_w) || (h != sd->child_h))
|
||||
{
|
||||
sd->child_w = w;
|
||||
sd->child_h = h;
|
||||
_smart_reconfigure(sd);
|
||||
sd->child_w = w;
|
||||
sd->child_h = h;
|
||||
_smart_reconfigure(sd);
|
||||
}
|
||||
evas_object_smart_callback_call(sd->smart_obj, "changed", NULL);
|
||||
}
|
||||
|
@ -263,28 +263,28 @@ _smart_init(void)
|
|||
{
|
||||
if (_smart) return;
|
||||
{
|
||||
static const Evas_Smart_Class sc =
|
||||
{
|
||||
SMART_NAME,
|
||||
EVAS_SMART_CLASS_VERSION,
|
||||
_smart_add,
|
||||
_smart_del,
|
||||
_smart_move,
|
||||
_smart_resize,
|
||||
_smart_show,
|
||||
_smart_hide,
|
||||
_smart_color_set,
|
||||
_smart_clip_set,
|
||||
_smart_clip_unset,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
_smart = evas_smart_class_new(&sc);
|
||||
static const Evas_Smart_Class sc =
|
||||
{
|
||||
SMART_NAME,
|
||||
EVAS_SMART_CLASS_VERSION,
|
||||
_smart_add,
|
||||
_smart_del,
|
||||
_smart_move,
|
||||
_smart_resize,
|
||||
_smart_show,
|
||||
_smart_hide,
|
||||
_smart_color_set,
|
||||
_smart_clip_set,
|
||||
_smart_clip_unset,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
_smart = evas_smart_class_new(&sc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -684,13 +684,13 @@ _smart_bounce_y_animator(void *data)
|
|||
dt = t - sd->down.anim_start3;
|
||||
if (dt >= 0.0)
|
||||
{
|
||||
dt = dt / _elm_config->thumbscroll_bounce_friction;
|
||||
if (dt > 1.0) dt = 1.0;
|
||||
p = 1.0 - ((1.0 - dt) * (1.0 - dt));
|
||||
dt = dt / _elm_config->thumbscroll_bounce_friction;
|
||||
if (dt > 1.0) dt = 1.0;
|
||||
p = 1.0 - ((1.0 - dt) * (1.0 - dt));
|
||||
elm_smart_scroller_child_pos_get(sd->smart_obj, &x, &y);
|
||||
dy = sd->down.b2y - sd->down.by;
|
||||
dy = (dy * p);
|
||||
y = sd->down.by + dy;
|
||||
dy = (dy * p);
|
||||
y = sd->down.by + dy;
|
||||
if (!sd->down.cancelled)
|
||||
elm_smart_scroller_child_pos_set(sd->smart_obj, x, y);
|
||||
if (dt >= 1.0)
|
||||
|
|
Loading…
Reference in New Issue