forked from enlightenment/efl
evas object: Move some events to efl_gfx and efl_image
This affects basic evas object events such as: - show, hide, resize, move, - changed size hints, - restack, - image preloaded, resize, unloaded Also, switched names to shorter "present form" like "preload" instead of "preloaded".
This commit is contained in:
parent
ff0124bdae
commit
254f5ef772
|
@ -144,4 +144,10 @@ interface Efl.Gfx {
|
|||
}
|
||||
}
|
||||
}
|
||||
events {
|
||||
show; [[Object just became visible.]]
|
||||
hide; [[Object just became invisible.]]
|
||||
move; [[Object was moved, its position during the event is the new one.]]
|
||||
resize; [[Object was resized, its size during the event is the new one.]]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ import efl_gfx_types;
|
|||
|
||||
interface Efl.Gfx.Size.Hint
|
||||
{
|
||||
event_prefix: efl_gfx;
|
||||
methods {
|
||||
@property hint_base {
|
||||
[[Base size for objects with sizing restrictions.
|
||||
|
@ -245,4 +246,7 @@ interface Efl.Gfx.Size.Hint
|
|||
}
|
||||
/* FIXME: Also add hint_display_mode? */
|
||||
}
|
||||
events {
|
||||
change,size,hints; [[Object size hints changed.]]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
interface Efl.Gfx.Stack {
|
||||
event_prefix: efl_gfx;
|
||||
methods {
|
||||
@property layer {
|
||||
set {
|
||||
|
@ -122,4 +123,7 @@ interface Efl.Gfx.Stack {
|
|||
|
||||
}
|
||||
}
|
||||
events {
|
||||
restack; [[Object stacking was changed.]]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -159,4 +159,10 @@ interface Efl.Image ()
|
|||
}
|
||||
}
|
||||
}
|
||||
events {
|
||||
preload; [[Image data has been preloaded.]]
|
||||
resize; [[Image was resized (its pixel data).]]
|
||||
unload; [[Image data has been unloaded (by some mechanism in
|
||||
EFL that threw out the original image data).]]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -645,7 +645,7 @@ _elm_hoversel_eo_base_destructor(Eo *obj, Elm_Hoversel_Data *_pd EINA_UNUSED)
|
|||
|
||||
EO_CALLBACKS_ARRAY_DEFINE(_on_parent,
|
||||
{ EO_EVENT_DEL, _on_parent_del },
|
||||
{ EVAS_OBJECT_EVENT_RESIZE, _on_parent_resize });
|
||||
{ EFL_GFX_EVENT_RESIZE, _on_parent_resize });
|
||||
|
||||
EOLIAN static void
|
||||
_elm_hoversel_hover_parent_set(Eo *obj, Elm_Hoversel_Data *sd, Evas_Object *parent)
|
||||
|
|
|
@ -106,7 +106,7 @@ _propagate_event(void *data, const Eo_Event *event);
|
|||
|
||||
EO_CALLBACKS_ARRAY_DEFINE(elm_widget_subitems_callbacks,
|
||||
{ EVAS_OBJECT_EVENT_DEL, _on_sub_obj_del },
|
||||
{ EVAS_OBJECT_EVENT_HIDE, _on_sub_obj_hide });
|
||||
{ EFL_GFX_EVENT_HIDE, _on_sub_obj_hide });
|
||||
EO_CALLBACKS_ARRAY_DEFINE(efl_subitems_callbacks,
|
||||
{ EVAS_OBJECT_EVENT_DEL, _on_sub_obj_del });
|
||||
EO_CALLBACKS_ARRAY_DEFINE(focus_callbacks,
|
||||
|
@ -4429,10 +4429,10 @@ static Eina_Bool
|
|||
_track_obj_view_del(void *data, const Eo_Event *event);
|
||||
|
||||
EO_CALLBACKS_ARRAY_DEFINE(tracker_callbacks,
|
||||
{ EVAS_OBJECT_EVENT_RESIZE, _track_obj_view_update },
|
||||
{ EVAS_OBJECT_EVENT_MOVE, _track_obj_view_update },
|
||||
{ EVAS_OBJECT_EVENT_SHOW, _track_obj_view_update },
|
||||
{ EVAS_OBJECT_EVENT_HIDE, _track_obj_view_update },
|
||||
{ EFL_GFX_EVENT_RESIZE, _track_obj_view_update },
|
||||
{ EFL_GFX_EVENT_MOVE, _track_obj_view_update },
|
||||
{ EFL_GFX_EVENT_SHOW, _track_obj_view_update },
|
||||
{ EFL_GFX_EVENT_HIDE, _track_obj_view_update },
|
||||
{ EVAS_OBJECT_EVENT_DEL, _track_obj_view_del });
|
||||
|
||||
static Eina_Bool
|
||||
|
|
|
@ -31,25 +31,25 @@ static const Eo_Event_Description *_legacy_evas_callback_table[EVAS_CALLBACK_LAS
|
|||
EVAS_OBJECT_EVENT_KEY_UP,
|
||||
EVAS_OBJECT_EVENT_FOCUS_IN,
|
||||
EVAS_OBJECT_EVENT_FOCUS_OUT,
|
||||
EVAS_OBJECT_EVENT_SHOW,
|
||||
EVAS_OBJECT_EVENT_HIDE,
|
||||
EVAS_OBJECT_EVENT_MOVE,
|
||||
EVAS_OBJECT_EVENT_RESIZE,
|
||||
EVAS_OBJECT_EVENT_RESTACK,
|
||||
EFL_GFX_EVENT_SHOW,
|
||||
EFL_GFX_EVENT_HIDE,
|
||||
EFL_GFX_EVENT_MOVE,
|
||||
EFL_GFX_EVENT_RESIZE,
|
||||
EFL_GFX_EVENT_RESTACK,
|
||||
EVAS_OBJECT_EVENT_DEL,
|
||||
EVAS_OBJECT_EVENT_HOLD,
|
||||
EVAS_OBJECT_EVENT_CHANGED_SIZE_HINTS,
|
||||
EVAS_OBJECT_EVENT_IMAGE_PRELOADED,
|
||||
EFL_GFX_EVENT_CHANGE_SIZE_HINTS,
|
||||
EFL_IMAGE_EVENT_PRELOAD,
|
||||
EVAS_CANVAS_EVENT_FOCUS_IN,
|
||||
EVAS_CANVAS_EVENT_FOCUS_OUT,
|
||||
EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE,
|
||||
EVAS_CANVAS_EVENT_RENDER_FLUSH_POST,
|
||||
EVAS_CANVAS_EVENT_OBJECT_FOCUS_IN,
|
||||
EVAS_CANVAS_EVENT_OBJECT_FOCUS_OUT,
|
||||
EVAS_OBJECT_EVENT_IMAGE_UNLOADED,
|
||||
EFL_IMAGE_EVENT_UNLOAD,
|
||||
EVAS_CANVAS_EVENT_RENDER_PRE,
|
||||
EVAS_CANVAS_EVENT_RENDER_POST,
|
||||
EVAS_OBJECT_EVENT_IMAGE_RESIZE,
|
||||
EFL_IMAGE_EVENT_RESIZE,
|
||||
EVAS_CANVAS_EVENT_DEVICE_CHANGED,
|
||||
EVAS_CANVAS_EVENT_AXIS_UPDATE,
|
||||
EVAS_CANVAS_EVENT_VIEWPORT_RESIZE
|
||||
|
|
|
@ -933,18 +933,7 @@ abstract Evas.Object (Eo.Base, Evas.Common_Interface, Efl.Gfx, Efl.Gfx.Stack,
|
|||
key,up @beta; [[Key Release Event ]]
|
||||
focus,in; [[Focus In Event ]]
|
||||
focus,out; [[Focus Out Event ]]
|
||||
show; [[Show Event ]]
|
||||
hide; [[Hide Event ]]
|
||||
move; [[Move Event ]]
|
||||
resize; [[Resize Event ]]
|
||||
restack; [[Restack Event ]]
|
||||
del; [[Object Being Deleted (called before Free) ]]
|
||||
hold; [[Events go on/off hold ]]
|
||||
changed,size,hints; [[Size hints changed event ]]
|
||||
/* FIXME: move to image */
|
||||
image,preloaded; [[Image has been preloaded ]]
|
||||
image,resize; [[Image resize ]]
|
||||
image,unloaded; [[Image data has been unloaded (by some mechanism in
|
||||
Evas that throw out original image data)]]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -168,9 +168,9 @@ _evas_object_box_option_new(Evas_Object *o, Evas_Object_Box_Data *priv EINA_UNUS
|
|||
}
|
||||
|
||||
static const Eo_Callback_Array_Item evas_object_box_callbacks[] = {
|
||||
{ EVAS_OBJECT_EVENT_RESIZE, _on_child_resize },
|
||||
{ EFL_GFX_EVENT_RESIZE, _on_child_resize },
|
||||
{ EO_EVENT_DEL, _on_child_del },
|
||||
{ EVAS_OBJECT_EVENT_CHANGED_SIZE_HINTS, _on_child_hints_changed },
|
||||
{ EFL_GFX_EVENT_CHANGE_SIZE_HINTS, _on_child_hints_changed },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ _check_event_catcher_add(void *data, const Eo_Event *event)
|
|||
INF("Registering an animator tick on canvas %p for object %p.",
|
||||
obj->layer->evas->evas, obj->object);
|
||||
}
|
||||
else if (array[i].desc == EVAS_OBJECT_EVENT_MOVE)
|
||||
else if (array[i].desc == EFL_GFX_EVENT_MOVE)
|
||||
{
|
||||
obj->move_ref++;
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ _check_event_catcher_del(void *data, const Eo_Event *event)
|
|||
INF("Unregistering an animator tick on canvas %p for object %p.",
|
||||
obj->layer->evas->evas, obj->object);
|
||||
}
|
||||
else if (array[i].desc == EVAS_OBJECT_EVENT_MOVE)
|
||||
else if (array[i].desc == EFL_GFX_EVENT_MOVE)
|
||||
{
|
||||
obj->move_ref--;
|
||||
}
|
||||
|
|
|
@ -265,7 +265,7 @@ _on_child_hints_changed(void *data, const Eo_Event *event EINA_UNUSED)
|
|||
|
||||
static const Eo_Callback_Array_Item evas_object_table_callbacks[] = {
|
||||
{ EVAS_OBJECT_EVENT_DEL, _on_child_del },
|
||||
{ EVAS_OBJECT_EVENT_CHANGED_SIZE_HINTS, _on_child_hints_changed },
|
||||
{ EFL_GFX_EVENT_CHANGE_SIZE_HINTS, _on_child_hints_changed },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue