forked from enlightenment/efl
efl: Introduce interface Efl.Dup
A few classes allow their objects to be duplicated, so they should all use the same interface. Also, rename VG's dup to copy_from as it's not conforming to the definition of dup.
This commit is contained in:
parent
8803040484
commit
bd5b76508b
|
@ -16,6 +16,7 @@ efl_eolian_files = \
|
|||
lib/efl/interfaces/efl_canvas.eo \
|
||||
lib/efl/interfaces/efl_config.eo \
|
||||
lib/efl/interfaces/efl_control.eo \
|
||||
lib/efl/interfaces/efl_dup.eo \
|
||||
lib/efl/interfaces/efl_file.eo \
|
||||
lib/efl/interfaces/efl_image_load.eo \
|
||||
lib/efl/interfaces/efl_part.eo \
|
||||
|
|
|
@ -22,7 +22,7 @@ _pointer_down(void *data, const Efl_Event *ev)
|
|||
testdata *td = data;
|
||||
td->down = 1;
|
||||
efl_unref(td->evdown);
|
||||
td->evdown = efl_input_dup(ev->info);
|
||||
td->evdown = efl_dup(ev->info);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -30,7 +30,7 @@ _pointer_move(void *data, const Efl_Event *ev)
|
|||
{
|
||||
testdata *td = data;
|
||||
efl_unref(td->evmove);
|
||||
td->evmove = efl_input_dup(ev->info);
|
||||
td->evmove = efl_dup(ev->info);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -39,7 +39,7 @@ _pointer_up(void *data, const Efl_Event *ev)
|
|||
testdata *td = data;
|
||||
td->down = 0;
|
||||
efl_unref(td->evup);
|
||||
td->evup = efl_input_dup(ev->info);
|
||||
td->evup = efl_dup(ev->info);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -64,7 +64,7 @@ _key_down(void *data, const Efl_Event *ev)
|
|||
if (!efl_input_fake_get(ev->info))
|
||||
{
|
||||
efl_unref(td->evkeydown);
|
||||
td->evkeydown = efl_input_dup(ev->info);
|
||||
td->evkeydown = efl_dup(ev->info);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ _key_up(void *data, const Efl_Event *ev)
|
|||
if (!efl_input_fake_get(ev->info))
|
||||
{
|
||||
efl_unref(td->evkeyup);
|
||||
td->evkeyup = efl_input_dup(ev->info);
|
||||
td->evkeyup = efl_dup(ev->info);
|
||||
}
|
||||
|
||||
if (td->f) efl_future_cancel(td->f);
|
||||
|
|
|
@ -3151,7 +3151,7 @@ _edje_svg_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3 EINA_U
|
|||
dest_root = efl_canvas_vg_root_node_get(ep->object);
|
||||
efl_ref(dest_root);
|
||||
|
||||
root = evas_vg_node_dup(src_root);
|
||||
root = efl_dup(src_root);
|
||||
|
||||
if (!evas_vg_node_interpolate(root, src_root, dest_root, pos))
|
||||
{
|
||||
|
|
|
@ -76,6 +76,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
|
|||
/* Interfaces */
|
||||
#include "interfaces/efl_config.eo.h"
|
||||
#include "interfaces/efl_control.eo.h"
|
||||
#include "interfaces/efl_dup.eo.h"
|
||||
#include "interfaces/efl_file.eo.h"
|
||||
#include "interfaces/efl_image.eo.h"
|
||||
#include "interfaces/efl_image_animated.eo.h"
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
interface Efl.Dup
|
||||
{
|
||||
[[An interface for duplication of objects.
|
||||
|
||||
Objects implementing this interface can be duplicated with @.dup.
|
||||
]]
|
||||
methods {
|
||||
dup @const {
|
||||
[[Creates a carbon copy of this object and returns it.
|
||||
|
||||
The newly created object will have no event handlers or anything of
|
||||
the sort.
|
||||
]]
|
||||
return: Efl.Dup @owned;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1575,8 +1575,8 @@ _efl_gfx_path_append_svg_path(Eo *obj, Efl_Gfx_Path_Data *pd,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_gfx_path_dup(Eo *obj, Efl_Gfx_Path_Data *pd, const Eo *dup_from)
|
||||
EOLIAN static void
|
||||
_efl_gfx_path_copy_from(Eo *obj, Efl_Gfx_Path_Data *pd, const Eo *dup_from)
|
||||
{
|
||||
Efl_Gfx_Path_Data *from;
|
||||
|
||||
|
|
|
@ -49,7 +49,8 @@ mixin Efl.Gfx.Path
|
|||
y: double; [[Y co-ordinate of control point.]]
|
||||
}
|
||||
}
|
||||
dup {
|
||||
/* FIXME: Return a new object!!! */
|
||||
copy_from {
|
||||
[[Copy the shape data from the object specified.
|
||||
|
||||
@since 1.18
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
#include <Efl.h>
|
||||
|
||||
#define MY_CLASS EFL_GFX_SHAPE_MIXIN
|
||||
|
||||
typedef struct _Efl_Gfx_Shape_Data
|
||||
{
|
||||
Efl_Gfx_Shape_Public public;
|
||||
|
@ -260,15 +262,15 @@ _efl_gfx_shape_fill_rule_get(Eo *obj EINA_UNUSED,
|
|||
return pd->fill_rule;
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_gfx_shape_dup(Eo *obj, Efl_Gfx_Shape_Data *pd,
|
||||
EOLIAN static void
|
||||
_efl_gfx_shape_efl_gfx_path_copy_from(Eo *obj, Efl_Gfx_Shape_Data *pd,
|
||||
const Eo *dup_from)
|
||||
{
|
||||
Efl_Gfx_Shape_Data *from;
|
||||
|
||||
if (obj == dup_from) return;
|
||||
|
||||
from = efl_data_scope_get(dup_from, EFL_GFX_SHAPE_MIXIN);
|
||||
from = efl_data_scope_get(dup_from, MY_CLASS);
|
||||
if (!from) return;
|
||||
|
||||
pd->public.stroke.scale = from->public.stroke.scale;
|
||||
|
@ -285,7 +287,7 @@ _efl_gfx_shape_dup(Eo *obj, Efl_Gfx_Shape_Data *pd,
|
|||
_efl_gfx_shape_stroke_dash_set(obj, pd, from->public.stroke.dash,
|
||||
from->public.stroke.dash_length);
|
||||
|
||||
efl_gfx_path_dup(obj, dup_from);
|
||||
efl_gfx_path_copy_from(efl_super(obj, MY_CLASS), dup_from);
|
||||
}
|
||||
|
||||
#include "interfaces/efl_gfx_shape.eo.c"
|
||||
|
|
|
@ -134,14 +134,8 @@ mixin Efl.Gfx.Shape (Efl.Gfx.Path)
|
|||
@in pos_map: double; [[Position map in range 0.0 to 1.0]]
|
||||
}
|
||||
}
|
||||
dup {
|
||||
[[Copy the shape data from the object specified.
|
||||
|
||||
@since 1.14
|
||||
]]
|
||||
params {
|
||||
@in dup_from: const(Efl.Object); [[Shape object from where data will be copied.]]
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Efl.Gfx.Path.copy_from;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "interfaces/efl_config.eo.c"
|
||||
#include "interfaces/efl_control.eo.c"
|
||||
#include "interfaces/efl_dup.eo.c"
|
||||
#include "interfaces/efl_image.eo.c"
|
||||
#include "interfaces/efl_image_animated.eo.c"
|
||||
#include "interfaces/efl_image_load.eo.c"
|
||||
|
|
|
@ -496,7 +496,7 @@ _cache_vg_entry_render(Evas_Object_Protected_Data *obj,
|
|||
buffer = obj->layer->evas->engine.func->ector_surface_cache_get(engine, root);
|
||||
if (!buffer)
|
||||
{
|
||||
dupe_root = evas_vg_node_dup(root);
|
||||
dupe_root = efl_dup(root);
|
||||
// render to the buffer
|
||||
buffer = _render_to_buffer(obj, vd,
|
||||
engine, surface,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import efl_input_types;
|
||||
|
||||
mixin Efl.Input.Event (Efl.Interface, Efl.Object)
|
||||
mixin Efl.Input.Event (Efl.Interface, Efl.Object, Efl.Dup)
|
||||
{
|
||||
[[Represents a generic event data.
|
||||
|
||||
|
@ -30,17 +30,6 @@ mixin Efl.Input.Event (Efl.Interface, Efl.Object)
|
|||
reset @pure_virtual {
|
||||
[[Resets the internal data to 0 or default values.]]
|
||||
}
|
||||
dup @pure_virtual {
|
||||
[[Creates a copy of this event.
|
||||
|
||||
The returned event object is similar to the given object in most
|
||||
ways except that @.fake will be $true.
|
||||
|
||||
Note: A reference is given to the caller. In order to avoid leaks
|
||||
the C API users should call $efl_unref() after use.
|
||||
]]
|
||||
return: Efl.Input.Event @owned; [[Event copy, marked as @.fake.]]
|
||||
}
|
||||
@property device @pure_virtual {
|
||||
[[Input device that originated this event.]]
|
||||
values {
|
||||
|
|
|
@ -112,7 +112,7 @@ _efl_input_focus_efl_input_event_timestamp_get(Eo *obj EINA_UNUSED,
|
|||
}
|
||||
|
||||
EOLIAN static Efl_Input_Focus *
|
||||
_efl_input_focus_efl_input_event_dup(Eo *obj EINA_UNUSED, Efl_Input_Focus_Data *pd)
|
||||
_efl_input_focus_efl_dup_dup(const Eo *obj, Efl_Input_Focus_Data *pd)
|
||||
{
|
||||
Efl_Input_Focus_Data *ev;
|
||||
Efl_Input_Focus *evt;
|
||||
|
|
|
@ -17,7 +17,15 @@ class Efl.Input.Focus(Efl.Object, Efl.Input.Event)
|
|||
Efl.Object.destructor;
|
||||
Efl.Input.Event.device { get; set; }
|
||||
Efl.Input.Event.reset;
|
||||
Efl.Input.Event.dup;
|
||||
Efl.Dup.dup;
|
||||
[[Creates a copy of this event. @Efl.Input.Event.fake is $true.
|
||||
|
||||
The returned event object is similar to the given object in most
|
||||
ways except that @Efl.Input.Event.fake will be $true.
|
||||
|
||||
Note: A reference is given to the caller. In order to avoid leaks
|
||||
the C API users should call $efl_unref() after use.
|
||||
]]
|
||||
Efl.Input.Event.timestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ _efl_input_hold_efl_input_event_reset(Eo *obj, Efl_Input_Hold_Data *pd)
|
|||
}
|
||||
|
||||
EOLIAN static Efl_Input_Event *
|
||||
_efl_input_hold_efl_input_event_dup(Eo *obj EINA_UNUSED, Efl_Input_Hold_Data *pd)
|
||||
_efl_input_hold_efl_dup_dup(const Eo *obj, Efl_Input_Hold_Data *pd)
|
||||
{
|
||||
Efl_Input_Hold_Data *ev;
|
||||
Efl_Input_Hold *evt;
|
||||
|
|
|
@ -13,7 +13,15 @@ class Efl.Input.Hold (Efl.Object, Efl.Input.Event)
|
|||
Efl.Object.constructor;
|
||||
Efl.Object.destructor;
|
||||
Efl.Input.Event.reset;
|
||||
Efl.Input.Event.dup;
|
||||
Efl.Dup.dup;
|
||||
[[Creates a copy of this event. @Efl.Input.Event.fake is $true.
|
||||
|
||||
The returned event object is similar to the given object in most
|
||||
ways except that @Efl.Input.Event.fake will be $true.
|
||||
|
||||
Note: A reference is given to the caller. In order to avoid leaks
|
||||
the C API users should call $efl_unref() after use.
|
||||
]]
|
||||
Efl.Input.Event.timestamp { get; set; }
|
||||
Efl.Input.Event.event_flags { get; set; }
|
||||
Efl.Input.Event.device { get; set; }
|
||||
|
|
|
@ -188,7 +188,7 @@ _efl_input_key_efl_input_event_reset(Eo *obj EINA_UNUSED, Efl_Input_Key_Data *pd
|
|||
}
|
||||
|
||||
EOLIAN static Efl_Input_Event *
|
||||
_efl_input_key_efl_input_event_dup(Eo *obj EINA_UNUSED, Efl_Input_Key_Data *pd)
|
||||
_efl_input_key_efl_dup_dup(const Eo *obj, Efl_Input_Key_Data *pd)
|
||||
{
|
||||
Efl_Input_Key_Data *ev;
|
||||
Efl_Input_Key *evt;
|
||||
|
|
|
@ -56,7 +56,15 @@ class Efl.Input.Key (Efl.Object, Efl.Input.Event, Efl.Input.State, Efl.Input.Eve
|
|||
Efl.Object.constructor;
|
||||
Efl.Object.destructor;
|
||||
Efl.Input.Event.reset;
|
||||
Efl.Input.Event.dup;
|
||||
Efl.Dup.dup;
|
||||
[[Creates a copy of this event. @Efl.Input.Event.fake is $true.
|
||||
|
||||
The returned event object is similar to the given object in most
|
||||
ways except that @Efl.Input.Event.fake will be $true.
|
||||
|
||||
Note: A reference is given to the caller. In order to avoid leaks
|
||||
the C API users should call $efl_unref() after use.
|
||||
]]
|
||||
Efl.Input.Event.timestamp { get; set; }
|
||||
Efl.Input.Event.fake { get; }
|
||||
Efl.Input.Event.event_flags { get; set; }
|
||||
|
|
|
@ -143,7 +143,7 @@ _efl_input_pointer_efl_input_event_reset(Eo *obj, Efl_Input_Pointer_Data *pd)
|
|||
}
|
||||
|
||||
EOLIAN static Efl_Input_Event *
|
||||
_efl_input_pointer_efl_input_event_dup(Eo *obj EINA_UNUSED, Efl_Input_Pointer_Data *pd)
|
||||
_efl_input_pointer_efl_dup_dup(const Eo *obj, Efl_Input_Pointer_Data *pd)
|
||||
{
|
||||
Efl_Input_Pointer_Data *ev;
|
||||
Efl_Input_Focus *evt;
|
||||
|
|
|
@ -161,7 +161,15 @@ class Efl.Input.Pointer (Efl.Object, Efl.Input.Event, Efl.Input.State)
|
|||
Efl.Object.destructor;
|
||||
class.destructor;
|
||||
Efl.Input.Event.reset;
|
||||
Efl.Input.Event.dup;
|
||||
Efl.Dup.dup;
|
||||
[[Creates a copy of this event. @Efl.Input.Event.fake is $true.
|
||||
|
||||
The returned event object is similar to the given object in most
|
||||
ways except that @Efl.Input.Event.fake will be $true.
|
||||
|
||||
Note: A reference is given to the caller. In order to avoid leaks
|
||||
the C API users should call $efl_unref() after use.
|
||||
]]
|
||||
Efl.Input.Event.timestamp { get; set; }
|
||||
Efl.Input.Event.fake { get; }
|
||||
Efl.Input.Event.event_flags { get; set; }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import eina_types;
|
||||
|
||||
abstract Efl.VG (Efl.Object, Efl.Gfx, Efl.Gfx.Stack)
|
||||
abstract Efl.VG (Efl.Object, Efl.Gfx, Efl.Gfx.Stack, Efl.Dup)
|
||||
{
|
||||
[[Efl vector graphics abstract class]]
|
||||
eo_prefix: efl_vg;
|
||||
|
@ -103,10 +103,6 @@ abstract Efl.VG (Efl.Object, Efl.Gfx, Efl.Gfx.Stack)
|
|||
@in pos_map: double; [[Interpolate mapping]]
|
||||
}
|
||||
}
|
||||
dup @const {
|
||||
[[Duplicate vector graphics object]]
|
||||
return: Efl.VG @owned;
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Efl.Object.parent { set; }
|
||||
|
@ -123,5 +119,6 @@ abstract Efl.VG (Efl.Object, Efl.Gfx, Efl.Gfx.Stack)
|
|||
Efl.Gfx.Stack.stack_above;
|
||||
Efl.Gfx.Stack.raise;
|
||||
Efl.Gfx.Stack.lower;
|
||||
Efl.Dup.dup;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,6 @@ class Efl.VG.Container (Efl.VG)
|
|||
Efl.Object.destructor;
|
||||
Efl.VG.bounds_get;
|
||||
Efl.VG.interpolate;
|
||||
Efl.VG.dup;
|
||||
Efl.Dup.dup;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@ abstract Efl.VG.Gradient (Efl.VG, Efl.Gfx.Gradient)
|
|||
Efl.Gfx.Gradient.stop { get; set; }
|
||||
Efl.Gfx.Gradient.spread { get; set; }
|
||||
Efl.VG.interpolate;
|
||||
Efl.VG.dup;
|
||||
Efl.Dup.dup;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ class Efl.VG.Gradient.Linear (Efl.VG.Gradient, Efl.Gfx.Gradient.Linear)
|
|||
Efl.Gfx.Gradient.Linear.end { get; set; }
|
||||
Efl.VG.bounds_get;
|
||||
Efl.VG.interpolate;
|
||||
Efl.VG.dup;
|
||||
Efl.Dup.dup;
|
||||
Efl.Object.constructor;
|
||||
Efl.Object.destructor;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class Efl.VG.Gradient.Radial (Efl.VG.Gradient, Efl.Gfx.Gradient.Radial)
|
|||
Efl.Gfx.Gradient.Radial.focal { get; set; }
|
||||
Efl.VG.bounds_get;
|
||||
Efl.VG.interpolate;
|
||||
Efl.VG.dup;
|
||||
Efl.Dup.dup;
|
||||
Efl.Object.constructor;
|
||||
Efl.Object.destructor;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ class Efl.VG.Shape (Efl.VG, Efl.Gfx.Shape)
|
|||
implements {
|
||||
Efl.VG.bounds_get;
|
||||
Efl.VG.interpolate;
|
||||
Efl.VG.dup;
|
||||
Efl.Dup.dup;
|
||||
Efl.Object.constructor;
|
||||
Efl.Object.destructor;
|
||||
}
|
||||
|
|
|
@ -475,7 +475,7 @@ _evas_device_cleanup(Evas *eo_e)
|
|||
/* If the device is deleted, _del_cb will remove the device
|
||||
* from the devices list. Ensure we delete them only once, and only if this
|
||||
* Evas is the owner, otherwise we would kill external references (eg.
|
||||
* from efl_input_dup()). */
|
||||
* from efl_dup()). */
|
||||
again:
|
||||
e->devices_modified = EINA_FALSE;
|
||||
cpy = eina_list_clone(e->devices);
|
||||
|
|
|
@ -465,7 +465,7 @@ _evas_event_source_mouse_down_events(Evas_Object *eo_obj, Evas *eo_e,
|
|||
|
||||
if (obj->delete_me || src->delete_me || e->is_frozen) return;
|
||||
|
||||
evt = efl_input_dup(parent_ev);
|
||||
evt = efl_dup(parent_ev);
|
||||
ev = efl_data_scope_get(evt, EFL_INPUT_POINTER_CLASS);
|
||||
if (!ev) return;
|
||||
|
||||
|
@ -574,7 +574,7 @@ _evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas *eo_e,
|
|||
|
||||
if (obj->delete_me || src->delete_me || e->is_frozen) return;
|
||||
|
||||
evt = efl_input_dup(parent_ev);
|
||||
evt = efl_dup(parent_ev);
|
||||
ev = efl_data_scope_get(evt, EFL_INPUT_POINTER_CLASS);
|
||||
if (!ev) return;
|
||||
|
||||
|
@ -787,7 +787,7 @@ _evas_event_source_mouse_up_events(Evas_Object *eo_obj, Evas *eo_e,
|
|||
|
||||
if (obj->delete_me || src->delete_me || e->is_frozen) return;
|
||||
|
||||
evt = efl_input_dup(parent_ev);
|
||||
evt = efl_dup(parent_ev);
|
||||
ev = efl_data_scope_get(evt, EFL_INPUT_POINTER_CLASS);
|
||||
if (!ev) return;
|
||||
|
||||
|
@ -877,7 +877,7 @@ _evas_event_source_wheel_events(Evas_Object *eo_obj, Evas *eo_e,
|
|||
|
||||
if (obj->delete_me || src->delete_me || obj->layer->evas->is_frozen) return;
|
||||
|
||||
evt = efl_input_dup(parent_ev);
|
||||
evt = efl_dup(parent_ev);
|
||||
ev = efl_data_scope_get(evt, EFL_INPUT_POINTER_CLASS);
|
||||
if (!ev) return;
|
||||
|
||||
|
@ -936,7 +936,7 @@ _evas_event_source_multi_down_events(Evas_Object_Protected_Data *obj, Evas_Publi
|
|||
|
||||
if (obj->delete_me || src->delete_me || obj->layer->evas->is_frozen) return;
|
||||
|
||||
evt = efl_input_dup(parent_ev);
|
||||
evt = efl_dup(parent_ev);
|
||||
ev = efl_data_scope_get(evt, EFL_INPUT_POINTER_CLASS);
|
||||
if (!ev) return;
|
||||
|
||||
|
@ -1002,7 +1002,7 @@ _evas_event_source_multi_up_events(Evas_Object_Protected_Data *obj, Evas_Public_
|
|||
|
||||
if (obj->delete_me || src->delete_me || obj->layer->evas->is_frozen) return;
|
||||
|
||||
evt = efl_input_dup(parent_ev);
|
||||
evt = efl_dup(parent_ev);
|
||||
ev = efl_data_scope_get(evt, EFL_INPUT_POINTER_CLASS);
|
||||
if (!ev) return;
|
||||
|
||||
|
@ -1062,7 +1062,7 @@ _evas_event_source_multi_move_events(Evas_Object_Protected_Data *obj, Evas_Publi
|
|||
|
||||
if (obj->delete_me || src->delete_me || e->is_frozen) return;
|
||||
|
||||
evt = efl_input_dup(parent_ev);
|
||||
evt = efl_dup(parent_ev);
|
||||
ev = efl_data_scope_get(evt, EFL_INPUT_POINTER_CLASS);
|
||||
if (!ev) return;
|
||||
|
||||
|
@ -1176,7 +1176,7 @@ _evas_event_source_mouse_in_events(Evas_Object *eo_obj, Evas *eo_e,
|
|||
Evas_Pointer_Data *pdata;
|
||||
|
||||
if (obj->delete_me || src->delete_me || e->is_frozen) return;
|
||||
evt = efl_input_dup(parent_ev);
|
||||
evt = efl_dup(parent_ev);
|
||||
|
||||
ev = efl_data_scope_get(evt, EFL_INPUT_POINTER_CLASS);
|
||||
if (!ev) return;
|
||||
|
@ -1267,7 +1267,7 @@ _evas_event_source_mouse_out_events(Evas_Object *eo_obj, Evas *eo_e,
|
|||
|
||||
if (obj->delete_me || src->delete_me || e->is_frozen) return;
|
||||
|
||||
evt = efl_input_dup(parent_ev);
|
||||
evt = efl_dup(parent_ev);
|
||||
ev = efl_data_scope_get(evt, EFL_INPUT_POINTER_CLASS);
|
||||
if (!ev) return;
|
||||
|
||||
|
@ -1594,7 +1594,7 @@ _post_up_handle(Evas_Public_Data *e, Efl_Input_Pointer *parent_ev,
|
|||
int event_id;
|
||||
|
||||
/* Duplicating UP event */
|
||||
evt = efl_input_dup(parent_ev);
|
||||
evt = efl_dup(parent_ev);
|
||||
ev = efl_data_scope_get(evt, EFL_INPUT_POINTER_CLASS);
|
||||
if (!ev) return;
|
||||
|
||||
|
@ -1982,7 +1982,7 @@ _canvas_event_feed_mouse_wheel_internal(Eo *eo_e, Efl_Input_Pointer_Data *pe)
|
|||
|
||||
event_id = _evas_object_event_new();
|
||||
|
||||
evt = efl_input_dup(pe->eo);
|
||||
evt = efl_dup(pe->eo);
|
||||
ev = efl_data_scope_get(evt, EFL_INPUT_POINTER_CLASS);
|
||||
if (!ev) return;
|
||||
|
||||
|
|
|
@ -152,17 +152,17 @@ _efl_vg_container_efl_vg_interpolate(Eo *obj,
|
|||
}
|
||||
|
||||
EOLIAN static Efl_VG *
|
||||
_efl_vg_container_efl_vg_dup(const Eo *obj, Efl_VG_Container_Data *pd)
|
||||
_efl_vg_container_efl_dup_dup(const Eo *obj, Efl_VG_Container_Data *pd)
|
||||
{
|
||||
Eina_List *l;
|
||||
Efl_VG *child;
|
||||
Efl_VG *cn = NULL;
|
||||
|
||||
cn = efl_vg_dup(efl_super(obj, MY_CLASS));
|
||||
cn = efl_dup(efl_super(obj, MY_CLASS));
|
||||
EINA_LIST_FOREACH(pd->children, l, child)
|
||||
{
|
||||
// parent_set adds the new node to the list of children of cn
|
||||
efl_parent_set(efl_vg_dup(child), cn);
|
||||
efl_parent_set(efl_dup(child), cn);
|
||||
}
|
||||
return cn;
|
||||
}
|
||||
|
|
|
@ -97,12 +97,12 @@ _efl_vg_gradient_efl_vg_interpolate(Eo *obj,
|
|||
}
|
||||
|
||||
EOLIAN static Efl_VG *
|
||||
_efl_vg_gradient_efl_vg_dup(const Eo *obj, Efl_VG_Gradient_Data *pd)
|
||||
_efl_vg_gradient_efl_dup_dup(const Eo *obj, Efl_VG_Gradient_Data *pd)
|
||||
|
||||
{
|
||||
Efl_VG *cn = NULL;
|
||||
|
||||
cn = efl_vg_dup(efl_super(obj, MY_CLASS));
|
||||
cn = efl_dup(efl_super(obj, MY_CLASS));
|
||||
efl_gfx_gradient_stop_set(cn, pd->colors, pd->colors_count);
|
||||
efl_gfx_gradient_spread_set(cn, pd->s);
|
||||
return cn;
|
||||
|
|
|
@ -154,11 +154,11 @@ _efl_vg_gradient_linear_efl_vg_interpolate(Eo *obj,
|
|||
}
|
||||
|
||||
EOLIAN static Efl_VG *
|
||||
_efl_vg_gradient_linear_efl_vg_dup(const Eo *obj, Efl_VG_Gradient_Linear_Data *pd)
|
||||
_efl_vg_gradient_linear_efl_dup_dup(const Eo *obj, Efl_VG_Gradient_Linear_Data *pd)
|
||||
{
|
||||
Efl_VG *cn = NULL;
|
||||
|
||||
cn = efl_vg_dup(efl_super(obj, MY_CLASS));
|
||||
cn = efl_dup(efl_super(obj, MY_CLASS));
|
||||
efl_gfx_gradient_linear_start_set(cn, pd->start.x, pd->start.y);
|
||||
efl_gfx_gradient_linear_end_set(cn, pd->end.x, pd->end.y);
|
||||
return cn;
|
||||
|
|
|
@ -174,12 +174,12 @@ _efl_vg_gradient_radial_efl_vg_interpolate(Eo *obj,
|
|||
|
||||
|
||||
EOLIAN static Efl_VG *
|
||||
_efl_vg_gradient_radial_efl_vg_dup(const Eo *obj, Efl_VG_Gradient_Radial_Data *pd)
|
||||
_efl_vg_gradient_radial_efl_dup_dup(const Eo *obj, Efl_VG_Gradient_Radial_Data *pd)
|
||||
|
||||
{
|
||||
Efl_VG *cn = NULL;
|
||||
|
||||
cn = efl_vg_dup(efl_super(obj, MY_CLASS));
|
||||
cn = efl_dup(efl_super(obj, MY_CLASS));
|
||||
efl_gfx_gradient_radial_focal_set(cn, pd->focal.x, pd->focal.y);
|
||||
efl_gfx_gradient_radial_center_set(cn, pd->center.x, pd->center.y);
|
||||
efl_gfx_gradient_radial_radius_set(cn, pd->radius);
|
||||
|
|
|
@ -716,7 +716,7 @@ _efl_vg_interpolate(Eo *obj,
|
|||
}
|
||||
|
||||
EOLIAN static Efl_VG *
|
||||
_efl_vg_dup(const Eo *obj, Efl_VG_Data *pd)
|
||||
_efl_vg_efl_dup_dup(const Eo *obj, Efl_VG_Data *pd)
|
||||
{
|
||||
Efl_VG *cn;
|
||||
Efl_VG_Data *cd;
|
||||
|
@ -733,7 +733,7 @@ _efl_vg_dup(const Eo *obj, Efl_VG_Data *pd)
|
|||
}
|
||||
|
||||
if (pd->mask)
|
||||
cd->mask = efl_vg_dup(pd->mask);
|
||||
cd->mask = efl_dup(pd->mask);
|
||||
|
||||
cd->x = pd->x;
|
||||
cd->y = pd->y;
|
||||
|
|
|
@ -120,7 +120,7 @@ _efl_vg_shape_render_pre(Eo *obj EINA_UNUSED,
|
|||
ector_renderer_shape_fill_set(nd->renderer, fill ? fill->renderer : NULL);
|
||||
ector_renderer_shape_stroke_fill_set(nd->renderer, stroke_fill ? stroke_fill->renderer : NULL);
|
||||
ector_renderer_shape_stroke_marker_set(nd->renderer, stroke_marker ? stroke_marker->renderer : NULL);
|
||||
efl_gfx_shape_dup(nd->renderer, obj);
|
||||
efl_gfx_path_copy_from(nd->renderer, obj);
|
||||
ector_renderer_prepare(nd->renderer);
|
||||
}
|
||||
|
||||
|
@ -183,21 +183,21 @@ _efl_vg_shape_efl_vg_interpolate(Eo *obj,
|
|||
|
||||
|
||||
EOLIAN static Efl_VG *
|
||||
_efl_vg_shape_efl_vg_dup(const Eo *obj, Efl_VG_Shape_Data *pd)
|
||||
_efl_vg_shape_efl_dup_dup(const Eo *obj, Efl_VG_Shape_Data *pd)
|
||||
{
|
||||
Efl_VG *cn = NULL;
|
||||
Efl_VG_Shape_Data *cd = NULL;
|
||||
|
||||
cn = efl_vg_dup(efl_super(obj, MY_CLASS));
|
||||
cn = efl_dup(efl_super(obj, MY_CLASS));
|
||||
cd = efl_data_scope_get(cn, MY_CLASS);
|
||||
if (pd->fill)
|
||||
cd->fill = efl_vg_dup(pd->fill);
|
||||
cd->fill = efl_dup(pd->fill);
|
||||
if (pd->stroke.fill)
|
||||
cd->stroke.fill = efl_vg_dup(pd->stroke.fill);
|
||||
cd->stroke.fill = efl_dup(pd->stroke.fill);
|
||||
if (pd->stroke.marker)
|
||||
cd->stroke.marker = efl_vg_dup(pd->stroke.marker);
|
||||
cd->stroke.marker = efl_dup(pd->stroke.marker);
|
||||
|
||||
efl_gfx_shape_dup(cn, obj);
|
||||
efl_gfx_path_copy_from(cn, obj);
|
||||
return cn;
|
||||
}
|
||||
|
||||
|
@ -318,7 +318,7 @@ evas_vg_shape_current_ctrl_get(Eo *obj, double *x, double *y)
|
|||
EAPI void
|
||||
evas_vg_shape_dup(Eo *obj, Eo *dup_from)
|
||||
{
|
||||
efl_gfx_shape_dup(obj, dup_from);
|
||||
efl_gfx_path_copy_from(obj, dup_from);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
|
@ -274,7 +274,7 @@ _evas_vg_dup_vg_tree(Vg_File_Data *fd, double w, double h)
|
|||
if (!fd) return NULL;
|
||||
if ( !w || !h ) return NULL;
|
||||
|
||||
root = efl_vg_dup(fd->root);
|
||||
root = efl_dup(fd->root);
|
||||
_apply_transformation(root, w, h, fd);
|
||||
|
||||
return root;
|
||||
|
|
Loading…
Reference in New Issue