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;
};
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)
nw = bw;
nh = bh;
- switch (wd->option)
+ switch (wd->option)
{
case ELM_BG_OPTION_CENTER:
fw = nw = iw;
_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;
*
* @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;
*
* @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;
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;
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);
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);
+ } */
}
/**
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);
+ } */
}
/**
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;
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);
}
* 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;
-
- 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_change_del(void *data, Evas_Object *obj, void *event_info)
- {
-// called from toplevel when the focused window shanges
+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);
+}
+
+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
_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
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);
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;
}
#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;
typedef struct _Widget_Data Widget_Data;
-struct _Widget_Data {
+struct _Widget_Data
+{
Evas_Object *self;
Evas_Object *base;
Eina_List *items;
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
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);
*/
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);
}
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
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;
};
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;
}
/*
- 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)
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);
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
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;
-
- 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_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);
}
evas_object_smart_callback_call(sd->smart_obj, "changed", NULL);
}
_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;
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;
}
}
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);
}
{
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);
}
}
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)