forked from enlightenment/efl
efl: Remove manual definitions of event "changed"
Honestly I can't see why gfx & gfx.path "changed" need a manual definition, instead of relying on EO. If the API needs to be internal only, then EO needs to handle internal APIs. In this case, the event was exposed as a C API but not a EO... why?
This commit is contained in:
parent
e85c92662b
commit
e79f27ae0c
|
@ -256,7 +256,7 @@ _ector_renderer_cairo_shape_efl_object_constructor(Eo *obj, Ector_Renderer_Cairo
|
|||
pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj);
|
||||
pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj);
|
||||
|
||||
efl_event_callback_add(obj, EFL_GFX_PATH_CHANGED, _ector_renderer_cairo_shape_path_changed, pd);
|
||||
efl_event_callback_add(obj, EFL_GFX_PATH_EVENT_CHANGED, _ector_renderer_cairo_shape_path_changed, pd);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ _ector_renderer_gl_shape_efl_object_constructor(Eo *obj, Ector_Renderer_GL_Shape
|
|||
pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj);
|
||||
pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj);
|
||||
|
||||
efl_event_callback_add(obj, EFL_GFX_PATH_CHANGED, _ector_renderer_gl_shape_path_changed, pd);
|
||||
efl_event_callback_add(obj, EFL_GFX_PATH_EVENT_CHANGED, _ector_renderer_gl_shape_path_changed, pd);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -701,7 +701,7 @@ _ector_renderer_software_shape_efl_object_constructor(Eo *obj, Ector_Renderer_So
|
|||
pd->public_shape = efl_data_xref(obj, EFL_GFX_SHAPE_MIXIN, obj);
|
||||
pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj);
|
||||
pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj);
|
||||
efl_event_callback_add(obj, EFL_GFX_PATH_CHANGED, _ector_renderer_software_shape_path_changed, pd);
|
||||
efl_event_callback_add(obj, EFL_GFX_PATH_EVENT_CHANGED, _ector_renderer_software_shape_path_changed, pd);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -53,9 +53,6 @@ typedef struct tm Efl_Time;
|
|||
|
||||
#ifdef EFL_BETA_API_SUPPORT
|
||||
|
||||
#include "interfaces/efl_observer.eo.h"
|
||||
#include "interfaces/efl_observable.eo.h"
|
||||
|
||||
#include "interfaces/efl_types.eot.h"
|
||||
|
||||
#include <Efl_Model_Common.h>
|
||||
|
@ -99,12 +96,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
|
|||
/* Core interface */
|
||||
#include "interfaces/efl_animator.eo.h"
|
||||
|
||||
EAPI extern const Efl_Event_Description _EFL_GFX_CHANGED;
|
||||
EAPI extern const Efl_Event_Description _EFL_GFX_PATH_CHANGED;
|
||||
|
||||
#define EFL_GFX_CHANGED (&(_EFL_GFX_CHANGED))
|
||||
#define EFL_GFX_PATH_CHANGED (&(_EFL_GFX_PATH_CHANGED))
|
||||
|
||||
/* Graphics */
|
||||
#include "interfaces/efl_gfx.eo.h"
|
||||
#include "interfaces/efl_gfx_buffer.eo.h"
|
||||
#include "interfaces/efl_gfx_stack.eo.h"
|
||||
|
@ -118,13 +110,17 @@ EAPI extern const Efl_Event_Description _EFL_GFX_PATH_CHANGED;
|
|||
#include "interfaces/efl_gfx_filter.eo.h"
|
||||
#include "interfaces/efl_gfx_size_hint.eo.h"
|
||||
|
||||
/* Canvas & UI */
|
||||
#include "interfaces/efl_canvas.eo.h"
|
||||
|
||||
#include "interfaces/efl_ui_view.eo.h"
|
||||
#include "interfaces/efl_ui_model_connect.eo.h"
|
||||
#include "interfaces/efl_ui_factory.eo.h"
|
||||
#include "interfaces/efl_ui_model_factory_connect.eo.h"
|
||||
|
||||
/* Observable interface */
|
||||
#include "interfaces/efl_observer.eo.h"
|
||||
#include "interfaces/efl_observable.eo.h"
|
||||
|
||||
/* Packing & containers */
|
||||
#include "interfaces/efl_container.eo.h"
|
||||
#include "interfaces/efl_pack.eo.h"
|
||||
|
|
|
@ -150,5 +150,6 @@ interface Efl.Gfx {
|
|||
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.]]
|
||||
changed; [[Object was changed]]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -185,8 +185,8 @@ _efl_gfx_path_path_set(Eo *obj, Efl_Gfx_Path_Data *pd,
|
|||
&pd->current.x, &pd->current.y,
|
||||
&pd->current_ctrl.x, &pd->current_ctrl.y);
|
||||
end:
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_PATH_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -347,8 +347,8 @@ _efl_gfx_path_interpolate(Eo *obj, Efl_Gfx_Path_Data *pd,
|
|||
pd->current_ctrl.y = interpolate(from_pd->current_ctrl.y,
|
||||
to_pd->current_ctrl.y, pos_map);
|
||||
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_PATH_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
@ -383,8 +383,8 @@ _efl_gfx_path_reset(Eo *obj, Efl_Gfx_Path_Data *pd)
|
|||
pd->current_ctrl.y = 0;
|
||||
pd->convex = EINA_FALSE;
|
||||
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_PATH_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -402,8 +402,8 @@ _efl_gfx_path_append_move_to(Eo *obj, Efl_Gfx_Path_Data *pd,
|
|||
pd->current.x = x;
|
||||
pd->current.y = y;
|
||||
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_PATH_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -421,8 +421,8 @@ _efl_gfx_path_append_line_to(Eo *obj, Efl_Gfx_Path_Data *pd,
|
|||
pd->current.x = x;
|
||||
pd->current.y = y;
|
||||
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_PATH_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -449,8 +449,8 @@ _efl_gfx_path_append_cubic_to(Eo *obj, Efl_Gfx_Path_Data *pd,
|
|||
pd->current_ctrl.x = ctrl_x1;
|
||||
pd->current_ctrl.y = ctrl_y1;
|
||||
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_PATH_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1040,8 +1040,8 @@ _efl_gfx_path_append_close(Eo *obj, Efl_Gfx_Path_Data *pd)
|
|||
|
||||
efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_CLOSE, pd, &offset_point);
|
||||
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_PATH_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1596,8 +1596,8 @@ _efl_gfx_path_dup(Eo *obj, Efl_Gfx_Path_Data *pd, const Eo *dup_from)
|
|||
|
||||
_efl_gfx_path_path_set(obj, pd, from->commands, from->points);
|
||||
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_PATH_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
|
||||
}
|
||||
|
||||
#include "interfaces/efl_gfx_path.eo.c"
|
||||
|
|
|
@ -272,4 +272,7 @@ mixin Efl.Gfx.Path
|
|||
}
|
||||
}
|
||||
}
|
||||
events {
|
||||
changed; [[Graphics path was changed.]]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,12 +34,6 @@
|
|||
|
||||
#include "interfaces/efl_screen.eo.c"
|
||||
|
||||
EAPI const Efl_Event_Description _EFL_GFX_CHANGED =
|
||||
EFL_EVENT_DESCRIPTION("Graphics changed");
|
||||
|
||||
EAPI const Efl_Event_Description _EFL_GFX_PATH_CHANGED =
|
||||
EFL_EVENT_DESCRIPTION("Graphics path changed");
|
||||
|
||||
/* Packing & containers */
|
||||
#include "interfaces/efl_container.eo.c"
|
||||
#include "interfaces/efl_pack.eo.c"
|
||||
|
|
|
@ -281,7 +281,7 @@ _efl_vg_efl_object_constructor(Eo *obj,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
efl_event_callback_add(obj, EFL_GFX_CHANGED, _efl_vg_property_changed, pd);
|
||||
efl_event_callback_add(obj, EFL_GFX_EVENT_CHANGED, _efl_vg_property_changed, pd);
|
||||
pd->flags = EFL_GFX_CHANGE_FLAG_ALL;
|
||||
pd->changed = EINA_TRUE;
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ _evas_vg_render_pre(Efl_VG *child, Ector_Surface *s, Eina_Matrix3 *m)
|
|||
static inline void
|
||||
_efl_vg_changed(Eo *obj)
|
||||
{
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_CHANGED, NULL);
|
||||
efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
|
||||
}
|
||||
|
||||
static inline void *
|
||||
|
|
|
@ -89,7 +89,7 @@ _efl_vg_root_node_efl_object_constructor(Eo *obj,
|
|||
nd->render_pre = _evas_vg_root_node_render_pre;
|
||||
nd->data = cd;
|
||||
|
||||
efl_event_callback_add(obj, EFL_GFX_CHANGED, _evas_vg_root_node_changed, pd);
|
||||
efl_event_callback_add(obj, EFL_GFX_EVENT_CHANGED, _evas_vg_root_node_changed, pd);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue