_del_hook(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
if (wd->prop_hdl) ecore_event_handler_del(wd->prop_hdl);
free(wd);
}
_theme_hook(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
-
+ if (!wd) return;
_elm_theme_set(wd->base, "conformant", "base", elm_widget_style_get(obj));
if (wd->content)
edje_object_part_swallow(wd->base, "elm.swallow.content", wd->content);
{
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord mw = -1, mh = -1;
-
+ if (!wd) return;
edje_object_size_min_calc(wd->base, &mw, &mh);
evas_object_size_hint_min_set(obj, mw, mh);
evas_object_size_hint_max_set(obj, -1, -1);
_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Widget_Data *wd = elm_widget_data_get(data);
+ if (!wd) return;
_sizing_eval(data);
}
{
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Object *sub = event_info;
-
+ if (!wd) return;
if (sub == wd->content)
{
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
#ifdef HAVE_ELEMENTARY_X
Ecore_X_Event_Window_Property *ev;
Widget_Data *wd = elm_widget_data_get(data);
-
+ if (!wd) return 1;
ev = event;
-
if (ev->atom == ECORE_X_ATOM_E_ILLUME_ZONE)
{
Ecore_X_Window zone;
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
-
+ if (!wd) return;
if ((wd->content != content) && (wd->content))
elm_widget_sub_object_del(obj, wd->content);
wd->content = content;
_del_hook(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
if (wd->animator) ecore_animator_del(wd->animator);
free(wd);
}
_theme_hook(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
_sizing_eval(obj);
}
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord minw = -1, minh = -1, minw2 = -1, minh2 = -1;
Evas_Coord maxw = -1, maxh = -1, maxw2 = -1, maxh2 = -1;
-
+ if (!wd) return;
if (wd->front.content)
evas_object_size_hint_min_get(wd->front.content, &minw, &minh);
if (wd->back.content)
_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Widget_Data *wd = elm_widget_data_get(data);
+ if (!wd) return;
_sizing_eval(data);
}
{
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Object *sub = event_info;
-
+ if (!wd) return;
if (sub == wd->front.content)
{
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
Evas_Coord x, y, w, h;
double p, deg;
Evas_Map *mf, *mb;
- Evas_Coord cx, cy, cz, px, py, foc;
+ Evas_Coord cx, cy, px, py, foc;
int lx, ly, lz, lr, lg, lb, lar, lag, lab;
if (!wd->animator) return 0;
t = t / wd->len;
if (t > 1.0) t = 1.0;
+ if (!wd) return 0;
evas_object_geometry_get(obj, &x, &y, &w, &h);
-
mf = evas_map_new(4);
evas_map_smooth_set(mf, 0);
{
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord x, y, w, h;
+ if (!wd) return;
evas_object_geometry_get(obj, &x, &y, &w, &h);
if (wd->front.content)
{
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
-
+ if (!wd) return;
if (wd->front.content == content) return;
if ((wd->front.content != content) && (wd->front.content))
{
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
-
+ if (!wd) return;
if (wd->back.content == content) return;
if ((wd->back.content != content) && (wd->back.content))
{
EAPI Eina_Bool
elm_flip_front_get(Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
+ ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
return wd->state;
}
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
}
EAPI void
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
if (!wd->animator) wd->animator = ecore_animator_add(_animate, obj);
wd->mode = mode;
wd->start = ecore_loop_time_get();
#include <Elementary.h>
#include "elm_priv.h"
-#if 1 // working on it
-
/**
* @defgroup Mapbuf Mapbuf
*
static void
_del_hook(Evas_Object *obj)
{
-
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
free(wd);
}
static void
_theme_hook(Evas_Object *obj)
{
-
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
_sizing_eval(obj);
}
static void
_sizing_eval(Evas_Object *obj)
{
-
Widget_Data *wd = elm_widget_data_get(obj);
- Evas_Coord minw = -1, minh = -1, minw2 = -1, minh2 = -1;
- Evas_Coord maxw = -1, maxh = -1, maxw2 = -1, maxh2 = -1;
-
+ Evas_Coord minw = -1, minh = -1;
+ Evas_Coord maxw = -1, maxh = -1;
+ if (!wd) return;
if (wd->content)
{
evas_object_size_hint_min_get(wd->content, &minw, &minh);
evas_object_size_hint_max_get(wd->content, &maxw, &maxh);
}
-
evas_object_size_hint_min_set(obj, minw, minh);
evas_object_size_hint_max_set(obj, maxw, maxh);
}
static void
_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
-
Widget_Data *wd = elm_widget_data_get(data);
+ if (!wd) return;
_sizing_eval(data);
}
static void
_sub_del(void *data, Evas_Object *obj, void *event_info)
{
-
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Object *sub = event_info;
-
+ if (!wd) return;
if (sub == wd->content)
{
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
static void
_mapbuf(Evas_Object *obj)
{
-
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord x, y, w, h;
-
+ if (!wd) return;
evas_object_geometry_get(obj, &x, &y, &w, &h);
if (wd->enabled)
{
Evas_Map *m;
- Evas_Coord cx, cy, cz, px, py, foc;
m = evas_map_new(4);
evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
static void
_configure(Evas_Object *obj)
{
-
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
if (wd->content)
{
Evas_Coord x, y, w, h;
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
-
+ if (!wd) return;
if (wd->content == content) return;
if ((wd->content != content) && (wd->content))
{
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
if (wd->enabled == enabled) return;
wd->enabled = enabled;
_configure(obj);
EAPI Eina_Bool
elm_mapbuf_enabled_get(const Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
+ ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
return wd->enabled;
}
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
if (wd->smooth == smooth) return;
wd->smooth = smooth;
_configure(obj);
EAPI Eina_Bool
elm_mapbuf_smooth_get(const Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
+ ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
return wd->smooth;
}
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
if (wd->alpha == alpha) return;
wd->alpha = alpha;
_configure(obj);
EAPI Eina_Bool
elm_mapbuf_alpha_get(const Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
+ ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
return wd->alpha;
}
-
-#endif
static void
_del_hook(Evas_Object *obj)
{
-
Widget_Data *wd = elm_widget_data_get(obj);
-
+ if (!wd) return;
free(wd);
}
static void
_theme_hook(Evas_Object *obj)
{
-
Widget_Data *wd = elm_widget_data_get(obj);
int scale = 0;
-
+ if (!wd) return;
scale = (elm_widget_scale_get(obj) * _elm_config->scale);
edje_object_scale_set(wd->scr, scale);
_sizing_eval(obj);
static void
_sizing_eval(Evas_Object *obj)
{
-
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord mw = -1, mh = -1;
Evas_Coord vw = 0, vh = 0;
Evas_Coord w, h;
-
+ if (!wd) return;
evas_object_smart_calculate(wd->bx);
edje_object_size_min_calc(elm_smart_scroller_edje_object_get(wd->scr),
&mw, &mh);
static void
_resize(void *data, Evas *evas, Evas_Object *obj, void *event)
{
-
Widget_Data *wd = elm_widget_data_get(data);
Evas_Coord mw, mh, vw, vh, w, h;
-
+ if (!wd) return;
elm_smart_scroller_child_viewport_size_get(wd->scr, &vw, &vh);
evas_object_size_hint_min_get(wd->bx, &mw, &mh);
evas_object_geometry_get(wd->bx, NULL, NULL, &w, &h);
_layout(Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
{
Widget_Data *wd = data;
-
+ if (!wd) return;
_els_box_layout(o, priv, EINA_TRUE, EINA_FALSE);
}
static void
_toggle_panel(void *data, Evas_Object *obj, const char *emission, const char *source)
{
-
Widget_Data *wd = elm_widget_data_get(data);
-
+ if (!wd) return;
if (wd->hidden)
{
edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr),
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
-
+ if (!wd) return;
wd->orient = orient;
switch (orient)
{
- case ELM_PANEL_ORIENT_TOP:
- case ELM_PANEL_ORIENT_BOTTOM:
+ case ELM_PANEL_ORIENT_TOP:
+ case ELM_PANEL_ORIENT_BOTTOM:
break;
- case ELM_PANEL_ORIENT_LEFT:
+ case ELM_PANEL_ORIENT_LEFT:
elm_smart_scroller_theme_set(wd->scr, "panel", "base", "left");
- case ELM_PANEL_ORIENT_RIGHT:
+ case ELM_PANEL_ORIENT_RIGHT:
break;
- default:
+ default:
break;
}
_sizing_eval(obj);
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
-
+ if (!wd) return;
evas_object_box_remove_all(wd->bx, EINA_TRUE);
if (!content) return;
evas_object_box_append(wd->bx, content);
static void
_del_hook(Evas_Object *obj)
{
-
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
free(wd);
}
static void
_theme_hook(Evas_Object *obj)
{
-
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
if (wd->horizontal)
_elm_theme_set(wd->sep, "separator", "horizontal", elm_widget_style_get(obj));
else
static void
_sizing_eval(Evas_Object *obj)
{
-
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
-
+ if (!wd) return;
edje_object_size_min_calc(wd->sep, &minw, &minh);
evas_object_size_hint_min_set(obj, minw, minh);
evas_object_size_hint_max_set(obj, maxw, maxh);
EAPI Eina_Bool
elm_separator_horizontal_get(Evas_Object *obj)
{
- ELM_CHECK_WIDTYPE(obj, widtype);
+ ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return wd->horizontal;