forked from enlightenment/enlightenment
rename zoomap smart functions to have zoomap in the name for easier debugging
This commit is contained in:
parent
6afda6d9bd
commit
cdca19a0fe
|
@ -16,20 +16,20 @@ struct _E_Smart_Data
|
|||
};
|
||||
|
||||
/* local subsystem functions */
|
||||
static void _e_smart_child_del_hook(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||
static void _e_smart_child_resize_hook(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||
static void _e_zoomap_smart_child_del_hook(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||
static void _e_zoomap_smart_child_resize_hook(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||
|
||||
static void _e_smart_reconfigure(E_Smart_Data *sd);
|
||||
static void _e_smart_add(Evas_Object *obj);
|
||||
static void _e_smart_del(Evas_Object *obj);
|
||||
static void _e_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
|
||||
static void _e_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
|
||||
static void _e_smart_show(Evas_Object *obj);
|
||||
static void _e_smart_hide(Evas_Object *obj);
|
||||
static void _e_smart_color_set(Evas_Object *obj, int r, int g, int b, int a);
|
||||
static void _e_smart_clip_set(Evas_Object *obj, Evas_Object *clip);
|
||||
static void _e_smart_clip_unset(Evas_Object *obj);
|
||||
static void _e_smart_init(void);
|
||||
static void _e_zoomap_smart_reconfigure(E_Smart_Data *sd);
|
||||
static void _e_zoomap_smart_add(Evas_Object *obj);
|
||||
static void _e_zoomap_smart_del(Evas_Object *obj);
|
||||
static void _e_zoomap_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
|
||||
static void _e_zoomap_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
|
||||
static void _e_zoomap_smart_show(Evas_Object *obj);
|
||||
static void _e_zoomap_smart_hide(Evas_Object *obj);
|
||||
static void _e_zoomap_smart_color_set(Evas_Object *obj, int r, int g, int b, int a);
|
||||
static void _e_zoomap_smart_clip_set(Evas_Object *obj, Evas_Object *clip);
|
||||
static void _e_zoomap_smart_clip_unset(Evas_Object *obj);
|
||||
static void _e_zoomap_smart_init(void);
|
||||
|
||||
/* local subsystem globals */
|
||||
static Evas_Smart *_e_smart = NULL;
|
||||
|
@ -38,7 +38,7 @@ static Evas_Smart *_e_smart = NULL;
|
|||
EAPI Evas_Object *
|
||||
e_zoomap_add(Evas *evas)
|
||||
{
|
||||
_e_smart_init();
|
||||
_e_zoomap_smart_init();
|
||||
return evas_object_smart_add(evas, _e_smart);
|
||||
}
|
||||
|
||||
|
@ -52,9 +52,9 @@ e_zoomap_child_set(Evas_Object *obj, Evas_Object *child)
|
|||
evas_object_clip_unset(sd->child_obj);
|
||||
evas_object_smart_member_del(sd->child_obj);
|
||||
evas_object_event_callback_del(sd->child_obj, EVAS_CALLBACK_DEL,
|
||||
_e_smart_child_del_hook);
|
||||
_e_zoomap_smart_child_del_hook);
|
||||
evas_object_event_callback_del(sd->child_obj, EVAS_CALLBACK_RESIZE,
|
||||
_e_smart_child_resize_hook);
|
||||
_e_zoomap_smart_child_resize_hook);
|
||||
sd->child_obj = NULL;
|
||||
}
|
||||
if (child)
|
||||
|
@ -66,15 +66,15 @@ e_zoomap_child_set(Evas_Object *obj, Evas_Object *child)
|
|||
evas_object_geometry_get(sd->child_obj, NULL, NULL,
|
||||
&sd->child_w, &sd->child_h);
|
||||
evas_object_event_callback_add(child, EVAS_CALLBACK_DEL,
|
||||
_e_smart_child_del_hook, sd);
|
||||
_e_zoomap_smart_child_del_hook, sd);
|
||||
evas_object_event_callback_add(child, EVAS_CALLBACK_RESIZE,
|
||||
_e_smart_child_resize_hook, sd);
|
||||
_e_zoomap_smart_child_resize_hook, sd);
|
||||
if (evas_object_visible_get(obj)) evas_object_show(sd->child_obj);
|
||||
else evas_object_hide(sd->child_obj);
|
||||
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));
|
||||
_e_smart_reconfigure(sd);
|
||||
_e_zoomap_smart_reconfigure(sd);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ e_zoomap_smooth_set(Evas_Object *obj, Eina_Bool smooth)
|
|||
smooth = !!smooth;
|
||||
if (sd->smooth == smooth) return;
|
||||
sd->smooth = smooth;
|
||||
_e_smart_reconfigure(sd);
|
||||
_e_zoomap_smart_reconfigure(sd);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
|
@ -116,7 +116,7 @@ e_zoomap_solid_set(Evas_Object *obj, Eina_Bool solid)
|
|||
solid = !!solid;
|
||||
if (sd->solid == solid) return;
|
||||
sd->solid = solid;
|
||||
_e_smart_reconfigure(sd);
|
||||
_e_zoomap_smart_reconfigure(sd);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
|
@ -133,7 +133,7 @@ e_zoomap_always_set(Evas_Object *obj, Eina_Bool always)
|
|||
always = !!always;
|
||||
if (sd->always == always) return;
|
||||
sd->always = always;
|
||||
_e_smart_reconfigure(sd);
|
||||
_e_zoomap_smart_reconfigure(sd);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
|
@ -156,12 +156,12 @@ e_zoomap_child_edje_solid_setup(Evas_Object *obj)
|
|||
solid = (!s) || (s[0] != '1');
|
||||
if (sd->solid == solid) return;
|
||||
sd->solid = solid;
|
||||
_e_smart_reconfigure(sd);
|
||||
_e_zoomap_smart_reconfigure(sd);
|
||||
}
|
||||
|
||||
/* local subsystem functions */
|
||||
static void
|
||||
_e_smart_child_del_hook(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
_e_zoomap_smart_child_del_hook(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
E_Smart_Data *sd;
|
||||
|
||||
|
@ -170,7 +170,7 @@ _e_smart_child_del_hook(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSE
|
|||
}
|
||||
|
||||
static void
|
||||
_e_smart_child_resize_hook(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
_e_zoomap_smart_child_resize_hook(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
E_Smart_Data *sd;
|
||||
Evas_Coord w, h;
|
||||
|
@ -182,12 +182,12 @@ _e_smart_child_resize_hook(void *data, Evas *e __UNUSED__, Evas_Object *obj __UN
|
|||
{
|
||||
sd->child_w = w;
|
||||
sd->child_h = h;
|
||||
_e_smart_reconfigure(sd);
|
||||
_e_zoomap_smart_reconfigure(sd);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_e_smart_reconfigure(E_Smart_Data *sd)
|
||||
_e_zoomap_smart_reconfigure(E_Smart_Data *sd)
|
||||
{
|
||||
if (!sd->child_obj) return;
|
||||
if ((!sd->always) &&
|
||||
|
@ -237,7 +237,7 @@ _e_smart_reconfigure(E_Smart_Data *sd)
|
|||
}
|
||||
|
||||
static void
|
||||
_e_smart_add(Evas_Object *obj)
|
||||
_e_zoomap_smart_add(Evas_Object *obj)
|
||||
{
|
||||
E_Smart_Data *sd;
|
||||
|
||||
|
@ -252,7 +252,7 @@ _e_smart_add(Evas_Object *obj)
|
|||
}
|
||||
|
||||
static void
|
||||
_e_smart_del(Evas_Object *obj)
|
||||
_e_zoomap_smart_del(Evas_Object *obj)
|
||||
{
|
||||
INTERNAL_ENTRY;
|
||||
if (sd->child_obj)
|
||||
|
@ -261,42 +261,42 @@ _e_smart_del(Evas_Object *obj)
|
|||
|
||||
sd->child_obj = NULL;
|
||||
evas_object_event_callback_del(o, EVAS_CALLBACK_DEL,
|
||||
_e_smart_child_del_hook);
|
||||
_e_zoomap_smart_child_del_hook);
|
||||
evas_object_event_callback_del(o, EVAS_CALLBACK_RESIZE,
|
||||
_e_smart_child_resize_hook);
|
||||
_e_zoomap_smart_child_resize_hook);
|
||||
evas_object_del(o);
|
||||
}
|
||||
E_FREE(sd);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||
_e_zoomap_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||
{
|
||||
INTERNAL_ENTRY;
|
||||
sd->x = x;
|
||||
sd->y = y;
|
||||
_e_smart_reconfigure(sd);
|
||||
_e_zoomap_smart_reconfigure(sd);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
|
||||
_e_zoomap_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
|
||||
{
|
||||
INTERNAL_ENTRY;
|
||||
sd->w = w;
|
||||
sd->h = h;
|
||||
_e_smart_reconfigure(sd);
|
||||
_e_zoomap_smart_reconfigure(sd);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_smart_show(Evas_Object *obj)
|
||||
_e_zoomap_smart_show(Evas_Object *obj)
|
||||
{
|
||||
INTERNAL_ENTRY;
|
||||
if (sd->child_obj) evas_object_show(sd->child_obj);
|
||||
if (!evas_object_map_enable_get(sd->child_obj)) _e_smart_reconfigure(sd);
|
||||
if (!evas_object_map_enable_get(sd->child_obj)) _e_zoomap_smart_reconfigure(sd);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_smart_hide(Evas_Object *obj)
|
||||
_e_zoomap_smart_hide(Evas_Object *obj)
|
||||
{
|
||||
INTERNAL_ENTRY;
|
||||
if ((!sd->always) &&
|
||||
|
@ -311,21 +311,21 @@ _e_smart_hide(Evas_Object *obj)
|
|||
}
|
||||
|
||||
static void
|
||||
_e_smart_color_set(Evas_Object *obj, int r, int g, int b, int a)
|
||||
_e_zoomap_smart_color_set(Evas_Object *obj, int r, int g, int b, int a)
|
||||
{
|
||||
INTERNAL_ENTRY;
|
||||
if (sd->child_obj) evas_object_color_set(sd->child_obj, r, g, b, a);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_smart_clip_set(Evas_Object *obj, Evas_Object *clip)
|
||||
_e_zoomap_smart_clip_set(Evas_Object *obj, Evas_Object *clip)
|
||||
{
|
||||
INTERNAL_ENTRY;
|
||||
if (sd->child_obj) evas_object_clip_set(sd->child_obj, clip);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_smart_clip_unset(Evas_Object *obj)
|
||||
_e_zoomap_smart_clip_unset(Evas_Object *obj)
|
||||
{
|
||||
INTERNAL_ENTRY;
|
||||
if (sd->child_obj) evas_object_clip_unset(sd->child_obj);
|
||||
|
@ -333,14 +333,14 @@ _e_smart_clip_unset(Evas_Object *obj)
|
|||
|
||||
/* never need to touch this */
|
||||
static void
|
||||
_e_smart_init(void)
|
||||
_e_zoomap_smart_init(void)
|
||||
{
|
||||
static const Evas_Smart_Class sc =
|
||||
{
|
||||
SMART_NAME, EVAS_SMART_CLASS_VERSION,
|
||||
_e_smart_add, _e_smart_del, _e_smart_move, _e_smart_resize,
|
||||
_e_smart_show, _e_smart_hide, _e_smart_color_set, _e_smart_clip_set,
|
||||
_e_smart_clip_unset, NULL, NULL, NULL, NULL, NULL, NULL, NULL
|
||||
_e_zoomap_smart_add, _e_zoomap_smart_del, _e_zoomap_smart_move, _e_zoomap_smart_resize,
|
||||
_e_zoomap_smart_show, _e_zoomap_smart_hide, _e_zoomap_smart_color_set, _e_zoomap_smart_clip_set,
|
||||
_e_zoomap_smart_clip_unset, NULL, NULL, NULL, NULL, NULL, NULL, NULL
|
||||
};
|
||||
if (_e_smart) return;
|
||||
_e_smart = evas_smart_class_new(&sc);
|
||||
|
|
Loading…
Reference in New Issue