summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas')
-rw-r--r--src/lib/evas/canvas/efl_canvas_alpha_animation.c (renamed from src/lib/evas/canvas/efl_canvas_animation_alpha.c)22
-rw-r--r--src/lib/evas/canvas/efl_canvas_alpha_animation.eo (renamed from src/lib/evas/canvas/efl_canvas_animation_alpha.eo)4
-rw-r--r--src/lib/evas/canvas/efl_canvas_alpha_animation_private.h19
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation.eo4
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_alpha_private.h19
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_group_private.h15
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_rotate_private.h30
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_scale_private.h25
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_translate_private.h16
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_types.eot5
-rw-r--r--src/lib/evas/canvas/efl_canvas_event_grabber.c2
-rw-r--r--src/lib/evas/canvas/efl_canvas_event_grabber_eo.legacy.c4
-rw-r--r--src/lib/evas/canvas/efl_canvas_event_grabber_eo.legacy.h4
-rw-r--r--src/lib/evas/canvas/efl_canvas_group.eo4
-rw-r--r--src/lib/evas/canvas/efl_canvas_group_animation.c (renamed from src/lib/evas/canvas/efl_canvas_animation_group.c)51
-rw-r--r--src/lib/evas/canvas/efl_canvas_group_animation.eo (renamed from src/lib/evas/canvas/efl_canvas_animation_group.eo)6
-rw-r--r--src/lib/evas/canvas/efl_canvas_group_animation_private.h16
-rw-r--r--src/lib/evas/canvas/efl_canvas_group_eo.legacy.c10
-rw-r--r--src/lib/evas/canvas/efl_canvas_group_eo.legacy.h10
-rw-r--r--src/lib/evas/canvas/efl_canvas_image.c68
-rw-r--r--src/lib/evas/canvas/efl_canvas_image.eo2
-rw-r--r--src/lib/evas/canvas/efl_canvas_object.eo10
-rw-r--r--src/lib/evas/canvas/efl_canvas_object_animation.c2
-rw-r--r--src/lib/evas/canvas/efl_canvas_object_eo.legacy.c38
-rw-r--r--src/lib/evas/canvas/efl_canvas_object_eo.legacy.h40
-rw-r--r--src/lib/evas/canvas/efl_canvas_parallel_group_animation.c (renamed from src/lib/evas/canvas/efl_canvas_animation_group_parallel.c)10
-rw-r--r--src/lib/evas/canvas/efl_canvas_parallel_group_animation.eo (renamed from src/lib/evas/canvas/efl_canvas_animation_group_parallel.eo)5
-rw-r--r--src/lib/evas/canvas/efl_canvas_parallel_group_animation_private.h (renamed from src/lib/evas/canvas/efl_canvas_animation_group_parallel_private.h)0
-rw-r--r--src/lib/evas/canvas/efl_canvas_proxy.c2
-rw-r--r--src/lib/evas/canvas/efl_canvas_rotate_animation.c (renamed from src/lib/evas/canvas/efl_canvas_animation_rotate.c)30
-rw-r--r--src/lib/evas/canvas/efl_canvas_rotate_animation.eo (renamed from src/lib/evas/canvas/efl_canvas_animation_rotate.eo)6
-rw-r--r--src/lib/evas/canvas/efl_canvas_rotate_animation_private.h30
-rw-r--r--src/lib/evas/canvas/efl_canvas_scale_animation.c (renamed from src/lib/evas/canvas/efl_canvas_animation_scale.c)30
-rw-r--r--src/lib/evas/canvas/efl_canvas_scale_animation.eo (renamed from src/lib/evas/canvas/efl_canvas_animation_scale.eo)10
-rw-r--r--src/lib/evas/canvas/efl_canvas_scale_animation_private.h25
-rw-r--r--src/lib/evas/canvas/efl_canvas_scene3d.c310
-rw-r--r--src/lib/evas/canvas/efl_canvas_scene3d.eo20
-rw-r--r--src/lib/evas/canvas/efl_canvas_sequential_group_animation.c (renamed from src/lib/evas/canvas/efl_canvas_animation_group_sequential.c)10
-rw-r--r--src/lib/evas/canvas/efl_canvas_sequential_group_animation.eo (renamed from src/lib/evas/canvas/efl_canvas_animation_group_sequential.eo)4
-rw-r--r--src/lib/evas/canvas/efl_canvas_sequential_group_animation_private.h (renamed from src/lib/evas/canvas/efl_canvas_animation_group_sequential_private.h)0
-rw-r--r--src/lib/evas/canvas/efl_canvas_textblock.eo180
-rw-r--r--src/lib/evas/canvas/efl_canvas_textblock_eo.legacy.c22
-rw-r--r--src/lib/evas/canvas/efl_canvas_textblock_eo.legacy.h23
-rw-r--r--src/lib/evas/canvas/efl_canvas_textblock_internal.h43
-rw-r--r--src/lib/evas/canvas/efl_canvas_translate_animation.c (renamed from src/lib/evas/canvas/efl_canvas_animation_translate.c)30
-rw-r--r--src/lib/evas/canvas/efl_canvas_translate_animation.eo (renamed from src/lib/evas/canvas/efl_canvas_animation_translate.eo)6
-rw-r--r--src/lib/evas/canvas/efl_canvas_translate_animation_private.h16
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_container.c66
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_container.eo4
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.c8
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.h32
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_gradient.c24
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_gradient_eo.legacy.h21
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c20
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c28
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_image.c1
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_node.c214
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.c20
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.h36
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object.c213
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object.eo22
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.c24
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.h29
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_shape.c167
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_shape_eo.legacy.c12
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_shape_eo.legacy.h59
-rw-r--r--src/lib/evas/canvas/efl_gfx_mapping.c1
-rw-r--r--src/lib/evas/canvas/efl_gfx_vg_value_provider.c38
-rw-r--r--src/lib/evas/canvas/efl_gfx_vg_value_provider.eo23
-rw-r--r--src/lib/evas/canvas/efl_gfx_vg_value_provider.h4
-rw-r--r--src/lib/evas/canvas/efl_input_device.c14
-rw-r--r--src/lib/evas/canvas/efl_input_event.c2
-rw-r--r--src/lib/evas/canvas/efl_input_focus.c2
-rw-r--r--src/lib/evas/canvas/efl_input_hold.c2
-rw-r--r--src/lib/evas/canvas/efl_input_key.c2
-rw-r--r--src/lib/evas/canvas/efl_input_pointer.c4
-rw-r--r--src/lib/evas/canvas/efl_input_pointer.eo1
-rw-r--r--src/lib/evas/canvas/efl_input_types.eot17
-rw-r--r--src/lib/evas/canvas/efl_text_cursor_object.c (renamed from src/lib/evas/canvas/efl_text_cursor.c)127
-rw-r--r--src/lib/evas/canvas/efl_text_cursor_object.eo (renamed from src/lib/evas/canvas/efl_text_cursor.eo)89
-rw-r--r--src/lib/evas/canvas/efl_text_formatter.c47
-rw-r--r--src/lib/evas/canvas/efl_text_formatter.eo21
-rw-r--r--src/lib/evas/canvas/evas_async_events.c12
-rw-r--r--src/lib/evas/canvas/evas_box_eo.c82
-rw-r--r--src/lib/evas/canvas/evas_box_eo.h102
-rw-r--r--src/lib/evas/canvas/evas_box_eo.legacy.c54
-rw-r--r--src/lib/evas/canvas/evas_box_eo.legacy.h54
-rw-r--r--src/lib/evas/canvas/evas_callbacks.c40
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_camera.c203
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_camera.eo89
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_eet.c211
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_light.c309
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_light.eo249
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_material.c206
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_material.eo116
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_mesh.c1172
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_mesh.eo421
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_node.c1695
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_node.eo368
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_node_callback.h36
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_object.c101
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_object.eo77
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_primitive.c152
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_primitive.eo130
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_scene.c839
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_scene.eo168
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_texture.c606
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_texture.eo159
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_types.eot293
-rw-r--r--src/lib/evas/canvas/evas_canvas_eo.c134
-rw-r--r--src/lib/evas/canvas/evas_canvas_eo.h144
-rw-r--r--src/lib/evas/canvas/evas_canvas_eo.legacy.c130
-rw-r--r--src/lib/evas/canvas/evas_canvas_eo.legacy.h280
-rw-r--r--src/lib/evas/canvas/evas_clip.c39
-rw-r--r--src/lib/evas/canvas/evas_data.c6
-rw-r--r--src/lib/evas/canvas/evas_device.c70
-rw-r--r--src/lib/evas/canvas/evas_events.c148
-rw-r--r--src/lib/evas/canvas/evas_events_legacy.c41
-rw-r--r--src/lib/evas/canvas/evas_filter_mixin.c6
-rw-r--r--src/lib/evas/canvas/evas_font_dir.c20
-rw-r--r--src/lib/evas/canvas/evas_gl.c44
-rw-r--r--src/lib/evas/canvas/evas_grid_eo.c22
-rw-r--r--src/lib/evas/canvas/evas_grid_eo.h22
-rw-r--r--src/lib/evas/canvas/evas_grid_eo.legacy.c20
-rw-r--r--src/lib/evas/canvas/evas_grid_eo.legacy.h20
-rw-r--r--src/lib/evas/canvas/evas_image_eo.c2
-rw-r--r--src/lib/evas/canvas/evas_image_eo.h2
-rw-r--r--src/lib/evas/canvas/evas_image_legacy.c218
-rw-r--r--src/lib/evas/canvas/evas_image_private.h8
-rw-r--r--src/lib/evas/canvas/evas_key.c14
-rw-r--r--src/lib/evas/canvas/evas_key_grab.c6
-rw-r--r--src/lib/evas/canvas/evas_layer.c4
-rw-r--r--src/lib/evas/canvas/evas_line_eo.c4
-rw-r--r--src/lib/evas/canvas/evas_line_eo.h6
-rw-r--r--src/lib/evas/canvas/evas_line_eo.legacy.c4
-rw-r--r--src/lib/evas/canvas/evas_line_eo.legacy.h4
-rw-r--r--src/lib/evas/canvas/evas_main.c186
-rw-r--r--src/lib/evas/canvas/evas_map.c78
-rw-r--r--src/lib/evas/canvas/evas_name.c12
-rw-r--r--src/lib/evas/canvas/evas_object_box.c36
-rw-r--r--src/lib/evas/canvas/evas_object_grid.c29
-rw-r--r--src/lib/evas/canvas/evas_object_image.c68
-rw-r--r--src/lib/evas/canvas/evas_object_inform.c8
-rw-r--r--src/lib/evas/canvas/evas_object_intercept.c31
-rw-r--r--src/lib/evas/canvas/evas_object_line.c2
-rw-r--r--src/lib/evas/canvas/evas_object_main.c153
-rw-r--r--src/lib/evas/canvas/evas_object_polygon.c6
-rw-r--r--src/lib/evas/canvas/evas_object_rectangle.c2
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c133
-rw-r--r--src/lib/evas/canvas/evas_object_smart_clipped.c6
-rw-r--r--src/lib/evas/canvas/evas_object_table.c17
-rw-r--r--src/lib/evas/canvas/evas_object_text.c44
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c2730
-rw-r--r--src/lib/evas/canvas/evas_object_textgrid.c16
-rw-r--r--src/lib/evas/canvas/evas_out.c18
-rw-r--r--src/lib/evas/canvas/evas_render.c213
-rw-r--r--src/lib/evas/canvas/evas_smart.c16
-rw-r--r--src/lib/evas/canvas/evas_stack.x39
-rw-r--r--src/lib/evas/canvas/evas_stats.c16
-rw-r--r--src/lib/evas/canvas/evas_table_eo.c36
-rw-r--r--src/lib/evas/canvas/evas_table_eo.h38
-rw-r--r--src/lib/evas/canvas/evas_table_eo.legacy.c32
-rw-r--r--src/lib/evas/canvas/evas_table_eo.legacy.h32
-rw-r--r--src/lib/evas/canvas/evas_text_eo.c52
-rw-r--r--src/lib/evas/canvas/evas_text_eo.h54
-rw-r--r--src/lib/evas/canvas/evas_text_eo.legacy.c52
-rw-r--r--src/lib/evas/canvas/evas_text_eo.legacy.h52
-rw-r--r--src/lib/evas/canvas/evas_textblock_legacy.h209
-rw-r--r--src/lib/evas/canvas/evas_textgrid_eo.c20
-rw-r--r--src/lib/evas/canvas/evas_textgrid_eo.h22
-rw-r--r--src/lib/evas/canvas/evas_textgrid_eo.legacy.c20
-rw-r--r--src/lib/evas/canvas/evas_textgrid_eo.legacy.h20
-rw-r--r--src/lib/evas/canvas/evas_touch_point.c8
-rw-r--r--src/lib/evas/canvas/evas_vg_private.h23
-rw-r--r--src/lib/evas/canvas/meson.build82
175 files changed, 4841 insertions, 11764 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_animation_alpha.c b/src/lib/evas/canvas/efl_canvas_alpha_animation.c
index c0bca11101..913a826a04 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_alpha.c
+++ b/src/lib/evas/canvas/efl_canvas_alpha_animation.c
@@ -1,10 +1,10 @@
-#include "efl_canvas_animation_alpha_private.h"
+#include "efl_canvas_alpha_animation_private.h"
-#define MY_CLASS EFL_CANVAS_ANIMATION_ALPHA_CLASS
+#define MY_CLASS EFL_CANVAS_ALPHA_ANIMATION_CLASS
EOLIAN static void
-_efl_canvas_animation_alpha_alpha_set(Eo *eo_obj EINA_UNUSED,
- Efl_Canvas_Animation_Alpha_Data *pd,
+_efl_canvas_alpha_animation_alpha_set(Eo *eo_obj EINA_UNUSED,
+ Efl_Canvas_Alpha_Animation_Data *pd,
double from_alpha,
double to_alpha)
{
@@ -13,8 +13,8 @@ _efl_canvas_animation_alpha_alpha_set(Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
-_efl_canvas_animation_alpha_alpha_get(const Eo *eo_obj EINA_UNUSED,
- Efl_Canvas_Animation_Alpha_Data *pd,
+_efl_canvas_alpha_animation_alpha_get(const Eo *eo_obj EINA_UNUSED,
+ Efl_Canvas_Alpha_Animation_Data *pd,
double *from_alpha,
double *to_alpha)
{
@@ -26,8 +26,8 @@ _efl_canvas_animation_alpha_alpha_get(const Eo *eo_obj EINA_UNUSED,
EOLIAN static double
-_efl_canvas_animation_alpha_efl_canvas_animation_animation_apply(Eo *eo_obj,
- Efl_Canvas_Animation_Alpha_Data *pd EINA_UNUSED,
+_efl_canvas_alpha_animation_efl_canvas_animation_animation_apply(Eo *eo_obj,
+ Efl_Canvas_Alpha_Animation_Data *pd EINA_UNUSED,
double progress,
Efl_Canvas_Object *target)
{
@@ -50,8 +50,8 @@ _efl_canvas_animation_alpha_efl_canvas_animation_animation_apply(Eo *eo_obj,
}
EOLIAN static Efl_Object *
-_efl_canvas_animation_alpha_efl_object_constructor(Eo *eo_obj,
- Efl_Canvas_Animation_Alpha_Data *pd)
+_efl_canvas_alpha_animation_efl_object_constructor(Eo *eo_obj,
+ Efl_Canvas_Alpha_Animation_Data *pd)
{
eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
@@ -61,4 +61,4 @@ _efl_canvas_animation_alpha_efl_object_constructor(Eo *eo_obj,
return eo_obj;
}
-#include "efl_canvas_animation_alpha.eo.c"
+#include "efl_canvas_alpha_animation.eo.c"
diff --git a/src/lib/evas/canvas/efl_canvas_animation_alpha.eo b/src/lib/evas/canvas/efl_canvas_alpha_animation.eo
index d0b18f4afc..f466c00e79 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_alpha.eo
+++ b/src/lib/evas/canvas/efl_canvas_alpha_animation.eo
@@ -1,4 +1,4 @@
-class Efl.Canvas.Animation_Alpha extends Efl.Canvas.Animation
+class Efl.Canvas.Alpha_Animation extends Efl.Canvas.Animation
{
[[Animated alpha blending effect.
@@ -9,7 +9,7 @@ class Efl.Canvas.Animation_Alpha extends Efl.Canvas.Animation
@since 1.24
]]
c_prefix: efl_animation_alpha;
- data: Efl_Canvas_Animation_Alpha_Data;
+ data: Efl_Canvas_Alpha_Animation_Data;
methods {
@property alpha {
[[Alpha range to animate. $[0.0] means the object is transparent and $[1.0] means
diff --git a/src/lib/evas/canvas/efl_canvas_alpha_animation_private.h b/src/lib/evas/canvas/efl_canvas_alpha_animation_private.h
new file mode 100644
index 0000000000..d167f458f7
--- /dev/null
+++ b/src/lib/evas/canvas/efl_canvas_alpha_animation_private.h
@@ -0,0 +1,19 @@
+#define EFL_ANIMATION_PROTECTED
+
+#include "evas_common_private.h"
+#include <Ecore.h>
+#include "efl_canvas_animation_private.h"
+
+#define EFL_ALPHA_ANIMATION_DATA_GET(o, pd) \
+ Efl_Canvas_Alpha_Animation_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ALPHA_ANIMATION_CLASS)
+
+typedef struct _Efl_Canvas_Alpha_Animation_Property
+{
+ double alpha;
+} Efl_Canvas_Alpha_Animation_Property;
+
+typedef struct _Efl_Canvas_Alpha_Animation_Data
+{
+ Efl_Canvas_Alpha_Animation_Property from;
+ Efl_Canvas_Alpha_Animation_Property to;
+} Efl_Canvas_Alpha_Animation_Data;
diff --git a/src/lib/evas/canvas/efl_canvas_animation.eo b/src/lib/evas/canvas/efl_canvas_animation.eo
index 665b3b509e..b7bcb0452f 100644
--- a/src/lib/evas/canvas/efl_canvas_animation.eo
+++ b/src/lib/evas/canvas/efl_canvas_animation.eo
@@ -9,7 +9,7 @@ class Efl.Canvas.Animation extends Efl.Object implements Efl.Playable
The value of the changed properties moves smoothly as the provided progress value
evolves from $[0] to $[1].
- For example implementations see @Efl.Canvas.Animation_Translate or @Efl.Canvas.Animation_Scale.
+ For example implementations see @Efl.Canvas.Translate_Animation or @Efl.Canvas.Scale_Animation.
Note: Unless @.final_state_keep is used, when an animation finishes any effect it introduced on the object is
removed. This means that if the animation does not end in the object's initial state there will be a noticeable
@@ -103,7 +103,7 @@ class Efl.Canvas.Animation extends Efl.Object implements Efl.Playable
animation_apply {
[[Overwrite this method to implement your own animation subclasses.
- This is used for example by @Efl.Canvas.Animation_Translate or @Efl.Canvas.Animation_Scale.
+ This is used for example by @Efl.Canvas.Translate_Animation or @Efl.Canvas.Scale_Animation.
Subclasses should call their parent's @.animation_apply to get the adjusted $progress value
and then perform the animation by modifying the $target's properties.
diff --git a/src/lib/evas/canvas/efl_canvas_animation_alpha_private.h b/src/lib/evas/canvas/efl_canvas_animation_alpha_private.h
deleted file mode 100644
index fc0b9e655f..0000000000
--- a/src/lib/evas/canvas/efl_canvas_animation_alpha_private.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#define EFL_ANIMATION_PROTECTED
-
-#include "evas_common_private.h"
-#include <Ecore.h>
-#include "efl_canvas_animation_private.h"
-
-#define EFL_ANIMATION_ALPHA_DATA_GET(o, pd) \
- Efl_Canvas_Animation_Alpha_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_ALPHA_CLASS)
-
-typedef struct _Efl_Canvas_Animation_Alpha_Property
-{
- double alpha;
-} Efl_Canvas_Animation_Alpha_Property;
-
-typedef struct _Efl_Canvas_Animation_Alpha_Data
-{
- Efl_Canvas_Animation_Alpha_Property from;
- Efl_Canvas_Animation_Alpha_Property to;
-} Efl_Canvas_Animation_Alpha_Data;
diff --git a/src/lib/evas/canvas/efl_canvas_animation_group_private.h b/src/lib/evas/canvas/efl_canvas_animation_group_private.h
deleted file mode 100644
index 685e8f6063..0000000000
--- a/src/lib/evas/canvas/efl_canvas_animation_group_private.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#define EFL_ANIMATION_PROTECTED
-
-#include "evas_common_private.h"
-#include <Ecore.h>
-
-#define MY_CLASS EFL_CANVAS_ANIMATION_GROUP_CLASS
-#define MY_CLASS_NAME efl_class_name_get(MY_CLASS)
-
-#define EFL_ANIMATION_GROUP_DATA_GET(o, pd) \
- Efl_Canvas_Animation_Group_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_GROUP_CLASS)
-
-typedef struct _Efl_Canvas_Animation_Group_Data
-{
- Eina_List *animations;
-} Efl_Canvas_Animation_Group_Data;
diff --git a/src/lib/evas/canvas/efl_canvas_animation_rotate_private.h b/src/lib/evas/canvas/efl_canvas_animation_rotate_private.h
deleted file mode 100644
index 64c5887959..0000000000
--- a/src/lib/evas/canvas/efl_canvas_animation_rotate_private.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#define EFL_ANIMATION_PROTECTED
-
-#include "evas_common_private.h"
-#include <Ecore.h>
-#include "efl_canvas_animation_private.h"
-
-#define EFL_ANIMATION_ROTATE_DATA_GET(o, pd) \
- Efl_Canvas_Animation_Rotate_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_ROTATE_CLASS)
-
-typedef struct _Efl_Canvas_Animation_Rotate_Property
-{
- double degree;
-} Efl_Canvas_Animation_Rotate_Property;
-
-typedef struct _Efl_Canvas_Animation_Rotate_Relative_Pivot
-{
- Efl_Canvas_Object *obj;
- Eina_Vector2 pos;
-} Efl_Canvas_Animation_Rotate_Relative_Pivot;
-
-typedef struct _Efl_Canvas_Animation_Rotate_Data
-{
- Efl_Canvas_Animation_Rotate_Property from;
- Efl_Canvas_Animation_Rotate_Property to;
-
- Eina_Position2D abs_pivot;
- Efl_Canvas_Animation_Rotate_Relative_Pivot rel_pivot;
-
- Eina_Bool use_rel_pivot;
-} Efl_Canvas_Animation_Rotate_Data;
diff --git a/src/lib/evas/canvas/efl_canvas_animation_scale_private.h b/src/lib/evas/canvas/efl_canvas_animation_scale_private.h
deleted file mode 100644
index 57dc40d725..0000000000
--- a/src/lib/evas/canvas/efl_canvas_animation_scale_private.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#define EFL_ANIMATION_PROTECTED
-
-#include "evas_common_private.h"
-#include <Ecore.h>
-#include "efl_canvas_animation_private.h"
-
-#define EFL_ANIMATION_SCALE_DATA_GET(o, pd) \
- Efl_Canvas_Animation_Scale_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_SCALE_CLASS)
-
-typedef struct _Efl_Canvas_Animation_Scale_Relative_Pivot
-{
- Efl_Canvas_Object *obj;
- Eina_Vector2 pos;
-} Efl_Canvas_Animation_Scale_Relative_Pivot;
-
-typedef struct _Efl_Canvas_Animation_Scale_Data
-{
- Eina_Vector2 from;
- Eina_Vector2 to;
-
- Eina_Position2D pos;
- Efl_Canvas_Animation_Scale_Relative_Pivot rel_pivot;
-
- Eina_Bool use_rel_pivot;
-} Efl_Canvas_Animation_Scale_Data;
diff --git a/src/lib/evas/canvas/efl_canvas_animation_translate_private.h b/src/lib/evas/canvas/efl_canvas_animation_translate_private.h
deleted file mode 100644
index 47665a5984..0000000000
--- a/src/lib/evas/canvas/efl_canvas_animation_translate_private.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#define EFL_ANIMATION_PROTECTED
-
-#include "evas_common_private.h"
-#include <Ecore.h>
-#include "efl_canvas_animation_private.h"
-
-#define EFL_ANIMATION_TRANSLATE_DATA_GET(o, pd) \
- Efl_Canvas_Animation_Translate_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_TRANSLATE_CLASS)
-
-typedef struct _Efl_Canvas_Animation_Translate_Data
-{
- Eina_Position2D from;
- Eina_Position2D to;
-
- Eina_Bool use_rel_move;
-} Efl_Canvas_Animation_Translate_Data;
diff --git a/src/lib/evas/canvas/efl_canvas_animation_types.eot b/src/lib/evas/canvas/efl_canvas_animation_types.eot
index 819b24bcf6..b9387855c1 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_types.eot
+++ b/src/lib/evas/canvas/efl_canvas_animation_types.eot
@@ -1,8 +1,3 @@
-// ----------------------------------------------------------------------------
-// All the below types are for Efl Animation
-
-struct @beta Efl.Canvas.Animation_Player_Event_Running; [[Information of event running]]
-
enum Efl.Canvas.Animation_Repeat_Mode
{
[[Animation repeat mode. @since 1.24]]
diff --git a/src/lib/evas/canvas/efl_canvas_event_grabber.c b/src/lib/evas/canvas/efl_canvas_event_grabber.c
index cea6d86a13..60e44a3d72 100644
--- a/src/lib/evas/canvas/efl_canvas_event_grabber.c
+++ b/src/lib/evas/canvas/efl_canvas_event_grabber.c
@@ -400,7 +400,7 @@ _efl_canvas_event_grabber_freeze_when_visible_get(const Eo *eo_obj EINA_UNUSED,
return pd->freeze;
}
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_event_grabber_add(Evas *eo_e)
{
eo_e = evas_find(eo_e);
diff --git a/src/lib/evas/canvas/efl_canvas_event_grabber_eo.legacy.c b/src/lib/evas/canvas/efl_canvas_event_grabber_eo.legacy.c
index ff954ebf02..e6437c8a18 100644
--- a/src/lib/evas/canvas/efl_canvas_event_grabber_eo.legacy.c
+++ b/src/lib/evas/canvas/efl_canvas_event_grabber_eo.legacy.c
@@ -1,11 +1,11 @@
-EAPI void
+EVAS_API void
evas_object_event_grabber_freeze_when_visible_set(Efl_Canvas_Event_Grabber *obj, Eina_Bool set)
{
efl_canvas_event_grabber_freeze_when_visible_set(obj, set);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_event_grabber_freeze_when_visible_get(const Efl_Canvas_Event_Grabber *obj)
{
return efl_canvas_event_grabber_freeze_when_visible_get(obj);
diff --git a/src/lib/evas/canvas/efl_canvas_event_grabber_eo.legacy.h b/src/lib/evas/canvas/efl_canvas_event_grabber_eo.legacy.h
index 3f1b146196..a226f63ad0 100644
--- a/src/lib/evas/canvas/efl_canvas_event_grabber_eo.legacy.h
+++ b/src/lib/evas/canvas/efl_canvas_event_grabber_eo.legacy.h
@@ -25,7 +25,7 @@ typedef Eo Efl_Canvas_Event_Grabber;
*
* @ingroup Evas_Object_Event_Grabber_Group
*/
-EAPI void evas_object_event_grabber_freeze_when_visible_set(Efl_Canvas_Event_Grabber *obj, Eina_Bool set);
+EVAS_API void evas_object_event_grabber_freeze_when_visible_set(Efl_Canvas_Event_Grabber *obj, Eina_Bool set);
/**
* @brief Stops the grabber from updating its internal stacking order while
@@ -39,6 +39,6 @@ EAPI void evas_object_event_grabber_freeze_when_visible_set(Efl_Canvas_Event_Gra
*
* @ingroup Evas_Object_Event_Grabber_Group
*/
-EAPI Eina_Bool evas_object_event_grabber_freeze_when_visible_get(const Efl_Canvas_Event_Grabber *obj);
+EVAS_API Eina_Bool evas_object_event_grabber_freeze_when_visible_get(const Efl_Canvas_Event_Grabber *obj);
#endif
diff --git a/src/lib/evas/canvas/efl_canvas_group.eo b/src/lib/evas/canvas/efl_canvas_group.eo
index 500b521f88..31105a0fc6 100644
--- a/src/lib/evas/canvas/efl_canvas_group.eo
+++ b/src/lib/evas/canvas/efl_canvas_group.eo
@@ -1,4 +1,4 @@
-class Efl.Canvas.Group extends Efl.Canvas.Object
+class Efl.Canvas.Group extends Efl.Canvas.Object implements Efl.Gfx.Filter
{
[[A group object is a container for other canvas objects. Its children
move along their parent and are often clipped with a common clipper.
@@ -127,6 +127,8 @@ class Efl.Canvas.Group extends Efl.Canvas.Object
Efl.Gfx.Color.color { set; }
Efl.Gfx.Entity.visible { set; }
Efl.Gfx.Entity.position { set; }
+ Efl.Gfx.Entity.size { set; }
+ Efl.Gfx.Filter.filter_program { set; }
Efl.Canvas.Object.clipper { set; }
Efl.Canvas.Object.no_render { set; }
Efl.Canvas.Object.paragraph_direction { get; set; }
diff --git a/src/lib/evas/canvas/efl_canvas_animation_group.c b/src/lib/evas/canvas/efl_canvas_group_animation.c
index b6a771501f..f2e068c8d1 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_group.c
+++ b/src/lib/evas/canvas/efl_canvas_group_animation.c
@@ -1,14 +1,20 @@
-#include "efl_canvas_animation_group_private.h"
+#include "efl_canvas_group_animation_private.h"
EOLIAN static void
-_efl_canvas_animation_group_animation_add(Eo *eo_obj,
- Efl_Canvas_Animation_Group_Data *pd,
+_efl_canvas_group_animation_animation_add(Eo *eo_obj,
+ Efl_Canvas_Group_Animation_Data *pd,
Efl_Canvas_Animation *animation)
{
if (!animation) return;
- double duration = efl_animation_duration_get(efl_super(eo_obj, MY_CLASS));
- efl_animation_duration_set(animation, duration);
+ /* To preserve each animation's duration, group animation's duration is
+ * copied to each animation's duration only if group animation's duration is
+ * set. */
+ if (pd->is_duration_set)
+ {
+ double duration = efl_animation_duration_get(efl_super(eo_obj, MY_CLASS));
+ efl_animation_duration_set(animation, duration);
+ }
Eina_Bool keep_final_state = efl_animation_final_state_keep_get(eo_obj);
efl_animation_final_state_keep_set(animation, keep_final_state);
@@ -18,8 +24,8 @@ _efl_canvas_animation_group_animation_add(Eo *eo_obj,
}
EOLIAN static void
-_efl_canvas_animation_group_animation_del(Eo *eo_obj EINA_UNUSED,
- Efl_Canvas_Animation_Group_Data *pd,
+_efl_canvas_group_animation_animation_del(Eo *eo_obj EINA_UNUSED,
+ Efl_Canvas_Group_Animation_Data *pd,
Efl_Canvas_Animation *animation)
{
Eina_List *list;
@@ -39,17 +45,19 @@ _efl_canvas_animation_group_animation_del(Eo *eo_obj EINA_UNUSED,
}
EOLIAN static Eina_Iterator*
-_efl_canvas_animation_group_animations_get(const Eo *eo_obj EINA_UNUSED,
- Efl_Canvas_Animation_Group_Data *pd)
+_efl_canvas_group_animation_animations_get(const Eo *eo_obj EINA_UNUSED,
+ Efl_Canvas_Group_Animation_Data *pd)
{
return eina_list_iterator_new(pd->animations);
}
EOLIAN static void
-_efl_canvas_animation_group_efl_canvas_animation_duration_set(Eo *eo_obj,
- Efl_Canvas_Animation_Group_Data *pd,
+_efl_canvas_group_animation_efl_canvas_animation_duration_set(Eo *eo_obj,
+ Efl_Canvas_Group_Animation_Data *pd,
double duration)
{
+ EINA_SAFETY_ON_FALSE_RETURN(duration >= 0.0);
+
efl_animation_duration_set(efl_super(eo_obj, MY_CLASS), duration);
duration = efl_animation_duration_get(eo_obj);
@@ -59,11 +67,13 @@ _efl_canvas_animation_group_efl_canvas_animation_duration_set(Eo *eo_obj,
{
efl_animation_duration_set(anim, duration);
}
+
+ pd->is_duration_set = EINA_TRUE;
}
EOLIAN static void
-_efl_canvas_animation_group_efl_canvas_animation_final_state_keep_set(Eo *eo_obj,
- Efl_Canvas_Animation_Group_Data *pd,
+_efl_canvas_group_animation_efl_canvas_animation_final_state_keep_set(Eo *eo_obj,
+ Efl_Canvas_Group_Animation_Data *pd,
Eina_Bool keep_final_state)
{
Eina_List *l;
@@ -77,8 +87,8 @@ _efl_canvas_animation_group_efl_canvas_animation_final_state_keep_set(Eo *eo_obj
}
EOLIAN static void
-_efl_canvas_animation_group_efl_canvas_animation_interpolator_set(Eo *eo_obj,
- Efl_Canvas_Animation_Group_Data *pd,
+_efl_canvas_group_animation_efl_canvas_animation_interpolator_set(Eo *eo_obj,
+ Efl_Canvas_Group_Animation_Data *pd,
Efl_Interpolator *interpolator)
{
Eina_List *l;
@@ -92,19 +102,18 @@ _efl_canvas_animation_group_efl_canvas_animation_interpolator_set(Eo *eo_obj,
}
EOLIAN static Efl_Object *
-_efl_canvas_animation_group_efl_object_constructor(Eo *eo_obj,
- Efl_Canvas_Animation_Group_Data *pd)
+_efl_canvas_group_animation_efl_object_constructor(Eo *eo_obj,
+ Efl_Canvas_Group_Animation_Data *pd)
{
eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
-
pd->animations = NULL;
return eo_obj;
}
EOLIAN static void
-_efl_canvas_animation_group_efl_object_destructor(Eo *eo_obj,
- Efl_Canvas_Animation_Group_Data *pd)
+_efl_canvas_group_animation_efl_object_destructor(Eo *eo_obj,
+ Efl_Canvas_Group_Animation_Data *pd)
{
Efl_Canvas_Animation *anim;
@@ -114,4 +123,4 @@ _efl_canvas_animation_group_efl_object_destructor(Eo *eo_obj,
efl_destructor(efl_super(eo_obj, MY_CLASS));
}
-#include "efl_canvas_animation_group.eo.c"
+#include "efl_canvas_group_animation.eo.c"
diff --git a/src/lib/evas/canvas/efl_canvas_animation_group.eo b/src/lib/evas/canvas/efl_canvas_group_animation.eo
index b4fe40a294..65d2fbd12f 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_group.eo
+++ b/src/lib/evas/canvas/efl_canvas_group_animation.eo
@@ -1,15 +1,15 @@
-abstract Efl.Canvas.Animation_Group extends Efl.Canvas.Animation
+abstract Efl.Canvas.Group_Animation extends Efl.Canvas.Animation
{
[[Base class for combined animations (groups of animations that are played together).
This class provides methods to add, remove and retrieve individual animations from the group.
- See for example @Efl.Canvas.Animation_Group_Parallel and @Efl.Canvas.Animation_Group_Sequential.
+ See for example @Efl.Canvas.Parallel_Group_Animation and @Efl.Canvas.Sequential_Group_Animation.
@since 1.24
]]
c_prefix: efl_animation_group;
- data: Efl_Canvas_Animation_Group_Data;
+ data: Efl_Canvas_Group_Animation_Data;
methods {
animation_add {
[[Adds the given animation to the animation group.]]
diff --git a/src/lib/evas/canvas/efl_canvas_group_animation_private.h b/src/lib/evas/canvas/efl_canvas_group_animation_private.h
new file mode 100644
index 0000000000..38b7804533
--- /dev/null
+++ b/src/lib/evas/canvas/efl_canvas_group_animation_private.h
@@ -0,0 +1,16 @@
+#define EFL_ANIMATION_PROTECTED
+
+#include "evas_common_private.h"
+#include <Ecore.h>
+
+#define MY_CLASS EFL_CANVAS_GROUP_ANIMATION_CLASS
+#define MY_CLASS_NAME efl_class_name_get(MY_CLASS)
+
+#define EFL_GROUP_ANIMATION_DATA_GET(o, pd) \
+ Efl_Canvas_Group_Animation_Data *pd = efl_data_scope_get(o, EFL_CANVAS_GROUP_ANIMATION_CLASS)
+
+typedef struct _Efl_Canvas_Group_Animation_Data
+{
+ Eina_List *animations;
+ Eina_Bool is_duration_set : 1; //EINA_TRUE if duration is set
+} Efl_Canvas_Group_Animation_Data;
diff --git a/src/lib/evas/canvas/efl_canvas_group_eo.legacy.c b/src/lib/evas/canvas/efl_canvas_group_eo.legacy.c
index 1144c0a22b..3d0fea1308 100644
--- a/src/lib/evas/canvas/efl_canvas_group_eo.legacy.c
+++ b/src/lib/evas/canvas/efl_canvas_group_eo.legacy.c
@@ -1,29 +1,29 @@
-EAPI void
+EVAS_API void
evas_object_smart_need_recalculate_set(Efl_Canvas_Group *obj, Eina_Bool value)
{
efl_canvas_group_need_recalculate_set(obj, value);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_smart_need_recalculate_get(const Efl_Canvas_Group *obj)
{
return efl_canvas_group_need_recalculate_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_smart_changed(Efl_Canvas_Group *obj)
{
efl_canvas_group_change(obj);
}
-EAPI void
+EVAS_API void
evas_object_smart_calculate(Efl_Canvas_Group *obj)
{
efl_canvas_group_calculate(obj);
}
-EAPI Eina_Iterator *
+EVAS_API Eina_Iterator *
evas_object_smart_iterator_new(const Efl_Canvas_Group *obj)
{
return efl_canvas_group_members_iterate(obj);
diff --git a/src/lib/evas/canvas/efl_canvas_group_eo.legacy.h b/src/lib/evas/canvas/efl_canvas_group_eo.legacy.h
index f8f45ed286..fed6d7f8a5 100644
--- a/src/lib/evas/canvas/efl_canvas_group_eo.legacy.h
+++ b/src/lib/evas/canvas/efl_canvas_group_eo.legacy.h
@@ -34,7 +34,7 @@ typedef Eo Efl_Canvas_Group;
*
* @ingroup Evas_Object_Smart_Group
*/
-EAPI void evas_object_smart_need_recalculate_set(Efl_Canvas_Group *obj, Eina_Bool value);
+EVAS_API void evas_object_smart_need_recalculate_set(Efl_Canvas_Group *obj, Eina_Bool value);
/**
* @brief Indicates that the group's layout needs to be recalculated.
@@ -57,7 +57,7 @@ EAPI void evas_object_smart_need_recalculate_set(Efl_Canvas_Group *obj, Eina_Boo
*
* @ingroup Evas_Object_Smart_Group
*/
-EAPI Eina_Bool evas_object_smart_need_recalculate_get(const Efl_Canvas_Group *obj);
+EVAS_API Eina_Bool evas_object_smart_need_recalculate_get(const Efl_Canvas_Group *obj);
/**
* @brief Marks the object as dirty.
@@ -69,7 +69,7 @@ EAPI Eina_Bool evas_object_smart_need_recalculate_get(const Efl_Canvas_Group *ob
*
* @ingroup Evas_Object_Smart_Group
*/
-EAPI void evas_object_smart_changed(Efl_Canvas_Group *obj);
+EVAS_API void evas_object_smart_changed(Efl_Canvas_Group *obj);
/**
* @brief Triggers an immediate recalculation of this object's geometry.
@@ -79,7 +79,7 @@ EAPI void evas_object_smart_changed(Efl_Canvas_Group *obj);
*
* @ingroup Evas_Object_Smart_Group
*/
-EAPI void evas_object_smart_calculate(Efl_Canvas_Group *obj);
+EVAS_API void evas_object_smart_calculate(Efl_Canvas_Group *obj);
/**
* @brief Returns an iterator over the children of this object, which are
@@ -95,7 +95,7 @@ EAPI void evas_object_smart_calculate(Efl_Canvas_Group *obj);
*
* @ingroup Evas_Object_Smart_Group
*/
-EAPI Eina_Iterator *evas_object_smart_iterator_new(const Efl_Canvas_Group *obj);
+EVAS_API Eina_Iterator *evas_object_smart_iterator_new(const Efl_Canvas_Group *obj);
diff --git a/src/lib/evas/canvas/efl_canvas_image.c b/src/lib/evas/canvas/efl_canvas_image.c
index 1bdd5329ec..d78f1f675b 100644
--- a/src/lib/evas/canvas/efl_canvas_image.c
+++ b/src/lib/evas/canvas/efl_canvas_image.c
@@ -19,19 +19,33 @@ _evas_image_file_unload(Eo *eo_obj)
_evas_image_done_set(eo_obj, obj, o);
o->load_error = EFL_GFX_IMAGE_LOAD_ERROR_NONE;
}
+
+void
+_evas_image_preload_update(Eo *eo_obj, Eina_File *f)
+{
+ Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
+ if (o->cur->f) return;
+ EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, cur)
+ {
+ cur->f = eina_file_dup(f);
+ }
+ EINA_COW_IMAGE_STATE_WRITE_END(o, cur)
+}
+
Eina_Bool
-_evas_image_file_load(Eo *eo_obj)
+_evas_image_file_load(Eo *eo_obj, Evas_Image_Data *o)
{
Evas_Object_Protected_Data *obj;
- Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
Evas_Image_Load_Opts lo;
const Eina_File *f = efl_file_mmap_get(eo_obj);
const char *key = efl_file_key_get(eo_obj);
int load_error;
+ int frame_index;
- EINA_SAFETY_ON_NULL_RETURN_VAL(f, EINA_FALSE);
+ if (!o->skip_head)
+ EINA_SAFETY_ON_NULL_RETURN_VAL(f, EINA_FALSE);
- if (o->cur->f == f)
+ if (f && (o->cur->f == f))
{
if ((!o->cur->key) && (!key))
return EINA_TRUE;
@@ -42,7 +56,17 @@ _evas_image_file_load(Eo *eo_obj)
obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
evas_object_async_block(obj);
_evas_image_init_set(f, key, eo_obj, obj, o, &lo);
- o->engine_data = ENFN->image_mmap(ENC, o->cur->f, o->cur->key, &load_error, &lo);
+ if (f)
+ o->engine_data = ENFN->image_mmap(ENC, o->cur->f, o->cur->key, &load_error, &lo);
+ else
+ o->engine_data = ENFN->image_load(ENC, efl_file_get(eo_obj), o->cur->key, &load_error, &lo);
+
+ if (_evas_image_animated_get(eo_obj))
+ {
+ frame_index = ENFN->image_animated_frame_get(ENC, o->engine_data);
+ _evas_image_animated_frame_set(eo_obj, frame_index);
+ }
+
o->load_error = _evas_load_error_to_efl_gfx_image_load_error(load_error);
o->buffer_data_set = EINA_FALSE;
_evas_image_done_set(eo_obj, obj, o);
@@ -52,13 +76,35 @@ _evas_image_file_load(Eo *eo_obj)
return EINA_TRUE;
}
+EOLIAN static Eina_Bool
+_efl_canvas_image_efl_file_loaded_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
+{
+ Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
+ if (!o->skip_head)
+ return efl_file_loaded_get(efl_super(eo_obj, MY_CLASS));
+ return !!o->cur->f;
+}
+
+EOLIAN static const Eina_File *
+_efl_canvas_image_efl_file_mmap_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
+{
+ Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
+ if (!o->skip_head)
+ return efl_file_mmap_get(efl_super(eo_obj, MY_CLASS));
+ return o->cur->f;
+}
+
EOLIAN static Eina_Error
_efl_canvas_image_efl_file_load(Eo *eo_obj, void *_pd EINA_UNUSED)
{
if (efl_file_loaded_get(eo_obj)) return 0;
- Eina_Error err = efl_file_load(efl_super(eo_obj, MY_CLASS));
+ Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
+ Eina_Error err = 0;
+
+ if (!o->skip_head)
+ err = efl_file_load(efl_super(eo_obj, MY_CLASS));
if (err) return err;
- if (_evas_image_file_load(eo_obj))
+ if (_evas_image_file_load(eo_obj, o))
return 0;
return EFL_GFX_IMAGE_LOAD_ERROR_DOES_NOT_EXIST;
}
@@ -654,14 +700,14 @@ _image_pixels_set(Evas_Object_Protected_Data *obj,
// note: we release all planes at once
if (o->engine_data)
ENFN->image_free(ENC, o->engine_data);
- o->engine_data = ENFN->image_new_from_copied_data(ENC, w, h, NULL, o->cur->has_alpha, cspace);
+ o->engine_data = ENFN->image_new_from_copied_data(ENC, w, h, NULL, o->cur->has_alpha, (Evas_Colorspace)cspace);
}
else
{
o->buffer_data_set = EINA_TRUE;
o->engine_data = ENFN->image_data_slice_add(ENC, o->engine_data,
slice, copy, w, h, stride,
- cspace, plane, o->cur->has_alpha);
+ (Evas_Colorspace)cspace, plane, o->cur->has_alpha);
}
if (!o->engine_data)
@@ -689,7 +735,7 @@ _image_pixels_set(Evas_Object_Protected_Data *obj,
{
cur->f = NULL;
cur->key = NULL;
- cur->cspace = cspace;
+ cur->cspace = (Evas_Colorspace)cspace;
cur->image.w = w;
cur->image.h = h;
cur->image.stride = int_stride;
@@ -797,7 +843,7 @@ _efl_canvas_image_efl_gfx_buffer_buffer_map(Eo *eo_obj, void *_pd EINA_UNUSED,
goto end;
}
- if (ENFN->image_data_map(ENC, &o->engine_data, &slice, &s, x, y, w, h, cspace, mode, plane))
+ if (ENFN->image_data_map(ENC, &o->engine_data, &slice, &s, x, y, w, h, (Evas_Colorspace)cspace, mode, plane))
{
DBG("map(%p, %d,%d %dx%d plane:%d) -> " EINA_SLICE_FMT,
eo_obj, x, y, w, h, plane, EINA_SLICE_PRINT(slice));
diff --git a/src/lib/evas/canvas/efl_canvas_image.eo b/src/lib/evas/canvas/efl_canvas_image.eo
index 72e1894f61..230b84a9bc 100644
--- a/src/lib/evas/canvas/efl_canvas_image.eo
+++ b/src/lib/evas/canvas/efl_canvas_image.eo
@@ -16,6 +16,8 @@ class @beta Efl.Canvas.Image extends Efl.Canvas.Image_Internal implements
Efl.Gfx.Buffer.buffer_size { get; }
Efl.Gfx.Buffer.buffer_map;
Efl.Gfx.Buffer.buffer_unmap;
+ Efl.File.loaded { get; }
+ Efl.File.mmap { get; }
Efl.File.load;
Efl.File.unload;
Efl.Gfx.Frame_Controller.animated { get; }
diff --git a/src/lib/evas/canvas/efl_canvas_object.eo b/src/lib/evas/canvas/efl_canvas_object.eo
index dbee3db658..64aad581ea 100644
--- a/src/lib/evas/canvas/efl_canvas_object.eo
+++ b/src/lib/evas/canvas/efl_canvas_object.eo
@@ -1,6 +1,5 @@
import efl_text_types;
-struct @beta Efl.Canvas.Object_Animation_Event; [[Information of animation events]]
struct Efl.Event_Animator_Tick {
[[EFL event animator tick data structure
@@ -11,7 +10,7 @@ struct Efl.Event_Animator_Tick {
abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack,
Efl.Input.Interface, Efl.Gfx.Hint,
- Efl.Gfx.Mapping, Efl.Canvas.Pointer, Efl.Gesture.Events, Efl.Canvas.Object_Animation
+ Efl.Gfx.Mapping, Efl.Canvas.Pointer, Efl.Canvas.Object_Animation
{
[[Efl canvas object abstract class
@@ -483,10 +482,9 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity,
return: bool; [[$true if the coordinates are inside the object, $false otherwise]]
}
}
- gesture_manager_get @beta {
- [[Returns current canvas's gesture manager]]
- return: const(Efl.Canvas.Gesture_Manager); [[The gesture manager]]
- }
+ }
+ constructors {
+ Efl.Object.parent;
}
implements {
Efl.Object.constructor;
diff --git a/src/lib/evas/canvas/efl_canvas_object_animation.c b/src/lib/evas/canvas/efl_canvas_object_animation.c
index 3069d067ba..a017f73b96 100644
--- a/src/lib/evas/canvas/efl_canvas_object_animation.c
+++ b/src/lib/evas/canvas/efl_canvas_object_animation.c
@@ -148,7 +148,7 @@ _efl_canvas_object_animation_animation_pause_set(Eo *obj, Efl_Canvas_Object_Anim
_end(obj, pd);
else
_start(obj, pd,(pd->in->speed < 0) ? 1.0 - pd->in->progress : pd->in->progress);
- pd->in->pause_state = pause;
+ if (pd->in) pd->in->pause_state = pause;
}
EOLIAN static Eina_Bool
diff --git a/src/lib/evas/canvas/efl_canvas_object_eo.legacy.c b/src/lib/evas/canvas/efl_canvas_object_eo.legacy.c
index 853f7da502..2d9a5a0682 100644
--- a/src/lib/evas/canvas/efl_canvas_object_eo.legacy.c
+++ b/src/lib/evas/canvas/efl_canvas_object_eo.legacy.c
@@ -1,102 +1,102 @@
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_pointer_mode_set(Efl_Canvas_Object *obj, Evas_Object_Pointer_Mode pointer_mode)
{
return efl_canvas_object_pointer_mode_set(obj, (Efl_Input_Object_Pointer_Mode)pointer_mode);
}
-EAPI Evas_Object_Pointer_Mode
+EVAS_API Evas_Object_Pointer_Mode
evas_object_pointer_mode_get(const Efl_Canvas_Object *obj)
{
return (Evas_Object_Pointer_Mode)efl_canvas_object_pointer_mode_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_clip_set(Efl_Canvas_Object *obj, Efl_Canvas_Object *clipper)
{
efl_canvas_object_clipper_set(obj, clipper);
}
-EAPI Efl_Canvas_Object *
+EVAS_API Efl_Canvas_Object *
evas_object_clip_get(const Efl_Canvas_Object *obj)
{
return efl_canvas_object_clipper_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_repeat_events_set(Efl_Canvas_Object *obj, Eina_Bool repeat)
{
efl_canvas_object_repeat_events_set(obj, repeat);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_repeat_events_get(const Efl_Canvas_Object *obj)
{
return efl_canvas_object_repeat_events_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_focus_set(Efl_Canvas_Object *obj, Eina_Bool focus)
{
efl_canvas_object_key_focus_set(obj, focus);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_focus_get(const Efl_Canvas_Object *obj)
{
return efl_canvas_object_key_focus_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_precise_is_inside_set(Efl_Canvas_Object *obj, Eina_Bool precise)
{
efl_canvas_object_precise_is_inside_set(obj, precise);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_precise_is_inside_get(const Efl_Canvas_Object *obj)
{
return efl_canvas_object_precise_is_inside_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_propagate_events_set(Efl_Canvas_Object *obj, Eina_Bool propagate)
{
efl_canvas_object_propagate_events_set(obj, propagate);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_propagate_events_get(const Efl_Canvas_Object *obj)
{
if (!efl_isa(obj, EFL_CANVAS_OBJECT_CLASS)) return EINA_FALSE;
return efl_canvas_object_propagate_events_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_pass_events_set(Efl_Canvas_Object *obj, Eina_Bool pass)
{
efl_canvas_object_pass_events_set(obj, pass);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_pass_events_get(const Efl_Canvas_Object *obj)
{
return efl_canvas_object_pass_events_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_anti_alias_set(Efl_Canvas_Object *obj, Eina_Bool anti_alias)
{
efl_canvas_object_anti_alias_set(obj, anti_alias);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_anti_alias_get(const Efl_Canvas_Object *obj)
{
return efl_canvas_object_anti_alias_get(obj);
}
-EAPI Efl_Canvas_Object *
+EVAS_API Efl_Canvas_Object *
evas_object_smart_parent_get(const Efl_Canvas_Object *obj)
{
return efl_canvas_object_render_parent_get(obj);
@@ -134,13 +134,13 @@ _efl_text_bidirectional_type_to_evas_bidi_direction_type(Efl_Text_Bidirectional_
#undef CONVERT_TYPE
}
-EAPI void
+EVAS_API void
evas_object_paragraph_direction_set(Efl_Canvas_Object *obj, Evas_BiDi_Direction dir)
{
efl_canvas_object_paragraph_direction_set(obj, _evas_bidi_direction_type_to_efl_text_bidirectional_type(dir));
}
-EAPI Evas_BiDi_Direction
+EVAS_API Evas_BiDi_Direction
evas_object_paragraph_direction_get(const Efl_Canvas_Object *obj)
{
return _efl_text_bidirectional_type_to_evas_bidi_direction_type(efl_canvas_object_paragraph_direction_get(obj));
diff --git a/src/lib/evas/canvas/efl_canvas_object_eo.legacy.h b/src/lib/evas/canvas/efl_canvas_object_eo.legacy.h
index b8cd72787f..c78d89d48c 100644
--- a/src/lib/evas/canvas/efl_canvas_object_eo.legacy.h
+++ b/src/lib/evas/canvas/efl_canvas_object_eo.legacy.h
@@ -58,7 +58,7 @@ typedef struct _Efl_Event_Animator_Tick
*
* @ingroup Evas_Object_Group
*/
-EAPI Eina_Bool evas_object_pointer_mode_set(Efl_Canvas_Object *obj, Evas_Object_Pointer_Mode pointer_mode);
+EVAS_API Eina_Bool evas_object_pointer_mode_set(Efl_Canvas_Object *obj, Evas_Object_Pointer_Mode pointer_mode);
/**
* @brief Low-level pointer behaviour.
@@ -85,7 +85,7 @@ EAPI Eina_Bool evas_object_pointer_mode_set(Efl_Canvas_Object *obj, Evas_Object_
*
* @ingroup Evas_Object_Group
*/
-EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get(const Efl_Canvas_Object *obj);
+EVAS_API Evas_Object_Pointer_Mode evas_object_pointer_mode_get(const Efl_Canvas_Object *obj);
@@ -131,7 +131,7 @@ EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get(const Efl_Canvas_Obje
*
* @ingroup Evas_Object_Group
*/
-EAPI void evas_object_clip_set(Efl_Canvas_Object *obj, Efl_Canvas_Object *clip) EINA_ARG_NONNULL(2);
+EVAS_API void evas_object_clip_set(Efl_Canvas_Object *obj, Efl_Canvas_Object *clip) EINA_ARG_NONNULL(2);
/**
* @brief Get the object clipping @c obj (if any).
@@ -146,7 +146,7 @@ EAPI void evas_object_clip_set(Efl_Canvas_Object *obj, Efl_Canvas_Object *clip)
*
* @ingroup Evas_Object_Group
*/
-EAPI Efl_Canvas_Object *evas_object_clip_get(const Efl_Canvas_Object *obj);
+EVAS_API Efl_Canvas_Object *evas_object_clip_get(const Efl_Canvas_Object *obj);
/**
* @brief Set whether an Evas object is to repeat events.
@@ -164,7 +164,7 @@ EAPI Efl_Canvas_Object *evas_object_clip_get(const Efl_Canvas_Object *obj);
*
* @ingroup Evas_Object_Group
*/
-EAPI void evas_object_repeat_events_set(Efl_Canvas_Object *obj, Eina_Bool repeat);
+EVAS_API void evas_object_repeat_events_set(Efl_Canvas_Object *obj, Eina_Bool repeat);
/**
* @brief Determine whether an object is set to repeat events.
@@ -175,7 +175,7 @@ EAPI void evas_object_repeat_events_set(Efl_Canvas_Object *obj, Eina_Bool repeat
*
* @ingroup Evas_Object_Group
*/
-EAPI Eina_Bool evas_object_repeat_events_get(const Efl_Canvas_Object *obj);
+EVAS_API Eina_Bool evas_object_repeat_events_get(const Efl_Canvas_Object *obj);
/**
* @brief Indicates that this object is the keyboard event receiver on its
@@ -194,7 +194,7 @@ EAPI Eina_Bool evas_object_repeat_events_get(const Efl_Canvas_Object *obj);
*
* @ingroup Evas_Object_Group
*/
-EAPI void evas_object_focus_set(Efl_Canvas_Object *obj, Eina_Bool focus);
+EVAS_API void evas_object_focus_set(Efl_Canvas_Object *obj, Eina_Bool focus);
/**
* @brief Indicates that this object is the keyboard event receiver on its
@@ -214,7 +214,7 @@ EAPI void evas_object_focus_set(Efl_Canvas_Object *obj, Eina_Bool focus);
*
* @ingroup Evas_Object_Group
*/
-EAPI Eina_Bool evas_object_focus_get(const Efl_Canvas_Object *obj);
+EVAS_API Eina_Bool evas_object_focus_get(const Efl_Canvas_Object *obj);
@@ -237,7 +237,7 @@ EAPI Eina_Bool evas_object_focus_get(const Efl_Canvas_Object *obj);
*
* @ingroup Evas_Object_Group
*/
-EAPI void evas_object_precise_is_inside_set(Efl_Canvas_Object *obj, Eina_Bool precise);
+EVAS_API void evas_object_precise_is_inside_set(Efl_Canvas_Object *obj, Eina_Bool precise);
/**
* @brief Determine whether an object is set to use precise point collision
@@ -250,7 +250,7 @@ EAPI void evas_object_precise_is_inside_set(Efl_Canvas_Object *obj, Eina_Bool pr
*
* @ingroup Evas_Object_Group
*/
-EAPI Eina_Bool evas_object_precise_is_inside_get(const Efl_Canvas_Object *obj);
+EVAS_API Eina_Bool evas_object_precise_is_inside_get(const Efl_Canvas_Object *obj);
/**
* @brief Set whether events on a smart object's member should be propagated up
@@ -271,7 +271,7 @@ EAPI Eina_Bool evas_object_precise_is_inside_get(const Efl_Canvas_Object *obj);
*
* @ingroup Evas_Object_Group
*/
-EAPI void evas_object_propagate_events_set(Efl_Canvas_Object *obj, Eina_Bool propagate);
+EVAS_API void evas_object_propagate_events_set(Efl_Canvas_Object *obj, Eina_Bool propagate);
/**
* @brief Retrieve whether an Evas object is set to propagate events.
@@ -285,7 +285,7 @@ EAPI void evas_object_propagate_events_set(Efl_Canvas_Object *obj, Eina_Bool pro
*
* @ingroup Evas_Object_Group
*/
-EAPI Eina_Bool evas_object_propagate_events_get(const Efl_Canvas_Object *obj);
+EVAS_API Eina_Bool evas_object_propagate_events_get(const Efl_Canvas_Object *obj);
/**
* @brief Set whether an Evas object is to pass (ignore) events.
@@ -304,7 +304,7 @@ EAPI Eina_Bool evas_object_propagate_events_get(const Efl_Canvas_Object *obj);
*
* @ingroup Evas_Object_Group
*/
-EAPI void evas_object_pass_events_set(Efl_Canvas_Object *obj, Eina_Bool pass);
+EVAS_API void evas_object_pass_events_set(Efl_Canvas_Object *obj, Eina_Bool pass);
/**
* @brief Determine whether an object is set to pass (ignore) events.
@@ -318,7 +318,7 @@ EAPI void evas_object_pass_events_set(Efl_Canvas_Object *obj, Eina_Bool pass);
*
* @ingroup Evas_Object_Group
*/
-EAPI Eina_Bool evas_object_pass_events_get(const Efl_Canvas_Object *obj);
+EVAS_API Eina_Bool evas_object_pass_events_get(const Efl_Canvas_Object *obj);
/**
* @brief Sets whether or not the given Evas object is to be drawn
@@ -330,7 +330,7 @@ EAPI Eina_Bool evas_object_pass_events_get(const Efl_Canvas_Object *obj);
*
* @ingroup Evas_Object_Group
*/
-EAPI void evas_object_anti_alias_set(Efl_Canvas_Object *obj, Eina_Bool anti_alias);
+EVAS_API void evas_object_anti_alias_set(Efl_Canvas_Object *obj, Eina_Bool anti_alias);
/**
* @brief Retrieves whether or not the given Evas object is to be drawn
@@ -342,7 +342,7 @@ EAPI void evas_object_anti_alias_set(Efl_Canvas_Object *obj, Eina_Bool anti_alia
*
* @ingroup Evas_Object_Group
*/
-EAPI Eina_Bool evas_object_anti_alias_get(const Efl_Canvas_Object *obj);
+EVAS_API Eina_Bool evas_object_anti_alias_get(const Efl_Canvas_Object *obj);
/**
@@ -360,7 +360,7 @@ EAPI Eina_Bool evas_object_anti_alias_get(const Efl_Canvas_Object *obj);
*
* @ingroup Evas_Object_Group
*/
-EAPI Efl_Canvas_Object *evas_object_smart_parent_get(const Efl_Canvas_Object *obj);
+EVAS_API Efl_Canvas_Object *evas_object_smart_parent_get(const Efl_Canvas_Object *obj);
/**
* @brief This handles text paragraph direction of the given object. Even if
@@ -373,7 +373,7 @@ EAPI Efl_Canvas_Object *evas_object_smart_parent_get(const Efl_Canvas_Object *ob
*
* @ingroup Evas_Object_Group
*/
-EAPI void evas_object_paragraph_direction_set(Efl_Canvas_Object *obj, Evas_BiDi_Direction dir);
+EVAS_API void evas_object_paragraph_direction_set(Efl_Canvas_Object *obj, Evas_BiDi_Direction dir);
/**
* @brief This handles text paragraph direction of the given object. Even if
@@ -387,7 +387,7 @@ EAPI void evas_object_paragraph_direction_set(Efl_Canvas_Object *obj, Evas_BiDi_
*
* @ingroup Evas_Object_Group
*/
-EAPI Evas_BiDi_Direction evas_object_paragraph_direction_get(const Efl_Canvas_Object *obj);
+EVAS_API Evas_BiDi_Direction evas_object_paragraph_direction_get(const Efl_Canvas_Object *obj);
/**
* @brief Test if any object is clipped by @c obj.
@@ -400,7 +400,7 @@ EAPI Evas_BiDi_Direction evas_object_paragraph_direction_get(const Efl_Canvas_Ob
*
* @ingroup Evas_Object_Group
*/
-EAPI Eina_Bool evas_object_clipees_has(const Efl_Canvas_Object *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Eina_Bool evas_object_clipees_has(const Efl_Canvas_Object *obj) EINA_WARN_UNUSED_RESULT;
diff --git a/src/lib/evas/canvas/efl_canvas_animation_group_parallel.c b/src/lib/evas/canvas/efl_canvas_parallel_group_animation.c
index 9960e4105e..3d811fb738 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_group_parallel.c
+++ b/src/lib/evas/canvas/efl_canvas_parallel_group_animation.c
@@ -1,9 +1,9 @@
-#include "efl_canvas_animation_group_parallel_private.h"
+#include "efl_canvas_parallel_group_animation_private.h"
-#define MY_CLASS EFL_CANVAS_ANIMATION_GROUP_PARALLEL_CLASS
+#define MY_CLASS EFL_CANVAS_PARALLEL_GROUP_ANIMATION_CLASS
EOLIAN static double
-_efl_canvas_animation_group_parallel_efl_canvas_animation_animation_apply(Eo *eo_obj,
+_efl_canvas_parallel_group_animation_efl_canvas_animation_animation_apply(Eo *eo_obj,
void *_pd EINA_UNUSED,
double progress,
Efl_Canvas_Object *target)
@@ -53,7 +53,7 @@ _efl_canvas_animation_group_parallel_efl_canvas_animation_animation_apply(Eo *eo
}
EOLIAN static double
-_efl_canvas_animation_group_parallel_efl_canvas_animation_duration_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
+_efl_canvas_parallel_group_animation_efl_canvas_animation_duration_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
{
double child_total_duration;
double total_duration = 0.0;
@@ -74,4 +74,4 @@ _efl_canvas_animation_group_parallel_efl_canvas_animation_duration_get(const Eo
return total_duration;
}
-#include "efl_canvas_animation_group_parallel.eo.c"
+#include "efl_canvas_parallel_group_animation.eo.c"
diff --git a/src/lib/evas/canvas/efl_canvas_animation_group_parallel.eo b/src/lib/evas/canvas/efl_canvas_parallel_group_animation.eo
index e109a00baa..9f38769f66 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_group_parallel.eo
+++ b/src/lib/evas/canvas/efl_canvas_parallel_group_animation.eo
@@ -1,4 +1,4 @@
-class Efl.Canvas.Animation_Group_Parallel extends Efl.Canvas.Animation_Group
+class Efl.Canvas.Parallel_Group_Animation extends Efl.Canvas.Group_Animation
{
[[Combined animation which plays its individual animations in parallel
(all of them simultaneously).
@@ -6,11 +6,10 @@ class Efl.Canvas.Animation_Group_Parallel extends Efl.Canvas.Animation_Group
For instance, this could be used to move an @Efl.Canvas.Object from one position to another
while rotating it along the way.
- Use @Efl.Canvas.Animation_Group.animation_add to append individual animations.
+ Use @Efl.Canvas.Group_Animation.animation_add to append individual animations.
@since 1.24
]]
- c_prefix: efl_animation_group_parallel;
data: null;
methods {
}
diff --git a/src/lib/evas/canvas/efl_canvas_animation_group_parallel_private.h b/src/lib/evas/canvas/efl_canvas_parallel_group_animation_private.h
index 332e3b673c..332e3b673c 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_group_parallel_private.h
+++ b/src/lib/evas/canvas/efl_canvas_parallel_group_animation_private.h
diff --git a/src/lib/evas/canvas/efl_canvas_proxy.c b/src/lib/evas/canvas/efl_canvas_proxy.c
index c8368eaed6..9f626868e9 100644
--- a/src/lib/evas/canvas/efl_canvas_proxy.c
+++ b/src/lib/evas/canvas/efl_canvas_proxy.c
@@ -322,7 +322,7 @@ _efl_canvas_proxy_efl_gfx_buffer_buffer_map(Eo *eo_obj, void *_pd EINA_UNUSED,
goto end;
}
- if (ENFN->image_data_map(ENC, &o->engine_data, &slice, &s, x, y, w, h, cspace, mode, plane))
+ if (ENFN->image_data_map(ENC, &o->engine_data, &slice, &s, x, y, w, h, (Evas_Colorspace)cspace, mode, plane))
{
DBG("map(%p, %d,%d %dx%d plane:%d) -> " EINA_SLICE_FMT,
eo_obj, x, y, w, h, plane, EINA_SLICE_PRINT(slice));
diff --git a/src/lib/evas/canvas/efl_canvas_animation_rotate.c b/src/lib/evas/canvas/efl_canvas_rotate_animation.c
index ba07733275..4fb029dd37 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_rotate.c
+++ b/src/lib/evas/canvas/efl_canvas_rotate_animation.c
@@ -1,10 +1,10 @@
-#include "efl_canvas_animation_rotate_private.h"
+#include "efl_canvas_rotate_animation_private.h"
-#define MY_CLASS EFL_CANVAS_ANIMATION_ROTATE_CLASS
+#define MY_CLASS EFL_CANVAS_ROTATE_ANIMATION_CLASS
EOLIAN static void
-_efl_canvas_animation_rotate_rotate_set(Eo *eo_obj EINA_UNUSED,
- Efl_Canvas_Animation_Rotate_Data *pd,
+_efl_canvas_rotate_animation_rotate_set(Eo *eo_obj EINA_UNUSED,
+ Efl_Canvas_Rotate_Animation_Data *pd,
double from_degree,
double to_degree,
Efl_Canvas_Object *pivot,
@@ -20,8 +20,8 @@ _efl_canvas_animation_rotate_rotate_set(Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
-_efl_canvas_animation_rotate_rotate_get(const Eo *eo_obj EINA_UNUSED,
- Efl_Canvas_Animation_Rotate_Data *pd,
+_efl_canvas_rotate_animation_rotate_get(const Eo *eo_obj EINA_UNUSED,
+ Efl_Canvas_Rotate_Animation_Data *pd,
double *from_degree,
double *to_degree,
Efl_Canvas_Object **pivot,
@@ -47,8 +47,8 @@ _efl_canvas_animation_rotate_rotate_get(const Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
-_efl_canvas_animation_rotate_rotate_absolute_set(Eo *eo_obj EINA_UNUSED,
- Efl_Canvas_Animation_Rotate_Data *pd,
+_efl_canvas_rotate_animation_rotate_absolute_set(Eo *eo_obj EINA_UNUSED,
+ Efl_Canvas_Rotate_Animation_Data *pd,
double from_degree,
double to_degree,
Eina_Position2D abs)
@@ -61,8 +61,8 @@ _efl_canvas_animation_rotate_rotate_absolute_set(Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
-_efl_canvas_animation_rotate_rotate_absolute_get(const Eo *eo_obj EINA_UNUSED,
- Efl_Canvas_Animation_Rotate_Data *pd,
+_efl_canvas_rotate_animation_rotate_absolute_get(const Eo *eo_obj EINA_UNUSED,
+ Efl_Canvas_Rotate_Animation_Data *pd,
double *from_degree,
double *to_degree,
Eina_Position2D *abs)
@@ -84,8 +84,8 @@ _efl_canvas_animation_rotate_rotate_absolute_get(const Eo *eo_obj EINA_UNUSED,
}
EOLIAN static double
-_efl_canvas_animation_rotate_efl_canvas_animation_animation_apply(Eo *eo_obj,
- Efl_Canvas_Animation_Rotate_Data *pd,
+_efl_canvas_rotate_animation_efl_canvas_animation_animation_apply(Eo *eo_obj,
+ Efl_Canvas_Rotate_Animation_Data *pd,
double progress,
Efl_Canvas_Object *target)
{
@@ -114,8 +114,8 @@ _efl_canvas_animation_rotate_efl_canvas_animation_animation_apply(Eo *eo_obj,
}
EOLIAN static Efl_Object *
-_efl_canvas_animation_rotate_efl_object_constructor(Eo *eo_obj,
- Efl_Canvas_Animation_Rotate_Data *pd)
+_efl_canvas_rotate_animation_efl_object_constructor(Eo *eo_obj,
+ Efl_Canvas_Rotate_Animation_Data *pd)
{
eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
@@ -134,4 +134,4 @@ _efl_canvas_animation_rotate_efl_object_constructor(Eo *eo_obj,
return eo_obj;
}
-#include "efl_canvas_animation_rotate.eo.c"
+#include "efl_canvas_rotate_animation.eo.c"
diff --git a/src/lib/evas/canvas/efl_canvas_animation_rotate.eo b/src/lib/evas/canvas/efl_canvas_rotate_animation.eo
index c81f6eeaea..aa79e28a2f 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_rotate.eo
+++ b/src/lib/evas/canvas/efl_canvas_rotate_animation.eo
@@ -1,4 +1,6 @@
-class Efl.Canvas.Animation_Rotate extends Efl.Canvas.Animation
+import eina_types;
+
+class Efl.Canvas.Rotate_Animation extends Efl.Canvas.Animation
{
[[Animated rotation effect.
@@ -12,7 +14,7 @@ class Efl.Canvas.Animation_Rotate extends Efl.Canvas.Animation
@since 1.24
]]
c_prefix: efl_animation_rotate;
- data: Efl_Canvas_Animation_Rotate_Data;
+ data: Efl_Canvas_Rotate_Animation_Data;
methods {
@property rotate {
[[Degree range to animate and pivot object.
diff --git a/src/lib/evas/canvas/efl_canvas_rotate_animation_private.h b/src/lib/evas/canvas/efl_canvas_rotate_animation_private.h
new file mode 100644
index 0000000000..459997cf77
--- /dev/null
+++ b/src/lib/evas/canvas/efl_canvas_rotate_animation_private.h
@@ -0,0 +1,30 @@
+#define EFL_ANIMATION_PROTECTED
+
+#include "evas_common_private.h"
+#include <Ecore.h>
+#include "efl_canvas_animation_private.h"
+
+#define EFL_ROTATE_ANIMATION_DATA_GET(o, pd) \
+ Efl_Canvas_Rotate_Animation_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ROTATE_ANIMATION_CLASS)
+
+typedef struct _Efl_Canvas_Rotate_Animation_Property
+{
+ double degree;
+} Efl_Canvas_Rotate_Animation_Property;
+
+typedef struct _Efl_Canvas_Rotate_Animation_Relative_Pivot
+{
+ Efl_Canvas_Object *obj;
+ Eina_Vector2 pos;
+} Efl_Canvas_Rotate_Animation_Relative_Pivot;
+
+typedef struct _Efl_Canvas_Rotate_Animation_Data
+{
+ Efl_Canvas_Rotate_Animation_Property from;
+ Efl_Canvas_Rotate_Animation_Property to;
+
+ Eina_Position2D abs_pivot;
+ Efl_Canvas_Rotate_Animation_Relative_Pivot rel_pivot;
+
+ Eina_Bool use_rel_pivot;
+} Efl_Canvas_Rotate_Animation_Data;
diff --git a/src/lib/evas/canvas/efl_canvas_animation_scale.c b/src/lib/evas/canvas/efl_canvas_scale_animation.c
index e8a13233d6..68abf64b2b 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_scale.c
+++ b/src/lib/evas/canvas/efl_canvas_scale_animation.c
@@ -1,10 +1,10 @@
-#include "efl_canvas_animation_scale_private.h"
+#include "efl_canvas_scale_animation_private.h"
-#define MY_CLASS EFL_CANVAS_ANIMATION_SCALE_CLASS
+#define MY_CLASS EFL_CANVAS_SCALE_ANIMATION_CLASS
EOLIAN static void
-_efl_canvas_animation_scale_scale_set(Eo *eo_obj EINA_UNUSED,
- Efl_Canvas_Animation_Scale_Data *pd,
+_efl_canvas_scale_animation_scale_set(Eo *eo_obj EINA_UNUSED,
+ Efl_Canvas_Scale_Animation_Data *pd,
Eina_Vector2 from_scale,
Eina_Vector2 to_scale,
Efl_Canvas_Object *pivot,
@@ -21,8 +21,8 @@ _efl_canvas_animation_scale_scale_set(Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
-_efl_canvas_animation_scale_scale_get(const Eo *obj EINA_UNUSED,
- Efl_Canvas_Animation_Scale_Data *pd,
+_efl_canvas_scale_animation_scale_get(const Eo *obj EINA_UNUSED,
+ Efl_Canvas_Scale_Animation_Data *pd,
Eina_Vector2 *from_scale, Eina_Vector2 *to_scale,
Efl_Canvas_Object **pivot, Eina_Vector2 *pivot_pos)
{
@@ -46,8 +46,8 @@ _efl_canvas_animation_scale_scale_get(const Eo *obj EINA_UNUSED,
}
EOLIAN static void
-_efl_canvas_animation_scale_scale_absolute_set(Eo *obj EINA_UNUSED,
- Efl_Canvas_Animation_Scale_Data *pd,
+_efl_canvas_scale_animation_scale_absolute_set(Eo *obj EINA_UNUSED,
+ Efl_Canvas_Scale_Animation_Data *pd,
Eina_Vector2 from_scale, Eina_Vector2 to_scale,
Eina_Position2D pos)
{
@@ -61,8 +61,8 @@ _efl_canvas_animation_scale_scale_absolute_set(Eo *obj EINA_UNUSED,
}
EOLIAN static void
-_efl_canvas_animation_scale_scale_absolute_get(const Eo *obj EINA_UNUSED,
- Efl_Canvas_Animation_Scale_Data *pd,
+_efl_canvas_scale_animation_scale_absolute_get(const Eo *obj EINA_UNUSED,
+ Efl_Canvas_Scale_Animation_Data *pd,
Eina_Vector2 *from_scale, Eina_Vector2 *to_scale,
Eina_Position2D *pos)
{
@@ -83,8 +83,8 @@ _efl_canvas_animation_scale_scale_absolute_get(const Eo *obj EINA_UNUSED,
}
EOLIAN static double
-_efl_canvas_animation_scale_efl_canvas_animation_animation_apply(Eo *eo_obj,
- Efl_Canvas_Animation_Scale_Data *pd,
+_efl_canvas_scale_animation_efl_canvas_animation_animation_apply(Eo *eo_obj,
+ Efl_Canvas_Scale_Animation_Data *pd,
double progress,
Efl_Canvas_Object *target)
{
@@ -114,8 +114,8 @@ _efl_canvas_animation_scale_efl_canvas_animation_animation_apply(Eo *eo_obj,
}
EOLIAN static Efl_Object *
-_efl_canvas_animation_scale_efl_object_constructor(Eo *eo_obj,
- Efl_Canvas_Animation_Scale_Data *pd)
+_efl_canvas_scale_animation_efl_object_constructor(Eo *eo_obj,
+ Efl_Canvas_Scale_Animation_Data *pd)
{
eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
@@ -130,4 +130,4 @@ _efl_canvas_animation_scale_efl_object_constructor(Eo *eo_obj,
return eo_obj;
}
-#include "efl_canvas_animation_scale.eo.c"
+#include "efl_canvas_scale_animation.eo.c"
diff --git a/src/lib/evas/canvas/efl_canvas_animation_scale.eo b/src/lib/evas/canvas/efl_canvas_scale_animation.eo
index 58a44f132f..d0b890a2f4 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_scale.eo
+++ b/src/lib/evas/canvas/efl_canvas_scale_animation.eo
@@ -1,4 +1,6 @@
-class Efl.Canvas.Animation_Scale extends Efl.Canvas.Animation
+import eina_types;
+
+class Efl.Canvas.Scale_Animation extends Efl.Canvas.Animation
{
[[Animated scaling effect.
@@ -13,7 +15,7 @@ class Efl.Canvas.Animation_Scale extends Efl.Canvas.Animation
@since 1.24
]]
c_prefix: efl_animation_scale;
- data: Efl_Canvas_Animation_Scale_Data;
+ data: Efl_Canvas_Scale_Animation_Data;
methods {
@property scale {
[[Scale range and pivot object.
@@ -48,7 +50,9 @@ class Efl.Canvas.Animation_Scale extends Efl.Canvas.Animation
values {
from_scale: Eina.Vector2; [[Initial scale value.]]
to_scale: Eina.Vector2; [[Ending scale value.]]
- pivot_point: Eina.Position2D; [[Position of the pivot point relative to the canvas.]]
+ pivot_point: Eina.Position2D; [[Position of the pivot point relative to the canvas.
+ If $null the target passed to @Efl.Canvas.Animation.animation_apply
+ is used as pivot element.]]
}
}
}
diff --git a/src/lib/evas/canvas/efl_canvas_scale_animation_private.h b/src/lib/evas/canvas/efl_canvas_scale_animation_private.h
new file mode 100644
index 0000000000..85363ba490
--- /dev/null
+++ b/src/lib/evas/canvas/efl_canvas_scale_animation_private.h
@@ -0,0 +1,25 @@
+#define EFL_ANIMATION_PROTECTED
+
+#include "evas_common_private.h"
+#include <Ecore.h>
+#include "efl_canvas_animation_private.h"
+
+#define EFL_SCALE_ANIMATION_DATA_GET(o, pd) \
+ Efl_Canvas_Scale_Animation_Data *pd = efl_data_scope_get(o, EFL_CANVAS_SCALE_ANIMATION_CLASS)
+
+typedef struct _Efl_Canvas_Scale_Animation_Relative_Pivot
+{
+ Efl_Canvas_Object *obj;
+ Eina_Vector2 pos;
+} Efl_Canvas_Scale_Animation_Relative_Pivot;
+
+typedef struct _Efl_Canvas_Scale_Animation_Data
+{
+ Eina_Vector2 from;
+ Eina_Vector2 to;
+
+ Eina_Position2D pos;
+ Efl_Canvas_Scale_Animation_Relative_Pivot rel_pivot;
+
+ Eina_Bool use_rel_pivot;
+} Efl_Canvas_Scale_Animation_Data;
diff --git a/src/lib/evas/canvas/efl_canvas_scene3d.c b/src/lib/evas/canvas/efl_canvas_scene3d.c
deleted file mode 100644
index 513a68ba94..0000000000
--- a/src/lib/evas/canvas/efl_canvas_scene3d.c
+++ /dev/null
@@ -1,310 +0,0 @@
-#include "evas_image_private.h"
-#include "efl_canvas_scene3d.eo.h"
-
-#define MY_CLASS EFL_CANVAS_SCENE3D_CLASS
-
-EOLIAN static void
-_efl_canvas_scene3d_scene3d_set(Eo *eo_obj, void *pd EINA_UNUSED, Evas_Canvas3D_Scene *scene)
-{
- Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
- Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
- Evas_Image_Load_Opts lo;
- int load_error;
-
- if (o->cur->scene == scene) return;
-
- evas_object_async_block(obj);
- _evas_image_init_set(NULL, NULL, eo_obj, obj, o, &lo);
- o->engine_data = ENFN->image_mmap(ENC, o->cur->f, o->cur->key, &load_error, &lo);
- o->load_error = _evas_load_error_to_efl_gfx_image_load_error(load_error);
- _evas_image_done_set(eo_obj, obj, o);
-
- if (scene) _evas_image_3d_set(eo_obj, scene);
- else _evas_image_3d_unset(eo_obj, obj, o);
-}
-
-EOLIAN static Evas_Canvas3D_Scene *
-_efl_canvas_scene3d_scene3d_get(const Eo *eo_obj, void *pd EINA_UNUSED)
-{
- Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
- return o->cur->scene;
-}
-
-void
-_evas_image_3d_render(Evas *eo_e, Evas_Object *eo_obj,
- Evas_Object_Protected_Data *obj, Evas_Image_Data *o EINA_UNUSED,
- Evas_Canvas3D_Scene *scene, void *engine, void *output)
-{
- Evas_Public_Data *e;
- Eina_Bool need_native_set = EINA_FALSE;
- Evas_Canvas3D_Scene_Public_Data scene_data;
- Evas_Canvas3D_Scene_Data *pd_scene = NULL;
-
- pd_scene = efl_data_scope_get(scene, EVAS_CANVAS3D_SCENE_CLASS);
-
- if ((pd_scene->w == 0) || (pd_scene->h == 0)) return;
- if (!pd_scene->camera_node)
- {
- WRN("Camera has not been set to scene(%p)", scene);
- return;
- }
-
- e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
-
- if (pd_scene->surface)
- {
- int w = 0;
- int h = 0;
-
- if (e->engine.func->drawable_size_get)
- {
- e->engine.func->drawable_size_get(engine,
- pd_scene->surface, &w, &h);
- }
- if ((w != pd_scene->w) || (h != pd_scene->h))
- {
- if (e->engine.func->drawable_free)
- {
- e->engine.func->drawable_free(engine,
- pd_scene->surface);
- }
- pd_scene->surface = NULL;
- need_native_set = EINA_TRUE;
- }
- }
- else
- {
- /* TODO: Hard-coded alpha on. */
- if (e->engine.func->drawable_new)
- {
- pd_scene->surface =
- e->engine.func->drawable_new(engine,
- pd_scene->w, pd_scene->h, 1);
- }
- need_native_set = EINA_TRUE;
- }
-
- EINA_COW_WRITE_BEGIN(evas_object_3d_cow, obj->data_3d, Evas_Object_3D_Data,
- data)
- {
- if (need_native_set)
- {
- if (e->engine.func->image_drawable_set)
- {
- data->surface =
- e->engine.func->image_drawable_set(engine,
- data->surface,
- pd_scene->surface);
- }
- }
- data->w = pd_scene->w;
- data->h = pd_scene->h;
- }
- EINA_COW_WRITE_END(evas_object_3d_cow, obj->data_3d, data);
-
- evas_canvas3d_scene_data_init(&scene_data);
-
- scene_data.bg_color = pd_scene->bg_color;
- scene_data.shadows_enabled = pd_scene->shadows_enabled;
- scene_data.camera_node = pd_scene->camera_node;
- scene_data.depth_offset = pd_scene->depth_offset;
- scene_data.depth_constant = pd_scene->depth_constant;
- if (evas_object_anti_alias_get(eo_obj))
- {
- /*Use post processing render*/
- scene_data.post_processing = EINA_TRUE;
- scene_data.color_pick_enabled = EINA_FALSE;
- scene_data.render_to_texture = EINA_TRUE;
- scene_data.post_processing_type = EVAS_CANVAS3D_SHADER_MODE_POST_PROCESSING_FXAA;
- }
- /* Phase 1 - Update scene graph tree. */
- evas_canvas3d_object_update(scene);
-
- /* Phase 2 - Do frustum culling and get visible model nodes. */
- evas_canvas3d_node_tree_traverse(pd_scene->root_node,
- EVAS_CANVAS3D_TREE_TRAVERSE_LEVEL_ORDER, EINA_TRUE,
- evas_canvas3d_node_mesh_collect, &scene_data);
-
- /* Phase 3 - Collect active light nodes in the scene graph tree. */
- evas_canvas3d_node_tree_traverse(pd_scene->root_node,
- EVAS_CANVAS3D_TREE_TRAVERSE_ANY_ORDER, EINA_FALSE,
- evas_canvas3d_node_light_collect, &scene_data);
-
- /* Phase 5 - Draw the scene. */
- if (e->engine.func->drawable_scene_render)
- {
- e->engine.func->drawable_scene_render(engine, output,
- pd_scene->surface, &scene_data);
- }
- /* Clean up temporary resources. */
- evas_canvas3d_scene_data_fini(&scene_data);
-}
-
-void
-_evas_image_3d_set(Evas_Object *eo_obj, Evas_Canvas3D_Scene *scene)
-{
- Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
- Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
- Evas_Canvas3D_Scene_Data *pd_scene = efl_data_scope_get(scene,
- EVAS_CANVAS3D_SCENE_CLASS);
- EINA_COW_WRITE_BEGIN(evas_object_3d_cow, obj->data_3d, Evas_Object_3D_Data,
- data)
- {
- data->surface = NULL;
- data->w = 0;
- data->h = 0;
- efl_ref(scene);
- }
- EINA_COW_WRITE_END(evas_object_3d_cow, obj->data_3d, data);
-
- EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
- {
- state_write->scene = scene;
- }
- EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
-
- pd_scene->images = eina_list_append(pd_scene->images, eo_obj);
-}
-
-void
-_evas_image_3d_unset(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj,
- Evas_Image_Data *o)
-{
- Evas_Public_Data *e;
-
- if (!o->cur->scene) return;
-
- Evas_Canvas3D_Scene_Data *pd_scene =
- efl_data_scope_get(o->cur->scene, EVAS_CANVAS3D_SCENE_CLASS);
-
- EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
- {
- pd_scene->images = eina_list_remove(pd_scene->images, eo_obj);
- efl_unref(state_write->scene);
- state_write->scene = NULL;
- }
- EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
-
- if (o->cur->defmap)
- {
- EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
- {
- evas_map_free(state_write->defmap);
- state_write->defmap = NULL;
- }
- EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
- }
-
- EINA_COW_WRITE_BEGIN(evas_object_3d_cow, obj->data_3d, Evas_Object_3D_Data,
- data)
- {
- e = obj->layer->evas;
-
- if (data->surface)
- e->engine.func->image_free(_evas_engine_context(e), data->surface);
-
- data->surface = NULL;
- data->w = 0;
- data->h = 0;
- }
- EINA_COW_WRITE_END(evas_object_3d_cow, obj->data_3d, data);
-}
-
-EOLIAN static Eina_Rw_Slice
-_efl_canvas_scene3d_efl_gfx_buffer_buffer_map(Eo *eo_obj, void *_pd EINA_UNUSED,
- Efl_Gfx_Buffer_Access_Mode mode,
- const Eina_Rect *region,
- Efl_Gfx_Colorspace cspace, int plane,
- int *stride)
-{
- Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
- Evas_Public_Data *e;
- Evas_Canvas3D_Object_Data *pd_parent;
- Evas_Canvas3D_Scene_Data *pd_scene;
- int width = -1, height = -1, ntex = -1;
- unsigned char *pixels = NULL;
- Eina_Rw_Slice slice = {};
- int x, y, w, h;
- size_t len = 0;
-
- if (!o->cur->scene)
- {
- ERR("invalid scene data");
- return slice;
- }
- if (mode & EFL_GFX_BUFFER_ACCESS_MODE_WRITE)
- {
- ERR("invalid map access mode");
- return slice;
- }
- if (cspace != EFL_GFX_COLORSPACE_ARGB8888)
- {
- ERR("invalid map colorspace. Only ARGB is supported");
- return slice;
- }
-
- pd_parent = efl_data_scope_get(o->cur->scene, EVAS_CANVAS3D_OBJECT_CLASS);
- e = efl_data_scope_get(pd_parent->evas, EVAS_CANVAS_CLASS);
- pd_scene = efl_data_scope_get(o->cur->scene, EVAS_CANVAS3D_SCENE_CLASS);
-
- if (e->engine.func->drawable_size_get)
- {
- e->engine.func->drawable_size_get(_evas_engine_context(e),
- pd_scene->surface, &width, &height);
- }
-
- if (region)
- {
- x = region->x;
- y = region->y;
- w = region->w;
- h = region->h;
- }
- else
- {
- x = y = 0;
- w = width;
- h = height;
- }
-
- if ((x < 0) || (y < 0) || (w <= 0) || (h <= 0) || ((x + w) > width) || ((y + h) > height))
- {
- ERR("Invalid map dimensions : %dx%d +%d,%d. Image is %dx%d.",
- w, h, x, y, width, height);
- return slice;
- }
-
- if (e->engine.func->drawable_texture_target_id_get)
- {
- ntex = e->engine.func->drawable_texture_target_id_get(pd_scene->surface);
-
- if (e->engine.func->drawable_texture_rendered_pixels_get)
- {
- len = w * h * sizeof(DATA32); //four component texture
- pixels = malloc(len + sizeof(slice) + 8);
- e->engine.func->drawable_texture_rendered_pixels_get(ntex, x, y, w, h,
- pd_scene->surface, pixels);
- }
- else
- return slice;
- }
- else
- return slice;
-
- if (stride) *stride = w * sizeof(DATA32);
- slice.mem = pixels;
- slice.len = len;
- DBG("map(%p, %d,%d %dx%d plane:%d) -> " EINA_SLICE_FMT,
- eo_obj, x, y, w, h, plane, EINA_SLICE_PRINT(slice));
-
- return slice;
-}
-EOLIAN static Eina_Bool
-_efl_canvas_scene3d_efl_gfx_buffer_buffer_unmap(Eo *eo_obj EINA_UNUSED, void *_pd EINA_UNUSED,
- const Eina_Rw_Slice slice)
-{
- free(slice.mem);
- return EINA_TRUE;
-}
-
-#include "efl_canvas_scene3d.eo.c"
diff --git a/src/lib/evas/canvas/efl_canvas_scene3d.eo b/src/lib/evas/canvas/efl_canvas_scene3d.eo
deleted file mode 100644
index 8d506be64c..0000000000
--- a/src/lib/evas/canvas/efl_canvas_scene3d.eo
+++ /dev/null
@@ -1,20 +0,0 @@
-class @beta Efl.Canvas.Scene3d extends Efl.Canvas.Image_Internal
-{
- [[A UI view for EFL Canvas 3D.]]
- data: null;
- methods {
- @property scene3d {
- [[The 3d scene to display in this view.
- ]]
- set {}
- get {}
- values {
- scene: Evas.Canvas3D.Scene; [[3D scene.]]
- }
- }
- }
- implements {
- Efl.Gfx.Buffer.buffer_map;
- Efl.Gfx.Buffer.buffer_unmap;
- }
-}
diff --git a/src/lib/evas/canvas/efl_canvas_animation_group_sequential.c b/src/lib/evas/canvas/efl_canvas_sequential_group_animation.c
index 26edb21355..16234471ae 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_group_sequential.c
+++ b/src/lib/evas/canvas/efl_canvas_sequential_group_animation.c
@@ -1,9 +1,9 @@
-#include "efl_canvas_animation_group_sequential_private.h"
+#include "efl_canvas_sequential_group_animation_private.h"
-#define MY_CLASS EFL_CANVAS_ANIMATION_GROUP_SEQUENTIAL_CLASS
+#define MY_CLASS EFL_CANVAS_SEQUENTIAL_GROUP_ANIMATION_CLASS
EOLIAN static double
-_efl_canvas_animation_group_sequential_efl_canvas_animation_animation_apply(Eo *eo_obj,
+_efl_canvas_sequential_group_animation_efl_canvas_animation_animation_apply(Eo *eo_obj,
void *_pd EINA_UNUSED,
double progress,
Efl_Canvas_Object *target)
@@ -58,7 +58,7 @@ _efl_canvas_animation_group_sequential_efl_canvas_animation_animation_apply(Eo *
}
EOLIAN static double
-_efl_canvas_animation_group_sequential_efl_canvas_animation_duration_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
+_efl_canvas_sequential_group_animation_efl_canvas_animation_duration_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
{
double total_duration = 0.0;
double child_total_duration;
@@ -78,4 +78,4 @@ _efl_canvas_animation_group_sequential_efl_canvas_animation_duration_get(const E
return total_duration;
}
-#include "efl_canvas_animation_group_sequential.eo.c"
+#include "efl_canvas_sequential_group_animation.eo.c"
diff --git a/src/lib/evas/canvas/efl_canvas_animation_group_sequential.eo b/src/lib/evas/canvas/efl_canvas_sequential_group_animation.eo
index 09f9e2178e..01417b4b41 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_group_sequential.eo
+++ b/src/lib/evas/canvas/efl_canvas_sequential_group_animation.eo
@@ -1,4 +1,4 @@
-class Efl.Canvas.Animation_Group_Sequential extends Efl.Canvas.Animation_Group
+class Efl.Canvas.Sequential_Group_Animation extends Efl.Canvas.Group_Animation
{
[[Combined animation which plays its individual animations in a sequential order
(one after the other).
@@ -6,7 +6,7 @@ class Efl.Canvas.Animation_Group_Sequential extends Efl.Canvas.Animation_Group
For instance, this could be used to move an @Efl.Canvas.Object from one position to another
and then start rotating it once it reaches its destination.
- Use @Efl.Canvas.Animation_Group.animation_add to append individual animations.
+ Use @Efl.Canvas.Group_Animation.animation_add to append individual animations.
Animations are played in the order in which they are added.
@since 1.24
diff --git a/src/lib/evas/canvas/efl_canvas_animation_group_sequential_private.h b/src/lib/evas/canvas/efl_canvas_sequential_group_animation_private.h
index 332e3b673c..332e3b673c 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_group_sequential_private.h
+++ b/src/lib/evas/canvas/efl_canvas_sequential_group_animation_private.h
diff --git a/src/lib/evas/canvas/efl_canvas_textblock.eo b/src/lib/evas/canvas/efl_canvas_textblock.eo
index 724103040a..b4ef328c14 100644
--- a/src/lib/evas/canvas/efl_canvas_textblock.eo
+++ b/src/lib/evas/canvas/efl_canvas_textblock.eo
@@ -1,7 +1,5 @@
-import efl_text_types;
-
-class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
- Efl.Canvas.Filter.Internal, Efl.Text.Font.Properties,
+class Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
+ Efl.Canvas.Filter.Internal, Efl.Text_Font_Properties,
Efl.Text_Style, Efl.Text_Format,
Efl.Text_Markup, Efl.Ui.I18n
{
@@ -9,9 +7,11 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
if you need user interaction consider the classes in $[Efl.Ui].
Note: No text will be rendered until a font, a font size and a font color are specified.
- This can be accomplished using @Efl.Text.Font.Properties.font_family, @Efl.Text.Font.Properties.font_size and
+ This can be accomplished using @Efl.Text_Font_Properties.font_family, @Efl.Text_Font_Properties.font_size and
@Efl.Text_Style.text_color.
Alternatively, @.style_apply can be used providing the attributes $font, $font_size and $color.
+
+ @since 1.24
]]
methods {
@property is_empty {
@@ -23,20 +23,11 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
is_empty: bool; [[$true if empty.]]
}
}
- cursor_add {
- [[Adds an existing cursor to the text object.
- If the cursor already belonged to another text object it will be reassigned to the new one.
- It is typically more convenient to obtain a cursor directly from the text object using @.cursor_create.
- ]]
- params {
- cursor: Efl.Text.Cursor; [[The text cursor to use.]]
- }
- }
cursor_create {
[[Creates a new cursor and adds it to the text object.
This cursor can be used to manipulate and iterate the content of the text object.
]]
- return: Efl.Text.Cursor @move; [[The created text cursor.]]
+ return: Efl.Text_Cursor.Object @move; [[The created text cursor.]]
}
visible_range_get {
[[Returns the currently visible range.
@@ -47,8 +38,8 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
]]
return: bool; [[$true on success.]]
params {
- @in start: Efl.Text.Cursor; [[Range start position.]]
- @in end: Efl.Text.Cursor; [[Range end position.]]
+ @in start: Efl.Text_Cursor.Object; [[Range start position.]]
+ @in end: Efl.Text_Cursor.Object; [[Range end position.]]
}
}
@property style_insets {
@@ -80,7 +71,7 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
@property newline_as_paragraph_separator {
[[When $true, the newline character will behave as a paragraph separator.
Paragraph separator equal U+2029, and new line equal U+000A.
- This will effect a lot of text behaviour like @Efl.Text.Cursor.move method.
+ This will effect a lot of text behaviour like @Efl.Text_Cursor.Object.move method.
]]
set {}
get {}
@@ -92,7 +83,7 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
[[Applies several style attributes at once using a formatting string.
Given style attributes override previous values, leaving other attributes unaffected.
This is akin to setting individual style attributes using properties like
- @Efl.Text.Font.Properties.font_slant or @Efl.Text_Format.wrap, for example.
+ @Efl.Text_Font_Properties.font_slant or @Efl.Text_Format.wrap, for example.
The formatting string is a whitespace-separated list of $[attribute=value] pairs.
@@ -101,43 +92,43 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
- $font: Name of the font to use.
Default value is empty, meaning that no text will be rendered.
Requires $font_size and $font_color.
- See @Efl.Text.Font.Properties.font_family.
+ See @Efl.Text_Font_Properties.font_family.
- $font_fallbacks: Comma-delimited list of fonts to try if finding the primary font fails.
Example: $[font_fallbacks=consolas,courier,monospace].
Default value is empty.
- See @Efl.Text.Font.Properties.font_fallbacks.
+ See @Efl.Text_Font_Properties.font_fallbacks.
- $font_size: Height of font, in points.
Default value is 0.
Requires $font and $font_color.
- See @Efl.Text.Font.Properties.font_size.
+ See @Efl.Text_Font_Properties.font_size.
- $font_source: Path to the file containing the font to use.
Example: $[font_source=/usr/share/fonts/Sans.ttf].
Default value is empty.
- See @Efl.Text.Font.Properties.font_source.
+ See @Efl.Text_Font_Properties.font_source.
- $font_weight: Thickness of the font. The value must be one of: $normal, $thin, $ultralight, $extralight,
$light, $book, $medium, $semibold, $bold, $ultrabold, $extrabold, $black and $extrablack.
Default value is $normal.
- See @Efl.Text.Font.Properties.font_weight.
+ See @Efl.Text_Font_Properties.font_weight.
- $font_style: Style of the font. The value must be one of: $normal, $oblique and $italic.
Default value is $normal.
- See @Efl.Text.Font.Properties.font_slant.
+ See @Efl.Text_Font_Properties.font_slant.
- $font_width: How wide the font is, relative to its height. The value must be one of:
$normal, $ultracondensed, $extracondensed, $condensed, $semicondensed, $semiexpanded, $expanded,
$extraexpanded and $ultraexpanded.
Default value is $normal.
- See @Efl.Text.Font.Properties.font_weight.
+ See @Efl.Text_Font_Properties.font_weight.
- $lang: A 2-letter ISO 639-1 language code, $auto (to use the system locale setting) or $none (to disable
language support).
Example: $[lang=he].
Default value is empty.
- See @Efl.Text.Font.Properties.font_lang.
+ See @Efl.Text_Font_Properties.font_lang.
- $color: Color code for the text (See bottom for the complete list of supported codes).
Default value is $[rgba(0,0,0,0)] meaning that no text will be rendered.
@@ -146,47 +137,47 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
- $underline_color: Color code for the text underline (See bottom for the complete list of supported codes).
Default value is $[rgba(0,0,0,0)] meaning that no underline will be rendered.
- Requires $underline.
+ Requires $underline_type.
See @Efl.Text_Style.text_underline_color.
- - $underline2_color: Color code for the secondary text underline (See bottom for the complete list of
- supported codes). Only valid when $[underline=double].
+ - $secondary_underline_color: Color code for the secondary text underline (See bottom for the complete list
+ of supported codes). Only valid when $[underline_type=double].
Default value is $[rgba(0,0,0,0)] meaning that secondary underline will not be rendered.
- See @Efl.Text_Style.text_underline2_color.
+ See @Efl.Text_Style.text_secondary_underline_color.
- - $underline_dash_color: Color code for the dashed underline (See bottom for the complete list of supported
- codes). Only valid when $[underline=dashed].
+ - $underline_dashed_color: Color code for the dashed underline (See bottom for the complete list of supported
+ codes). Only valid when $[underline_type=dashed].
Default value is $[rgba(0,0,0,0)] meaning that dashed underline will not be rendered.
See @Efl.Text_Style.text_underline_dashed_color.
- $outline_color: Color code for the text outline (See bottom for the complete list of supported codes).
- Only valid when the $style attribute includes an outline.
+ Only valid when the $effect_type attribute includes an outline.
Default value is $[rgba(0,0,0,0)] meaning that no outline will be rendered.
See @Efl.Text_Style.text_outline_color.
- $shadow_color: Color code for the text shadow (See bottom for the complete list of supported codes).
- Only valid when the $style attribute includes a shadow.
+ Only valid when the $effect_type attribute includes a shadow.
Default value is $[rgba(0,0,0,0)] meaning that no shadow will be rendered.
See @Efl.Text_Style.text_shadow_color.
- $glow_color: Color code for the glow component of the text (See bottom for the complete list of supported
- codes). Only valid when the $style attribute includes a glow.
+ codes). Only valid when the $effect_type attribute includes a glow.
Default value is $[rgba(0,0,0,0)] meaning that no glow will be rendered.
See @Efl.Text_Style.text_glow_color.
- - $glow2_color: Color code for the secondary (inner) glow component of the text (See bottom for the complete
- list of supported codes). Only valid when the $style attribute includes a glow.
+ - $secondary_glow_color: Color code for the secondary (inner) glow component of the text (See bottom for
+ the complete list of supported codes). Only valid when the $effect_type attribute includes a glow.
Default value is $[rgba(0,0,0,0)] meaning that only the primary $glow_color will be used.
- See @Efl.Text_Style.text_glow2_color.
+ See @Efl.Text_Style.text_secondary_glow_color.
- - $backing_color: Color code for the background of the text (See bottom for the complete list of supported
+ - $background_color: Color code for the background of the text (See bottom for the complete list of supported
codes). Use a fully transparent color to disable the background.
- Default value is $[rgba(0,0,0,0)] meaning that no backing will be rendered.
- Requires $backing.
+ Default value is $[rgba(0,0,0,0)] meaning that no background will be rendered.
+ Requires $background_type.
See @Efl.Text_Style.text_background_color.
- $strikethrough_color: Color code for the line striking through the text (See bottom for the complete list
- of supported codes). Only valid when $[strikethrough=on]
+ of supported codes). Only valid when $[strikethrough_type=single]
Default value is $[rgba(0,0,0,0)] meaning that no strike-through line will be rendered.
See @Efl.Text_Style.text_strikethrough_color.
@@ -228,66 +219,67 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
Default value is $[0].
Examples: $[right_margin=10], $[right_margin=+10], $[right_margin=reset].
- - $underline: Style of the underline. The value must be one of $off (No underlining),
- $single (A single line under the text), $on (Alias for $single), $double (Two lines under the text),
+ - $underline_type: Style of the underline. The value must be one of $none (No underlining),
+ $single (A single line under the text) , $double (Two lines under the text),
$dashed (A dashed line under the text).
- Default value is $off.
- Requires either $underline_color, $underline2_color or $underline_dash_color.
+ Default value is $none.
+ Requires either $underline_color, $secondary_underline_color or $underline_dashed_color.
See @Efl.Text_Style.text_underline_type.
- - $strikethrough: Enables crossed-out text. Possible values are $on and $off.
- Default value is $off.
+ - $strikethrough_type: Enables crossed-out text. Possible values are $single and $none.
+ Default value is $none.
Requires $strikethrough_color.
See @Efl.Text_Style.text_strikethrough_type.
- - $backing: Enables background color for the text. Possible values are $on and $off.
- Default value is $off.
- Requires $backing_color.
+ - $background_type: Enables background color for the text. Possible values are $solid and $none.
+ Default value is $none.
+ Requires $background_color.
See @Efl.Text_Style.text_background_type.
- - $style: Controls a number of decorations around the text, like shadow, outline and glow, including
- combinations of them. Possible values are $plain (No decoration, alias for $off and $none),
+ - $effect_type: Controls a number of decorations around the text, like shadow, outline and glow, including
+ combinations of them. Possible values are $none (No decoration),
$shadow, $outline, $soft_outline, $outline_shadow, $outline_soft_shadow, $glow (alias for $soft_outline),
$far_shadow, $soft_shadow and $far_soft_shadow.
- All values involving a shadow accept a second parameter, separated by a comma, to indicate the shadow
- direction. Valid positions are $bottom_right, $bottom, $bottom_left, $left, $top_left, $top, $top_right
- and $right.
- Default value is $plain.
+ Default value is $none.
Requires either $shadow_color, $glow_color or $outline_color.
- Examples: $[style=outline], $[style=shadow,bottom_right], $[style=outline_shadow,bottom].
- See @Efl.Text_Style.text_effect_type and @Efl.Text_Style.text_shadow_direction.
+ See @Efl.Text_Style.text_effect_type
- - $tabstops: Size (in pixels) of the tab character. The value must be a number greater than one.
+ - $shadow_direction: Indicate the shadow direction. Valid positions are $bottom_right, $bottom, $bottom_left, $left, $top_left, $top, $top_right
+ and $right.
+ Requires either $effect_type.
+ See @Efl.Text_Style.text_shadow_direction.
+
+ - $tab_stops: Size (in pixels) of the tab character. The value must be a number greater than one.
Default value is $[32].
See @Efl.Text_Format.tab_stops.
- - $linesize: Distance (in pixels) from the baseline of one line of text to the next. This is, a value of
+ - $line_size: Distance (in pixels) from the baseline of one line of text to the next. This is, a value of
$[0] would render all lines on top of each other (However, this value will be ignored if it results in
overlapping lines of text).
- Setting this value sets $linerelsize to $[0%] (disables it).
+ Setting this value sets $line_rel_size to $[0%] (disables it).
Default value is $[0].
- - $linerelsize: Distance (in percentage over the natural line height) from the baseline of one line of
+ - $line_rel_size: Distance (in percentage over the natural line height) from the baseline of one line of
text to the next. A value of $[100%] does not have any impact, smaller values render lines closer together
and bigger values render them further apart.
- Setting this value sets $linesize to $[0] (disables it).
+ Setting this value sets $line_size to $[0] (disables it).
Default value is $[0%].
- - $linegap: Additional empty space (in pixels) between the bottom of one line of text and the top of the
- next. Setting this value sets $linerelgap to $[0%] (disables it).
+ - $line_gap: Additional empty space (in pixels) between the bottom of one line of text and the top of the
+ next. Setting this value sets $line_rel_gap to $[0%] (disables it).
Default value is $[0].
See @Efl.Text_Format.line_gap.
- - $linerelgap: Additional empty space (in percentage over the natural line height) between the bottom of
+ - $line_rel_gap: Additional empty space (in percentage over the natural line height) between the bottom of
one line of text and the top of the next.
- Setting this value sets $linegap to $[0] (disables it).
+ Setting this value sets $line_gap to $[0] (disables it).
Default value is $[0%].
See @Efl.Text_Format.line_rel_gap.
- - $linefill: An alternate way to specify the $linesize as a percentage of the canvas height.
+ - $line_fill: An alternate way to specify the $line_size as a percentage of the canvas height.
A value of $[100%] means that a single line fills the canvas, whereas $[25%] means that 4 lines
fit in the same height.
- When both $linefill and $linesize are specified the one resulting in the smallest line size is used.
+ When both $line_fill and $line_size are specified the one resulting in the smallest line size is used.
Default value is $[0].
- $ellipsis: Controls automatic addition of ellipsis "..." to replace text which cannot be shown.
@@ -312,15 +304,15 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
Examples: $[replacement_char=*].
See @Efl.Text_Format.replacement_char.
- - $underline_dash_width: Length (in pixels) of the dashes when $underline is $dashed.
+ - $underline_dashed_width: Length (in pixels) of the dashes when $underline_type is $dashed.
Default value is $[6].
See @Efl.Text_Style.text_underline_dashed_width.
- - $underline_dash_gap: Length (in pixels) of the gaps between the dashes when $underline is $dashed.
+ - $underline_dashed_gap: Length (in pixels) of the gaps between the dashes when $underline_type is $dashed.
Default value is $[2].
See @Efl.Text_Style.text_underline_dashed_gap.
- - $underline_height: Width (in pixels) of the single underline when $underline is $single.
+ - $underline_height: Width (in pixels) of the single underline when $underline_type is $single.
Default value is $[1].
See @Efl.Text_Style.text_underline_height.
@@ -340,7 +332,7 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
@property all_styles {
[[A string representing the complete set of attributes applied to this text object.
This includes the default attributes plus any additional style applied with @.style_apply
- or individual style properties like @Efl.Text.Font.Properties.font_slant or @Efl.Text_Format.wrap.
+ or individual style properties like @Efl.Text_Font_Properties.font_slant or @Efl.Text_Format.wrap.
See @.style_apply for the description of all attributes.
]]
@@ -363,6 +355,10 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
size after wrapping text according to the size restrictions of the
object.
+ The formatted width and height do not include padding size.
+ To get the total size of text with style, you need to query padding size
+ from @.style_insets.
+
For example a text block containing the text:
"You shall not pass!" with no margins or padding and assuming
a monospace font and a size of 7x10 char widths (for simplicity)
@@ -386,6 +382,10 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
size after wrapping text according to the size restrictions of the
object.
+ The native width and height do not include padding size.
+ To get the total size of text with style, you need to query padding size
+ from @.style_insets.
+
For example a text block containing the text:
"You shall not pass!" with no margins or padding and assuming
a monospace font and a size of 7x10 char widths (for simplicity)
@@ -397,8 +397,8 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
}
}
// Obstacles
- obstacle_add {
- [[Add obstacle evas object $eo_obs to be observed during layout
+ obstacle_add @beta {
+ [[Add obstacle object $eo_obs to be avoided during layout
of text.
The textblock does the layout of the text according to the
@@ -409,7 +409,7 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
}
return: bool; [[$true on success.]]
}
- obstacle_del {
+ obstacle_del @beta {
[[Removes $eo_obs from observation during text layout.
]]
params {
@@ -417,7 +417,7 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
}
return: bool; [[$true on success.]]
}
- obstacles_update {
+ obstacles_update @beta {
[[Triggers for relayout due to obstacles' state change.
The obstacles alone don't affect the layout, until this is
@@ -455,15 +455,15 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
Efl.Canvas.Filter.Internal.filter_dirty;
Efl.Canvas.Filter.Internal.filter_input_render;
Efl.Canvas.Filter.Internal.filter_state_prepare;
- Efl.Text.Font.Properties.font_family { get; set; }
- Efl.Text.Font.Properties.font_size { get; set; }
- Efl.Text.Font.Properties.font_source { get; set; }
- Efl.Text.Font.Properties.font_fallbacks { get; set; }
- Efl.Text.Font.Properties.font_lang { get; set; }
- Efl.Text.Font.Properties.font_weight { get; set; }
- Efl.Text.Font.Properties.font_slant { get; set; }
- Efl.Text.Font.Properties.font_width { get; set; }
- Efl.Text.Font.Properties.font_bitmap_scalable { get; set; }
+ Efl.Text_Font_Properties.font_family { get; set; }
+ Efl.Text_Font_Properties.font_size { get; set; }
+ Efl.Text_Font_Properties.font_source { get; set; }
+ Efl.Text_Font_Properties.font_fallbacks { get; set; }
+ Efl.Text_Font_Properties.font_lang { get; set; }
+ Efl.Text_Font_Properties.font_weight { get; set; }
+ Efl.Text_Font_Properties.font_slant { get; set; }
+ Efl.Text_Font_Properties.font_width { get; set; }
+ Efl.Text_Font_Properties.font_bitmap_scalable { get; set; }
Efl.Text_Style.text_color { get; set; }
Efl.Text_Style.text_background_type { get; set; }
Efl.Text_Style.text_background_color { get; set; }
@@ -473,7 +473,7 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
Efl.Text_Style.text_underline_dashed_color { get; set; }
Efl.Text_Style.text_underline_dashed_width { get; set; }
Efl.Text_Style.text_underline_dashed_gap { get; set; }
- Efl.Text_Style.text_underline2_color { get; set; }
+ Efl.Text_Style.text_secondary_underline_color { get; set; }
Efl.Text_Style.text_strikethrough_type { get; set; }
Efl.Text_Style.text_strikethrough_color { get; set; }
Efl.Text_Style.text_effect_type { get; set; }
@@ -481,7 +481,7 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
Efl.Text_Style.text_shadow_direction { get; set; }
Efl.Text_Style.text_shadow_color { get; set; }
Efl.Text_Style.text_glow_color { get; set; }
- Efl.Text_Style.text_glow2_color { get; set; }
+ Efl.Text_Style.text_secondary_glow_color { get; set; }
Efl.Text_Style.text_gfx_filter { get; set; }
Efl.Text_Format.ellipsis { get; set; }
Efl.Text_Format.wrap { get; set; }
diff --git a/src/lib/evas/canvas/efl_canvas_textblock_eo.legacy.c b/src/lib/evas/canvas/efl_canvas_textblock_eo.legacy.c
index 26c9341695..d5a63999aa 100644
--- a/src/lib/evas/canvas/efl_canvas_textblock_eo.legacy.c
+++ b/src/lib/evas/canvas/efl_canvas_textblock_eo.legacy.c
@@ -1,41 +1,41 @@
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_textblock_visible_range_get(Efl_Canvas_Textblock *obj EINA_UNUSED, Efl_Text_Cursor_Handle *start, Efl_Text_Cursor_Handle *end)
{
return evas_textblock_cursor_visible_range_get(start, end);
}
-EAPI void
+EVAS_API void
evas_object_textblock_style_insets_get(const Efl_Canvas_Textblock *obj, int *l, int *r, int *t, int *b)
{
efl_canvas_textblock_style_insets_get(obj, l, r, t, b);
}
-EAPI void
+EVAS_API void
evas_object_textblock_bidi_delimiters_set(Efl_Canvas_Textblock *obj, const char *delim)
{
efl_canvas_textblock_bidi_delimiters_set(obj, delim);
}
-EAPI const char *
+EVAS_API const char *
evas_object_textblock_bidi_delimiters_get(const Efl_Canvas_Textblock *obj)
{
return efl_canvas_textblock_bidi_delimiters_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_textblock_legacy_newline_set(Efl_Canvas_Textblock *obj, Eina_Bool mode)
{
efl_canvas_textblock_newline_as_paragraph_separator_set(obj, mode);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_textblock_legacy_newline_get(const Efl_Canvas_Textblock *obj)
{
return efl_canvas_textblock_newline_as_paragraph_separator_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_textblock_size_formatted_get(const Efl_Canvas_Textblock *obj, int *w, int *h)
{
Eina_Size2D size;
@@ -44,7 +44,7 @@ evas_object_textblock_size_formatted_get(const Efl_Canvas_Textblock *obj, int *w
if (h) *h = size.h;
}
-EAPI void
+EVAS_API void
evas_object_textblock_size_native_get(const Efl_Canvas_Textblock *obj, int *w, int *h)
{
Eina_Size2D size;
@@ -53,19 +53,19 @@ evas_object_textblock_size_native_get(const Efl_Canvas_Textblock *obj, int *w, i
if (h) *h = size.h;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_textblock_obstacle_add(Efl_Canvas_Textblock *obj, Efl_Canvas_Object *eo_obs)
{
return efl_canvas_textblock_obstacle_add(obj, eo_obs);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_textblock_obstacle_del(Efl_Canvas_Textblock *obj, Efl_Canvas_Object *eo_obs)
{
return efl_canvas_textblock_obstacle_del(obj, eo_obs);
}
-EAPI void
+EVAS_API void
evas_object_textblock_obstacles_update(Efl_Canvas_Textblock *obj)
{
efl_canvas_textblock_obstacles_update(obj);
diff --git a/src/lib/evas/canvas/efl_canvas_textblock_eo.legacy.h b/src/lib/evas/canvas/efl_canvas_textblock_eo.legacy.h
index 6b33674194..e4b903ec78 100644
--- a/src/lib/evas/canvas/efl_canvas_textblock_eo.legacy.h
+++ b/src/lib/evas/canvas/efl_canvas_textblock_eo.legacy.h
@@ -5,6 +5,7 @@
#define _EFL_CANVAS_TEXTBLOCK_EO_CLASS_TYPE
typedef Eo Efl_Canvas_Textblock;
+typedef Efl_Canvas_Textblock Efl_Canvas_Text;
#endif
@@ -32,7 +33,7 @@ typedef Eo Efl_Canvas_Textblock;
*
* @ingroup Evas_Object_Textblock_Group
*/
-EAPI Eina_Bool evas_object_textblock_visible_range_get(Efl_Canvas_Textblock *obj, Efl_Text_Cursor_Handle *start, Efl_Text_Cursor_Handle *end);
+EVAS_API Eina_Bool evas_object_textblock_visible_range_get(Efl_Canvas_Textblock *obj, Efl_Text_Cursor_Handle *start, Efl_Text_Cursor_Handle *end);
/**
* @brief Gets the left, right, top and bottom insets of the text.
@@ -49,7 +50,7 @@ EAPI Eina_Bool evas_object_textblock_visible_range_get(Efl_Canvas_Textblock *obj
*
* @ingroup Evas_Object_Textblock_Group
*/
-EAPI void evas_object_textblock_style_insets_get(const Efl_Canvas_Textblock *obj, int *left, int *right, int *top, int *bottom);
+EVAS_API void evas_object_textblock_style_insets_get(const Efl_Canvas_Textblock *obj, int *left, int *right, int *top, int *bottom);
/**
* @brief BiDi delimiters are used for in-paragraph separation of bidi
@@ -64,7 +65,7 @@ EAPI void evas_object_textblock_style_insets_get(const Efl_Canvas_Textblock *obj
*
* @ingroup Evas_Object_Textblock_Group
*/
-EAPI void evas_object_textblock_bidi_delimiters_set(Efl_Canvas_Textblock *obj, const char *delim);
+EVAS_API void evas_object_textblock_bidi_delimiters_set(Efl_Canvas_Textblock *obj, const char *delim);
/**
* @brief BiDi delimiters are used for in-paragraph separation of bidi
@@ -79,7 +80,7 @@ EAPI void evas_object_textblock_bidi_delimiters_set(Efl_Canvas_Textblock *obj, c
*
* @ingroup Evas_Object_Textblock_Group
*/
-EAPI const char *evas_object_textblock_bidi_delimiters_get(const Efl_Canvas_Textblock *obj);
+EVAS_API const char *evas_object_textblock_bidi_delimiters_get(const Efl_Canvas_Textblock *obj);
/**
* @brief When @c true, newline character will behave as a paragraph separator.
@@ -91,7 +92,7 @@ EAPI const char *evas_object_textblock_bidi_delimiters_get(const Efl_Canvas_Text
*
* @ingroup Evas_Object_Textblock_Group
*/
-EAPI void evas_object_textblock_legacy_newline_set(Efl_Canvas_Textblock *obj, Eina_Bool mode);
+EVAS_API void evas_object_textblock_legacy_newline_set(Efl_Canvas_Textblock *obj, Eina_Bool mode);
/**
* @brief When @c true, newline character will behave as a paragraph separator.
@@ -104,7 +105,7 @@ EAPI void evas_object_textblock_legacy_newline_set(Efl_Canvas_Textblock *obj, Ei
*
* @ingroup Evas_Object_Textblock_Group
*/
-EAPI Eina_Bool evas_object_textblock_legacy_newline_get(const Efl_Canvas_Textblock *obj);
+EVAS_API Eina_Bool evas_object_textblock_legacy_newline_get(const Efl_Canvas_Textblock *obj);
@@ -133,7 +134,7 @@ EAPI Eina_Bool evas_object_textblock_legacy_newline_get(const Efl_Canvas_Textblo
*
* @ingroup Evas_Object_Textblock_Group
*/
-EAPI void evas_object_textblock_size_formatted_get(const Efl_Canvas_Textblock *obj, int *width, int *height);
+EVAS_API void evas_object_textblock_size_formatted_get(const Efl_Canvas_Textblock *obj, int *width, int *height);
/**
* @brief The native width and height.
@@ -161,7 +162,7 @@ EAPI void evas_object_textblock_size_formatted_get(const Efl_Canvas_Textblock *o
*
* @ingroup Evas_Object_Textblock_Group
*/
-EAPI void evas_object_textblock_size_native_get(const Efl_Canvas_Textblock *obj, int *width, int *height);
+EVAS_API void evas_object_textblock_size_native_get(const Efl_Canvas_Textblock *obj, int *width, int *height);
@@ -183,7 +184,7 @@ EAPI void evas_object_textblock_size_native_get(const Efl_Canvas_Textblock *obj,
*
* @ingroup Evas_Object_Textblock_Group
*/
-EAPI Eina_Bool evas_object_textblock_obstacle_add(Efl_Canvas_Textblock *obj, Efl_Canvas_Object *eo_obs);
+EVAS_API Eina_Bool evas_object_textblock_obstacle_add(Efl_Canvas_Textblock *obj, Efl_Canvas_Object *eo_obs);
/**
* @brief Removes @c eo_obs from observation during text layout.
@@ -197,7 +198,7 @@ EAPI Eina_Bool evas_object_textblock_obstacle_add(Efl_Canvas_Textblock *obj, Efl
*
* @ingroup Evas_Object_Textblock_Group
*/
-EAPI Eina_Bool evas_object_textblock_obstacle_del(Efl_Canvas_Textblock *obj, Efl_Canvas_Object *eo_obs);
+EVAS_API Eina_Bool evas_object_textblock_obstacle_del(Efl_Canvas_Textblock *obj, Efl_Canvas_Object *eo_obs);
/**
* @brief Triggers for relayout due to obstacles' state change.
@@ -216,7 +217,7 @@ EAPI Eina_Bool evas_object_textblock_obstacle_del(Efl_Canvas_Textblock *obj, Efl
*
* @ingroup Evas_Object_Textblock_Group
*/
-EAPI void evas_object_textblock_obstacles_update(Efl_Canvas_Textblock *obj);
+EVAS_API void evas_object_textblock_obstacles_update(Efl_Canvas_Textblock *obj);
#endif
diff --git a/src/lib/evas/canvas/efl_canvas_textblock_internal.h b/src/lib/evas/canvas/efl_canvas_textblock_internal.h
index a4f03fcef8..3db3e7ab17 100644
--- a/src/lib/evas/canvas/efl_canvas_textblock_internal.h
+++ b/src/lib/evas/canvas/efl_canvas_textblock_internal.h
@@ -257,31 +257,7 @@ _evas_textblock_annotations_node_format_remove(Evas_Object *o, Evas_Object_Textb
void
_evas_textblock_relayout_if_needed(Evas_Object *o);
-#ifdef EAPI
-# undef EAPI
-#endif
-
-#ifdef _WIN32
-# ifdef EFL_BUILD
-# ifdef DLL_EXPORT
-# define EAPI __declspec(dllexport)
-# else
-# define EAPI
-# endif
-# else
-# define EAPI __declspec(dllimport)
-# endif
-#else
-# ifdef __GNUC__
-# if __GNUC__ >= 4
-# define EAPI __attribute__ ((visibility("default")))
-# else
-# define EAPI
-# endif
-# else
-# define EAPI
-# endif
-#endif
+#include <evas_api.h>
/**
* Internally sets given text_object into cursor object.
@@ -290,7 +266,15 @@ _evas_textblock_relayout_if_needed(Evas_Object *o);
* @param canvas_text_obj the canvas text object, where cursor methods will take effect.
* @param text_obj the text_object that user can get using cursor text_object property.
*/
-EAPI void efl_text_cursor_text_object_set(Eo *cursor, Eo *canvas_text_obj, Eo *text_obj);
+EVAS_API void efl_text_cursor_object_text_object_set(Eo *cursor, Eo *canvas_text_obj, Eo *text_obj);
+
+
+/**
+ * Internally create instance of cursor object.
+ *
+ * @param parent the parent of the cursor object.
+ */
+EVAS_API Eo* efl_text_cursor_object_create(Eo *parent);
/**
@@ -299,7 +283,7 @@ EAPI void efl_text_cursor_text_object_set(Eo *cursor, Eo *canvas_text_obj, Eo *t
* @param obj the cursor object.
* @param handle the text cursor handle.
*/
-EAPI void efl_text_cursor_handle_set(Eo *obj, Efl_Text_Cursor_Handle *handle);
+EVAS_API void efl_text_cursor_object_handle_set(Eo *obj, Efl_Text_Cursor_Handle *handle);
/**
* Internally gets cursor handle(legacy textblock cursor) from cursor object.
@@ -307,9 +291,6 @@ EAPI void efl_text_cursor_handle_set(Eo *obj, Efl_Text_Cursor_Handle *handle);
* @param obj the cursor object.
* @return the internal text cursor handle.
*/
-EAPI Efl_Text_Cursor_Handle *efl_text_cursor_handle_get(const Eo *obj);
-
-#undef EAPI
-#define EAPI
+EVAS_API Efl_Text_Cursor_Handle *efl_text_cursor_object_handle_get(const Eo *obj);
#endif//#ifndef _EFL_CANVAS_TEXTBLOCK_INTERNAL_H
diff --git a/src/lib/evas/canvas/efl_canvas_animation_translate.c b/src/lib/evas/canvas/efl_canvas_translate_animation.c
index 1a98daa60d..51e22d5446 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_translate.c
+++ b/src/lib/evas/canvas/efl_canvas_translate_animation.c
@@ -1,6 +1,6 @@
-#include "efl_canvas_animation_translate_private.h"
+#include "efl_canvas_translate_animation_private.h"
-#define MY_CLASS EFL_CANVAS_ANIMATION_TRANSLATE_CLASS
+#define MY_CLASS EFL_CANVAS_TRANSLATE_ANIMATION_CLASS
typedef struct __Translate_Property_Double
{
@@ -9,8 +9,8 @@ typedef struct __Translate_Property_Double
} _Translate_Property_Double;
EOLIAN static void
-_efl_canvas_animation_translate_translate_set(Eo *eo_obj EINA_UNUSED,
- Efl_Canvas_Animation_Translate_Data *pd,
+_efl_canvas_translate_animation_translate_set(Eo *eo_obj EINA_UNUSED,
+ Efl_Canvas_Translate_Animation_Data *pd,
Eina_Position2D from,
Eina_Position2D to)
{
@@ -22,8 +22,8 @@ _efl_canvas_animation_translate_translate_set(Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
-_efl_canvas_animation_translate_translate_get(const Eo *eo_obj EINA_UNUSED,
- Efl_Canvas_Animation_Translate_Data *pd,
+_efl_canvas_translate_animation_translate_get(const Eo *eo_obj EINA_UNUSED,
+ Efl_Canvas_Translate_Animation_Data *pd,
Eina_Position2D *from,
Eina_Position2D *to)
{
@@ -41,8 +41,8 @@ _efl_canvas_animation_translate_translate_get(const Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
-_efl_canvas_animation_translate_translate_absolute_set(Eo *eo_obj EINA_UNUSED,
- Efl_Canvas_Animation_Translate_Data *pd,
+_efl_canvas_translate_animation_translate_absolute_set(Eo *eo_obj EINA_UNUSED,
+ Efl_Canvas_Translate_Animation_Data *pd,
Eina_Position2D from,
Eina_Position2D to)
{
@@ -54,8 +54,8 @@ _efl_canvas_animation_translate_translate_absolute_set(Eo *eo_obj EINA_UNUSED,
}
EOLIAN static void
-_efl_canvas_animation_translate_translate_absolute_get(const Eo *eo_obj EINA_UNUSED,
- Efl_Canvas_Animation_Translate_Data *pd,
+_efl_canvas_translate_animation_translate_absolute_get(const Eo *eo_obj EINA_UNUSED,
+ Efl_Canvas_Translate_Animation_Data *pd,
Eina_Position2D *from,
Eina_Position2D *to)
{
@@ -73,8 +73,8 @@ _efl_canvas_animation_translate_translate_absolute_get(const Eo *eo_obj EINA_UNU
}
EOLIAN static double
-_efl_canvas_animation_translate_efl_canvas_animation_animation_apply(Eo *eo_obj,
- Efl_Canvas_Animation_Translate_Data *pd,
+_efl_canvas_translate_animation_efl_canvas_animation_animation_apply(Eo *eo_obj,
+ Efl_Canvas_Translate_Animation_Data *pd,
double progress,
Efl_Canvas_Object *target)
{
@@ -102,8 +102,8 @@ _efl_canvas_animation_translate_efl_canvas_animation_animation_apply(Eo *eo_obj,
}
EOLIAN static Efl_Object *
-_efl_canvas_animation_translate_efl_object_constructor(Eo *eo_obj,
- Efl_Canvas_Animation_Translate_Data *pd)
+_efl_canvas_translate_animation_efl_object_constructor(Eo *eo_obj,
+ Efl_Canvas_Translate_Animation_Data *pd)
{
eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
@@ -115,4 +115,4 @@ _efl_canvas_animation_translate_efl_object_constructor(Eo *eo_obj,
return eo_obj;
}
-#include "efl_canvas_animation_translate.eo.c"
+#include "efl_canvas_translate_animation.eo.c"
diff --git a/src/lib/evas/canvas/efl_canvas_animation_translate.eo b/src/lib/evas/canvas/efl_canvas_translate_animation.eo
index fdb3883156..23e9fe09b8 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_translate.eo
+++ b/src/lib/evas/canvas/efl_canvas_translate_animation.eo
@@ -1,4 +1,6 @@
-class Efl.Canvas.Animation_Translate extends Efl.Canvas.Animation
+import eina_types;
+
+class Efl.Canvas.Translate_Animation extends Efl.Canvas.Animation
{
[[Animated translation effect.
@@ -12,7 +14,7 @@ class Efl.Canvas.Animation_Translate extends Efl.Canvas.Animation
@since 1.24
]]
c_prefix: efl_animation_translate;
- data: Efl_Canvas_Animation_Translate_Data;
+ data: Efl_Canvas_Translate_Animation_Data;
methods {
@property translate {
[[Translation vector, relative to the starting position of the object.
diff --git a/src/lib/evas/canvas/efl_canvas_translate_animation_private.h b/src/lib/evas/canvas/efl_canvas_translate_animation_private.h
new file mode 100644
index 0000000000..ba67bb2b9d
--- /dev/null
+++ b/src/lib/evas/canvas/efl_canvas_translate_animation_private.h
@@ -0,0 +1,16 @@
+#define EFL_ANIMATION_PROTECTED
+
+#include "evas_common_private.h"
+#include <Ecore.h>
+#include "efl_canvas_animation_private.h"
+
+#define EFL_TRANSLATE_ANIMATION_DATA_GET(o, pd) \
+ Efl_Canvas_Translate_Animation_Data *pd = efl_data_scope_get(o, EFL_CANVAS_TRANSLATE_ANIMATION_CLASS)
+
+typedef struct _Efl_Canvas_Translate_Animation_Data
+{
+ Eina_Position2D from;
+ Eina_Position2D to;
+
+ Eina_Bool use_rel_move;
+} Efl_Canvas_Translate_Animation_Data;
diff --git a/src/lib/evas/canvas/efl_canvas_vg_container.c b/src/lib/evas/canvas/efl_canvas_vg_container.c
index 9c7061b010..4ba1d96bfe 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_container.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_container.c
@@ -192,6 +192,14 @@ _efl_canvas_vg_container_render_pre(Evas_Object_Protected_Data *vg_pd,
ptransform, ctransform, p_opacity, c_a, comp, comp_method);
}
+ //If the container has transparency, it internally alpha blends with ector buffer.
+ //So ector buffer must be created synchronously.
+ if (c_a < 255 && vg_pd && vg_pd->object)
+ {
+ Efl_Canvas_Vg_Object_Data *od = efl_data_scope_get(vg_pd->object, EFL_CANVAS_VG_OBJECT_CLASS);
+ od->sync_render = EINA_TRUE;
+ }
+
EINA_LIST_FOREACH(pd->children, l, child)
{
//Don't need to update composite nodes.
@@ -212,6 +220,13 @@ _efl_canvas_vg_container_render_pre(Evas_Object_Protected_Data *vg_pd,
if (flag & EFL_GFX_CHANGE_FLAG_MATRIX)
child_nd->flags |= EFL_GFX_CHANGE_FLAG_MATRIX;
+ // Note: If Vg.Container has transparency, this is calculated by _evas_vg_render in Efl.Canvas.Vg.Object.
+ // Therefore, there is no need to propagate the transparency of the container to the child.
+ // However, if there is a composition target, the child must refer to the parent's opacity.
+ // Because _evas_vg_render does not support opacity calculation for containers that need to be composited.
+ // These things need to be refactored in a better way later.
+ c_a = !comp ? 255 : c_a;
+
_evas_vg_render_pre(vg_pd, child,
engine, output, context, surface,
ctransform, c_a, comp, comp_method);
@@ -273,15 +288,46 @@ _efl_canvas_vg_container_efl_gfx_path_bounds_get(const Eo *obj EINA_UNUSED,
EINA_LIST_FOREACH(pd->children, l, child)
{
+ Eina_Position2D pos = efl_gfx_entity_position_get(child);
+ double miterlimit = 0.0, stroke_gap = 0.0;
+ if (efl_isa(child, EFL_CANVAS_VG_SHAPE_CLASS))
+ {
+ miterlimit = efl_gfx_shape_stroke_miterlimit_get(child);
+ stroke_gap = efl_gfx_shape_stroke_width_get(child) * (miterlimit <= 0 ? 1 : miterlimit);
+ }
if (first)
{
efl_gfx_path_bounds_get(child, r);
- first = EINA_FALSE;
+ if (r->size.w != 0 && r->size.h != 0)
+ {
+ r->pos.x += pos.x;
+ r->pos.y += pos.y;
+ if (stroke_gap > 1.0)
+ {
+ r->pos.x -= (int)(stroke_gap/2.0);
+ r->pos.y -= (int)(stroke_gap/2.0);
+ r->size.w += (int)(stroke_gap);
+ r->size.h += (int)(stroke_gap);
+ }
+ first = EINA_FALSE;
+ }
}
else
{
efl_gfx_path_bounds_get(child, &s);
- eina_rectangle_union(&r->rect, &s.rect);
+ if (s.size.w != 0 && s.size.h != 0)
+ {
+ s.pos.x += pos.x;
+ s.pos.y += pos.y;
+ if (stroke_gap > 1.0)
+ {
+ s.pos.x -= (int)(stroke_gap/2.0);
+ s.pos.y -= (int)(stroke_gap/2.0);
+ s.size.w += (int)(stroke_gap);
+ s.size.h += (int)(stroke_gap);
+ }
+ eina_rectangle_union(&r->rect, &s.rect);
+ }
}
}
}
@@ -304,6 +350,12 @@ _efl_canvas_vg_container_children_get(Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Contain
return eina_list_iterator_new(pd->children);
}
+static const Eina_List *
+_efl_canvas_vg_container_children_direct_get(Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Container_Data *pd)
+{
+ return pd->children;
+}
+
static Eina_Bool
_efl_canvas_vg_container_efl_gfx_path_interpolate(Eo *obj, Efl_Canvas_Vg_Container_Data *pd, const Efl_VG *from, const Efl_VG *to, double pos_map)
{
@@ -475,12 +527,16 @@ efl_canvas_vg_container_blend_buffer_clear(Efl_VG *obj EINA_UNUSED, Efl_Canvas_V
cd->blend.buffer = NULL;
}
-EAPI Efl_VG*
-evas_vg_container_add(Efl_VG *parent)
+EVAS_API Evas_Vg_Container *
+evas_vg_container_add(Evas_Object *parent)
{
/* Warn it because the usage has been changed.
We can remove this message after v1.21. */
- if (!parent) CRI("Efl_VG Container doesn't allow null parent!");
+ if (!parent)
+ {
+ ERR("Efl_VG Container doesn't allow null parent!");
+ return NULL;
+ }
return efl_add(MY_CLASS, parent);
}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_container.eo b/src/lib/evas/canvas/efl_canvas_vg_container.eo
index 0290cf4848..6865ecdd24 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_container.eo
+++ b/src/lib/evas/canvas/efl_canvas_vg_container.eo
@@ -13,6 +13,10 @@ class @beta Efl.Canvas.Vg.Container extends Efl.Canvas.Vg.Node
[[Get all children of container]]
return: iterator<Efl.Canvas.Vg.Node> @move @no_unused; [[Iterator to children]]
}
+ children_direct_get {
+ [[Get all children of container]]
+ return: const(list<Efl.Canvas.Vg.Node>) @no_unused; [[List to children]]
+ }
}
implements {
Efl.Object.constructor;
diff --git a/src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.c b/src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.c
index a31fc33d44..5928ac17ee 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.c
@@ -1,12 +1,12 @@
-EAPI Efl_Canvas_Vg_Node *
-evas_vg_container_child_get(Efl_Canvas_Vg_Container *obj, const char *name)
+EVAS_API Evas_Vg_Node *
+evas_vg_container_child_get(Evas_Vg_Container *obj, const char *name)
{
return efl_canvas_vg_container_child_get(obj, name);
}
-EAPI Eina_Iterator *
-evas_vg_container_children_get(Efl_Canvas_Vg_Container *obj)
+EVAS_API Eina_Iterator *
+evas_vg_container_children_get(Evas_Vg_Container *obj)
{
return efl_canvas_vg_container_children_get(obj);
}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.h b/src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.h
index 691a93b3c4..235462a987 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.h
+++ b/src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.h
@@ -1,40 +1,44 @@
-#ifndef _EFL_CANVAS_VG_CONTAINER_EO_LEGACY_H_
-#define _EFL_CANVAS_VG_CONTAINER_EO_LEGACY_H_
+#ifndef _EVAS_VG_CONTAINER_EO_LEGACY_H_
+#define _EVAS_VG_CONTAINER_EO_LEGACY_H_
-#ifndef _EFL_CANVAS_VG_CONTAINER_EO_CLASS_TYPE
-#define _EFL_CANVAS_VG_CONTAINER_EO_CLASS_TYPE
+#ifndef _EVAS_VG_CONTAINER_EO_CLASS_TYPE
+#define _EVAS_VG_CONTAINER_EO_CLASS_TYPE
-typedef Eo Efl_Canvas_Vg_Container;
+typedef Eo Evas_Vg_Container;
#endif
-#ifndef _EFL_CANVAS_VG_CONTAINER_EO_TYPES
-#define _EFL_CANVAS_VG_CONTAINER_EO_TYPES
+#ifndef _EVAS_VG_CONTAINER_EO_TYPES
+#define _EVAS_VG_CONTAINER_EO_TYPES
#endif
/**
- * @brief Get child of container
+ * @brief Get child of container.
*
* @param[in] obj The object.
- * @param[in] name Child node name
+ * @param[in] name The Child node name.
*
- * @return Child object
+ * @return The child object.
+ *
+ * @since 1.24
*
* @ingroup Evas_Vg_Container_Group
*/
-EAPI Efl_Canvas_Vg_Node *evas_vg_container_child_get(Efl_Canvas_Vg_Container *obj, const char *name);
+EVAS_API Evas_Vg_Node *evas_vg_container_child_get(Evas_Vg_Container *obj, const char *name);
/**
- * @brief Get all children of container
+ * @brief Get all children of container.
*
* @param[in] obj The object.
*
- * @return Iterator to children
+ * @return The iterator to children.
+ *
+ * @since 1.24
*
* @ingroup Evas_Vg_Container_Group
*/
-EAPI Eina_Iterator *evas_vg_container_children_get(Efl_Canvas_Vg_Container *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Eina_Iterator *evas_vg_container_children_get(Evas_Vg_Container *obj) EINA_WARN_UNUSED_RESULT;
#endif
diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient.c b/src/lib/evas/canvas/efl_canvas_vg_gradient.c
index 3bc4ec80a8..d254888631 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_gradient.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_gradient.c
@@ -117,28 +117,28 @@ _efl_canvas_vg_gradient_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Gra
return cn;
}
-EAPI void
-evas_vg_gradient_stop_set(Eo *obj, const Efl_Gfx_Gradient_Stop *colors, unsigned int length)
+EVAS_API void
+evas_vg_gradient_stop_set(Evas_Vg_Gradient *obj, const Evas_Vg_Gradient_Stop *colors, unsigned int length)
{
- efl_gfx_gradient_stop_set(obj, colors, length);
+ efl_gfx_gradient_stop_set(obj, (const Efl_Gfx_Gradient_Stop *)colors, length);
}
-EAPI void
-evas_vg_gradient_stop_get(Eo *obj, const Efl_Gfx_Gradient_Stop **colors, unsigned int *length)
+EVAS_API void
+evas_vg_gradient_stop_get(Evas_Vg_Gradient *obj, const Evas_Vg_Gradient_Stop **colors, unsigned int *length)
{
- efl_gfx_gradient_stop_get(obj, colors, length);
+ efl_gfx_gradient_stop_get(obj, (const Efl_Gfx_Gradient_Stop **)colors, length);
}
-EAPI void
-evas_vg_gradient_spread_set(Eo *obj, Efl_Gfx_Gradient_Spread s)
+EVAS_API void
+evas_vg_gradient_spread_set(Evas_Vg_Gradient *obj, Evas_Vg_Gradient_Spread s)
{
- efl_gfx_gradient_spread_set(obj, s);
+ efl_gfx_gradient_spread_set(obj, (Efl_Gfx_Gradient_Spread)s);
}
-EAPI Efl_Gfx_Gradient_Spread
-evas_vg_gradient_spread_get(Eo *obj)
+EVAS_API Evas_Vg_Gradient_Spread
+evas_vg_gradient_spread_get(Evas_Vg_Gradient *obj)
{
- return efl_gfx_gradient_spread_get(obj);
+ return (Evas_Vg_Gradient_Spread)efl_gfx_gradient_spread_get(obj);
}
#include "efl_canvas_vg_gradient.eo.c"
diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient_eo.legacy.h b/src/lib/evas/canvas/efl_canvas_vg_gradient_eo.legacy.h
new file mode 100644
index 0000000000..01ebdc32cb
--- /dev/null
+++ b/src/lib/evas/canvas/efl_canvas_vg_gradient_eo.legacy.h
@@ -0,0 +1,21 @@
+#ifndef _EVAS_VG_GRADIENT_EO_LEGACY_H_
+#define _EVAS_VG_GRADIENT_EO_LEGACY_H_
+
+typedef Eo Evas_Vg_Gradient;
+
+#endif
+
+#ifndef _EVAS_VG_GRADIENT_LINEAR_EO_LEGACY_H_
+#define _EVAS_VG_GRADIENT_LINEAR_EO_LEGACY_H_
+
+typedef Eo Evas_Vg_Gradient_Linear;
+
+#endif
+
+#ifndef _EVAS_VG_GRADIENT_RADIAL_EO_LEGACY_H_
+#define _EVAS_VG_GRADIENT_RADIAL_EO_LEGACY_H_
+
+typedef Eo Evas_Vg_Gradient_Radial;
+
+#endif
+
diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c b/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c
index fd681eda38..01ba7cf843 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c
@@ -171,32 +171,32 @@ _efl_canvas_vg_gradient_linear_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas
return cn;
}
-EAPI void
-evas_vg_gradient_linear_start_set(Eo *obj, double x, double y)
+EVAS_API void
+evas_vg_gradient_linear_start_set(Evas_Vg_Gradient_Linear *obj, double x, double y)
{
efl_gfx_gradient_linear_start_set(obj, x, y);
}
-EAPI void
-evas_vg_gradient_linear_start_get(Eo *obj, double *x, double *y)
+EVAS_API void
+evas_vg_gradient_linear_start_get(Evas_Vg_Gradient_Linear *obj, double *x, double *y)
{
efl_gfx_gradient_linear_start_get(obj, x, y);
}
-EAPI void
-evas_vg_gradient_linear_end_set(Eo *obj, double x, double y)
+EVAS_API void
+evas_vg_gradient_linear_end_set(Evas_Vg_Gradient_Linear *obj, double x, double y)
{
efl_gfx_gradient_linear_end_set(obj, x, y);
}
-EAPI void
-evas_vg_gradient_linear_end_get(Eo *obj, double *x, double *y)
+EVAS_API void
+evas_vg_gradient_linear_end_get(Evas_Vg_Gradient_Linear *obj, double *x, double *y)
{
efl_gfx_gradient_linear_end_get(obj, x, y);
}
-EAPI Efl_VG*
-evas_vg_gradient_linear_add(Efl_VG *parent)
+EVAS_API Evas_Vg_Gradient_Linear *
+evas_vg_gradient_linear_add(Evas_Vg_Container *parent)
{
return efl_add(EFL_CANVAS_VG_GRADIENT_LINEAR_CLASS, parent);
}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c b/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c
index 8cbffa6e66..d35f35f92f 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c
@@ -193,44 +193,44 @@ _efl_canvas_vg_gradient_radial_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas
return cn;
}
-EAPI void
-evas_vg_gradient_radial_center_set(Eo *obj, double x, double y)
+EVAS_API void
+evas_vg_gradient_radial_center_set(Evas_Vg_Gradient_Radial *obj, double x, double y)
{
efl_gfx_gradient_radial_center_set(obj, x, y);
}
-EAPI void
-evas_vg_gradient_radial_center_get(Eo *obj, double *x, double *y)
+EVAS_API void
+evas_vg_gradient_radial_center_get(Evas_Vg_Gradient_Radial *obj, double *x, double *y)
{
efl_gfx_gradient_radial_center_get(obj, x, y);
}
-EAPI void
-evas_vg_gradient_radial_radius_set(Eo *obj, double r)
+EVAS_API void
+evas_vg_gradient_radial_radius_set(Evas_Vg_Gradient_Radial *obj, double r)
{
efl_gfx_gradient_radial_radius_set(obj, r);
}
-EAPI double
-evas_vg_gradient_radial_radius_get(Eo *obj)
+EVAS_API double
+evas_vg_gradient_radial_radius_get(Evas_Vg_Gradient_Radial *obj)
{
return efl_gfx_gradient_radial_radius_get(obj);
}
-EAPI void
-evas_vg_gradient_radial_focal_set(Eo *obj, double x, double y)
+EVAS_API void
+evas_vg_gradient_radial_focal_set(Evas_Vg_Gradient_Radial *obj, double x, double y)
{
efl_gfx_gradient_radial_focal_set(obj, x, y);
}
-EAPI void
-evas_vg_gradient_radial_focal_get(Eo *obj, double *x, double *y)
+EVAS_API void
+evas_vg_gradient_radial_focal_get(Evas_Vg_Gradient_Radial *obj, double *x, double *y)
{
efl_gfx_gradient_radial_focal_get(obj, x, y);
}
-EAPI Efl_VG*
-evas_vg_gradient_radial_add(Efl_VG *parent)
+EVAS_API Evas_Vg_Gradient_Radial*
+evas_vg_gradient_radial_add(Evas_Vg_Container *parent)
{
return efl_add(EFL_CANVAS_VG_GRADIENT_RADIAL_CLASS, parent);
}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_image.c b/src/lib/evas/canvas/efl_canvas_vg_image.c
index 1d0ba1772a..eb5c306ba3 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_image.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_image.c
@@ -49,7 +49,6 @@ _efl_canvas_vg_image_render_pre(Evas_Object_Protected_Data *vg_pd,
if (!pd->buffer && pd->image)
{
Evas_Object_Protected_Data *obj = vg_pd;
- if (pd->buffer) efl_unref(pd->buffer);
pd->buffer = ENFN->ector_buffer_new(ENC, obj->layer->evas->evas,
pd->w, pd->h,
EFL_GFX_COLORSPACE_ARGB8888,
diff --git a/src/lib/evas/canvas/efl_canvas_vg_node.c b/src/lib/evas/canvas/efl_canvas_vg_node.c
index 72d0265908..342c2106a3 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_node.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_node.c
@@ -19,7 +19,15 @@ static const Efl_Canvas_Vg_Interpolation interpolation_identity = {
static void
_node_change(Efl_VG *obj, Efl_Canvas_Vg_Node_Data *nd)
{
- if (!nd || nd->flags != EFL_GFX_CHANGE_FLAG_NONE) return;
+ if (!nd) return;
+ if (nd->flags != EFL_GFX_CHANGE_FLAG_NONE)
+ {
+ if ((nd->vd && nd->vd->obj) &&
+ (!nd->vd->obj || !nd->vd->obj->changed))
+ efl_canvas_vg_object_change(nd->vd);
+
+ return;
+ }
nd->flags = EFL_GFX_CHANGE_FLAG_ALL;
Eo *p = obj;
@@ -391,29 +399,15 @@ _efl_canvas_vg_node_efl_object_parent_set(Eo *obj,
static void
_efl_canvas_vg_node_efl_gfx_stack_raise_to_top(Eo *obj, Efl_Canvas_Vg_Node_Data *pd EINA_UNUSED)
{
- Efl_Canvas_Vg_Container_Data *cd;
- Eina_List *lookup, *next;
- Eo *parent;
-
- parent = efl_parent_get(obj);
- if (!efl_isa(parent, EFL_CANVAS_VG_CONTAINER_CLASS)) goto on_error;
- cd = efl_data_scope_get(parent, EFL_CANVAS_VG_CONTAINER_CLASS);
-
- // FIXME: this could become slow with to much object
- lookup = eina_list_data_find_list(cd->children, obj);
- if (!lookup) goto on_error;
-
- next = eina_list_next(lookup);
- if (!next) return ;
-
- cd->children = eina_list_remove_list(cd->children, lookup);
- cd->children = eina_list_append_relative_list(cd->children, obj, next);
+ Efl_Canvas_Vg_Node *parent = efl_parent_get(obj);
+ if (!efl_isa(parent, EFL_CANVAS_VG_CONTAINER_CLASS)) return;
+ Efl_Canvas_Vg_Container_Data *cd = efl_data_scope_get(parent, EFL_CANVAS_VG_CONTAINER_CLASS);
+ if (!cd->children) return;
+ if (eina_list_data_get(eina_list_last(cd->children)) == obj) return;
+ cd->children = eina_list_remove(cd->children, obj);
+ cd->children = eina_list_append(cd->children, obj);
_node_change(parent, efl_data_scope_get(parent, MY_CLASS));
- return;
-
- on_error:
- ERR("Err");
}
static void
@@ -479,132 +473,67 @@ _efl_canvas_vg_node_efl_gfx_stack_stack_below(Eo *obj,
static void
_efl_canvas_vg_node_efl_gfx_stack_lower_to_bottom(Eo *obj, Efl_Canvas_Vg_Node_Data *pd EINA_UNUSED)
{
- Efl_Canvas_Vg_Container_Data *cd;
- Eina_List *lookup, *prev;
- Eo *parent;
-
- parent = efl_parent_get(obj);
- if (!efl_isa(parent, EFL_CANVAS_VG_CONTAINER_CLASS)) goto on_error;
- cd = efl_data_scope_get(parent, EFL_CANVAS_VG_CONTAINER_CLASS);
-
- // FIXME: this could become slow with to much object
- lookup = eina_list_data_find_list(cd->children, obj);
- if (!lookup) goto on_error;
-
- prev = eina_list_prev(lookup);
- if (!prev) return;
-
- cd->children = eina_list_remove_list(cd->children, lookup);
- cd->children = eina_list_prepend_relative_list(cd->children, obj, prev);
+ Efl_Canvas_Vg_Node *parent = efl_parent_get(obj);
+ if (!efl_isa(parent, EFL_CANVAS_VG_CONTAINER_CLASS)) return;
+ Efl_Canvas_Vg_Container_Data *cd = efl_data_scope_get(parent, EFL_CANVAS_VG_CONTAINER_CLASS);
+ if (!cd->children) return;
+ if (eina_list_data_get(cd->children) == obj) return;
+ cd->children = eina_list_remove(cd->children, obj);
+ cd->children = eina_list_prepend(cd->children, obj);
_node_change(parent, efl_data_scope_get(parent, MY_CLASS));
- return;
-
- on_error:
- ERR("Err");
-}
-
-static const Eo *
-_efl_canvas_vg_node_root_parent_get(const Eo *obj)
-{
- const Eo *parent;
-
- parent = efl_parent_get(obj);
-
- if (!parent) return obj;
- return _efl_canvas_vg_node_root_parent_get(parent);
-}
-
-static void
-_efl_canvas_vg_node_walk_down_at(const Eo *root, Eina_Array *a, Eina_Rectangle *r)
-{
- Eina_Rect bounds;
-
- efl_gfx_path_bounds_get(root, &bounds);
- if (!eina_rectangles_intersect(&bounds.rect, r)) return ;
-
- eina_array_push(a, root);
-
- if (efl_isa(root, EFL_CANVAS_VG_CONTAINER_CLASS))
- {
- Efl_Canvas_Vg_Container_Data *cd;
- Eina_List *l;
- Eo *child;
-
- cd = efl_data_scope_get(root, EFL_CANVAS_VG_CONTAINER_CLASS);
- EINA_LIST_FOREACH(cd->children, l, child)
- _efl_canvas_vg_node_walk_down_at(child, a, r);
- }
-}
-
-static void
-_efl_canvas_vg_node_object_at(const Eo *obj, Eina_Array *a, Eina_Rectangle *r)
-{
- const Eo *root;
-
- root = _efl_canvas_vg_node_root_parent_get(obj);
- if (!root) return ;
-
- _efl_canvas_vg_node_walk_down_at(root, a, r);
}
static Efl_Gfx_Stack *
_efl_canvas_vg_node_efl_gfx_stack_below_get(const Eo *obj, Efl_Canvas_Vg_Node_Data *pd EINA_UNUSED)
{
- Eina_Rect r;
- Eina_Array a;
- Eo *current;
- Eo *below = NULL;
- Eina_Array_Iterator iterator;
- unsigned int i;
+ Eo *parent, *below;
+ const Eina_List *list;
- efl_gfx_path_bounds_get(obj, &r);
+ parent = efl_parent_get(obj);
+ if (!efl_isa(parent, EFL_CANVAS_VG_CONTAINER_CLASS)) goto on_error;
- eina_array_step_set(&a, sizeof (Eina_Array), 8);
+ list = efl_canvas_vg_container_children_direct_get(parent);
+ if (list == NULL) goto on_error;
- _efl_canvas_vg_node_object_at(obj, &a, &r.rect);
+ list = eina_list_data_find_list(list, obj);
+ if (list == NULL) goto on_error;
- EINA_ARRAY_ITER_NEXT(&a, i, current, iterator)
- if (current == obj)
- {
- i++;
- if (i < eina_array_count(&a))
- below = eina_array_data_get(&a, i);
- break;
- }
+ list = eina_list_prev(list);
+ if (list == NULL) goto on_error;
- eina_array_flush(&a);
+ below = list->data;
return below;
+
+ on_error:
+ return NULL;
}
static Efl_Gfx_Stack *
_efl_canvas_vg_node_efl_gfx_stack_above_get(const Eo *obj, Efl_Canvas_Vg_Node_Data *pd EINA_UNUSED)
{
- Eina_Rect r;
- Eina_Array a;
- Eo *current;
- Eo *above = NULL;
- Eina_Array_Iterator iterator;
- unsigned int i;
+ Eo *parent, *above;
+ const Eina_List *list;
- efl_gfx_path_bounds_get(obj, &r);
+ parent = efl_parent_get(obj);
+ if (!efl_isa(parent, EFL_CANVAS_VG_CONTAINER_CLASS)) goto on_error;
- eina_array_step_set(&a, sizeof (Eina_Array), 8);
+ list = efl_canvas_vg_container_children_direct_get(parent);
+ if (list == NULL) goto on_error;
- _efl_canvas_vg_node_object_at(obj, &a, &r.rect);
+ list = eina_list_data_find_list(list, obj);
+ if (list == NULL) goto on_error;
- EINA_ARRAY_ITER_NEXT(&a, i, current, iterator)
- if (current == obj)
- {
- if (i > 0)
- above = eina_array_data_get(&a, i - 1);
- break;
- }
+ list = eina_list_next(list);
+ if (list == NULL) goto on_error;
- eina_array_flush(&a);
+ above = list->data;
return above;
+
+ on_error:
+ return NULL;
}
static Efl_Canvas_Vg_Interpolation *
@@ -780,32 +709,32 @@ _efl_canvas_vg_node_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Node_Da
return node;
}
-EAPI Eina_Bool
-evas_vg_node_visible_get(Eo *obj)
+EVAS_API Eina_Bool
+evas_vg_node_visible_get(Evas_Vg_Node *obj)
{
return efl_gfx_entity_visible_get(obj);
}
-EAPI void
-evas_vg_node_visible_set(Eo *obj, Eina_Bool v)
+EVAS_API void
+evas_vg_node_visible_set(Evas_Vg_Node *obj, Eina_Bool v)
{
efl_gfx_entity_visible_set(obj, v);
}
-EAPI void
-evas_vg_node_color_get(Eo *obj, int *r, int *g, int *b, int *a)
+EVAS_API void
+evas_vg_node_color_get(Evas_Vg_Node *obj, int *r, int *g, int *b, int *a)
{
efl_gfx_color_get(obj, r, g, b, a);
}
-EAPI void
-evas_vg_node_color_set(Eo *obj, int r, int g, int b, int a)
+EVAS_API void
+evas_vg_node_color_set(Evas_Vg_Node *obj, int r, int g, int b, int a)
{
efl_gfx_color_set(obj, r, g, b, a);
}
-EAPI void
-evas_vg_node_geometry_get(Eo *obj, int *x, int *y, int *w, int *h)
+EVAS_API void
+evas_vg_node_geometry_get(Evas_Vg_Node *obj, int *x, int *y, int *w, int *h)
{
Eina_Rect r;
r.pos = efl_gfx_entity_position_get(obj);
@@ -816,33 +745,34 @@ evas_vg_node_geometry_get(Eo *obj, int *x, int *y, int *w, int *h)
if (h) *h = r.h;
}
-EAPI void
-evas_vg_node_geometry_set(Eo *obj, int x, int y, int w, int h)
+/* deprecated */
+EVAS_API void
+evas_vg_node_geometry_set(Evas_Vg_Node *obj, int x, int y, int w, int h)
{
efl_gfx_entity_position_set(obj, EINA_POSITION2D(x, y));
efl_gfx_entity_size_set(obj, EINA_SIZE2D(w, h));
}
-EAPI void
-evas_vg_node_stack_below(Eo *obj, Eo *below)
+EVAS_API void
+evas_vg_node_stack_below(Evas_Vg_Node *obj, Eo *below)
{
efl_gfx_stack_below(obj, below);
}
-EAPI void
-evas_vg_node_stack_above(Eo *obj, Eo *above)
+EVAS_API void
+evas_vg_node_stack_above(Evas_Vg_Node *obj, Eo *above)
{
efl_gfx_stack_above(obj, above);
}
-EAPI void
-evas_vg_node_raise(Eo *obj)
+EVAS_API void
+evas_vg_node_raise(Evas_Vg_Node *obj)
{
efl_gfx_stack_raise_to_top(obj);
}
-EAPI void
-evas_vg_node_lower(Eo *obj)
+EVAS_API void
+evas_vg_node_lower(Evas_Vg_Node *obj)
{
efl_gfx_stack_lower_to_bottom(obj);
}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.c b/src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.c
index 559434b294..89e615ccf0 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.c
@@ -1,30 +1,30 @@
-EAPI void
-evas_vg_node_transformation_set(Efl_Canvas_Vg_Node *obj, const Eina_Matrix3 *m)
+EVAS_API void
+evas_vg_node_transformation_set(Evas_Vg_Node *obj, const Eina_Matrix3 *m)
{
efl_canvas_vg_node_transformation_set(obj, m);
}
-EAPI const Eina_Matrix3 *
-evas_vg_node_transformation_get(const Efl_Canvas_Vg_Node *obj)
+EVAS_API const Eina_Matrix3 *
+evas_vg_node_transformation_get(const Evas_Vg_Node *obj)
{
return efl_canvas_vg_node_transformation_get(obj);
}
-EAPI void
-evas_vg_node_origin_set(Efl_Canvas_Vg_Node *obj, double x, double y)
+EVAS_API void
+evas_vg_node_origin_set(Evas_Vg_Node *obj, double x, double y)
{
efl_canvas_vg_node_origin_set(obj, x, y);
}
-EAPI void
-evas_vg_node_origin_get(const Efl_Canvas_Vg_Node *obj, double *x, double *y)
+EVAS_API void
+evas_vg_node_origin_get(const Evas_Vg_Node *obj, double *x, double *y)
{
efl_canvas_vg_node_origin_get(obj, x, y);
}
-EAPI void
-evas_vg_node_mask_set(Efl_Canvas_Vg_Node *obj, Efl_Canvas_Vg_Node *mask, int op EINA_UNUSED)
+EVAS_API void
+evas_vg_node_mask_set(Evas_Vg_Node *obj, Evas_Vg_Node *mask, int op EINA_UNUSED)
{
efl_canvas_vg_node_comp_method_set(obj, mask, 0);
}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.h b/src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.h
index ee3b407331..14681b077d 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.h
+++ b/src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.h
@@ -1,45 +1,49 @@
-#ifndef _EFL_CANVAS_VG_NODE_EO_LEGACY_H_
-#define _EFL_CANVAS_VG_NODE_EO_LEGACY_H_
+#ifndef _EVAS_VG_NODE_EO_LEGACY_H_
+#define _EVAS_VG_NODE_EO_LEGACY_H_
-#ifndef _EFL_CANVAS_VG_NODE_EO_CLASS_TYPE
-#define _EFL_CANVAS_VG_NODE_EO_CLASS_TYPE
+#ifndef _EVAS_VG_NODE_EO_CLASS_TYPE
+#define _EVAS_VG_NODE_EO_CLASS_TYPE
-typedef Eo Efl_Canvas_Vg_Node;
+typedef Eo Evas_Vg_Node;
#endif
-#ifndef _EFL_CANVAS_VG_NODE_EO_TYPES
-#define _EFL_CANVAS_VG_NODE_EO_TYPES
+#ifndef _EVAS_VG_NODE_EO_TYPES
+#define _EVAS_VG_NODE_EO_TYPES
#endif
/**
+ * @defgroup Evas_Vg_Node_Group Vector Graphics Node Functions
+ * @ingroup Evas_Object_Vg_Group
+ */
+
+/**
* @brief Sets the transformation matrix to be used for this node object.
*
* @note Pass @c null to cancel the applied transformation.
*
* @param[in] obj The object.
- * @param[in] m Transformation matrix.
+ * @param[in] m The transformation matrix.
*
* @since 1.14
*
* @ingroup Evas_Vg_Node_Group
*/
-EAPI void evas_vg_node_transformation_set(Efl_Canvas_Vg_Node *obj, const Eina_Matrix3 *m);
+EVAS_API void evas_vg_node_transformation_set(Evas_Vg_Node *obj, const Eina_Matrix3 *m);
/**
* @brief Gets the transformation matrix used for this node object.
*
* @param[in] obj The object.
- *
- * @return Transformation matrix.
+ * @return The transformation matrix.
*
* @since 1.14
*
* @ingroup Evas_Vg_Node_Group
*/
-EAPI const Eina_Matrix3 *evas_vg_node_transformation_get(const Efl_Canvas_Vg_Node *obj);
+EVAS_API const Eina_Matrix3 *evas_vg_node_transformation_get(const Evas_Vg_Node *obj);
/**
* @brief Sets the origin position of the node object.
@@ -54,7 +58,7 @@ EAPI const Eina_Matrix3 *evas_vg_node_transformation_get(const Efl_Canvas_Vg_Nod
*
* @ingroup Evas_Vg_Node_Group
*/
-EAPI void evas_vg_node_origin_set(Efl_Canvas_Vg_Node *obj, double x, double y);
+EVAS_API void evas_vg_node_origin_set(Evas_Vg_Node *obj, double x, double y);
/**
* @brief Gets the origin position of the node object.
@@ -67,7 +71,7 @@ EAPI void evas_vg_node_origin_set(Efl_Canvas_Vg_Node *obj, double x, double y);
*
* @ingroup Evas_Vg_Node_Group
*/
-EAPI void evas_vg_node_origin_get(const Efl_Canvas_Vg_Node *obj, double *x, double *y);
+EVAS_API void evas_vg_node_origin_get(const Evas_Vg_Node *obj, double *x, double *y);
/**
* @brief Set Mask Node to this renderer
@@ -76,8 +80,10 @@ EAPI void evas_vg_node_origin_get(const Efl_Canvas_Vg_Node *obj, double *x, doub
* @param[in] mask Mask object
* @param[in] op Masking Option. Reserved
*
+ * @since 1.24
+ *
* @ingroup Evas_Vg_Node_Group
*/
-EAPI void evas_vg_node_mask_set(Efl_Canvas_Vg_Node *obj, Efl_Canvas_Vg_Node *mask, int op);
+EVAS_API void evas_vg_node_mask_set(Evas_Vg_Node *obj, Evas_Vg_Node *mask, int op);
#endif
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c
index 83a59bd6fe..7ebb1f4143 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_object.c
@@ -263,11 +263,13 @@ _efl_canvas_vg_object_efl_file_file_set(Eo *eo_obj, Efl_Canvas_Vg_Object_Data *p
evas_object_change(eo_obj, obj);
pd->vg_entry = NULL;
evas_object_change(eo_obj, obj);
+ pd->changed = EINA_TRUE;
}
}
Eina_Error err;
err = efl_file_set(efl_super(eo_obj, MY_CLASS), file);
+
if (err) return err;
return 0;
@@ -291,7 +293,14 @@ _efl_canvas_vg_object_efl_file_load(Eo *eo_obj, Efl_Canvas_Vg_Object_Data *pd)
file, key,
obj->cur->geometry.w,
obj->cur->geometry.h, NULL);
+
+ // NOTE: Update object's viewbox. In this case, there is no need to update
+ // the root of tree. That's why We don't use viewbox_set.
+ if (pd->vg_entry && pd->vg_entry->vfd)
+ pd->viewbox.rect = pd->vg_entry->vfd->view_box;
+
evas_object_change(eo_obj, obj);
+ pd->changed = EINA_TRUE;
return 0;
}
@@ -346,9 +355,19 @@ _efl_canvas_vg_object_efl_object_invalidate(Eo *eo_obj, Efl_Canvas_Vg_Object_Dat
{
Vg_User_Entry *user_entry = pd->user_entry;
ENFN->ector_surface_cache_drop(ENC, user_entry->root);
+ if (pd->user_entry->root) efl_unref(pd->user_entry->root);
free(pd->user_entry);
}
pd->user_entry = NULL;
+
+ //Drop cache buffers
+ if (pd->vg_entry)
+ {
+ if (pd->ckeys[0])
+ ENFN->ector_surface_cache_drop(_evas_engine_context(obj->layer->evas), pd->ckeys[0]);
+ if (pd->ckeys[1])
+ ENFN->ector_surface_cache_drop(_evas_engine_context(obj->layer->evas), pd->ckeys[1]);
+ }
evas_cache_vg_entry_del(pd->vg_entry);
efl_invalidate(efl_super(eo_obj, MY_CLASS));
@@ -365,11 +384,14 @@ _efl_canvas_vg_object_efl_object_constructor(Eo *eo_obj, Efl_Canvas_Vg_Object_Da
obj->func = &object_func;
obj->private_data = efl_data_ref(eo_obj, MY_CLASS);
obj->type = o_type;
+ obj->is_vg_object = EINA_TRUE;
/* default root node */
pd->obj = obj;
pd->root = efl_add_ref(EFL_CANVAS_VG_CONTAINER_CLASS, NULL);
+ pd->sync_render = EINA_FALSE;
+
eina_array_step_set(&pd->cleanup, sizeof(pd->cleanup), 8);
return eo_obj;
@@ -381,7 +403,7 @@ _efl_canvas_vg_object_efl_object_finalize(Eo *obj, Efl_Canvas_Vg_Object_Data *pd
Evas *e = evas_object_evas_get(obj);
/* Container must have a set parent after construction.
- efl_add_ref() with a parent won't work this case
+ efl_add_ref() with a parent won't work this case
because container needs some jobs in overriding parent_set()
after proper intialization. */
efl_parent_set(pd->root, obj);
@@ -448,9 +470,9 @@ _evas_vg_render(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd,
//For recovery context
//FIXME: It may occur async issue?
int px, py, pw, ph, pstride;
- void *ppixels;
+ void *ppixels = NULL;
ector_buffer_size_get(ector, &pw, &ph);
- ector_buffer_pixels_get(ector, &ppixels, &px, &ph, &pstride);
+ ector_buffer_pixels_get(ector, &ppixels, &pw, &ph, &pstride);
Efl_Gfx_Colorspace pcspace = ector_buffer_cspace_get(ector);
ector_surface_reference_point_get(ector, &px, &py);
@@ -491,7 +513,7 @@ _evas_vg_render(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd,
//renders a vg_tree to an offscreen buffer and push it to the cache.
static void *
_render_to_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd,
- void *engine, Efl_VG *root, int w, int h, void *buffer, void *ckey,
+ void *engine, Efl_VG *root, int x, int y, int w, int h, void *buffer, void *ckey,
Eina_Bool do_async)
{
Ector_Surface *ector;
@@ -518,8 +540,14 @@ _render_to_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd
//ector begin - end for drawing composite images.
_evas_vg_render_pre(obj, root, engine, buffer, context, ector, NULL, 255, NULL, 0);
+ if (pd->sync_render) do_async = EINA_FALSE;
+
//Actual content drawing
- ENFN->ector_begin(engine, buffer, context, ector, 0, 0, do_async);
+ if (!ENFN->ector_begin(engine, buffer, context, ector, x, y, do_async))
+ {
+ ERR("Failed ector begin!");
+ return NULL;
+ }
//draw on buffer
_evas_vg_render(obj, pd,
@@ -534,7 +562,23 @@ _render_to_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd
evas_common_draw_context_free(context);
if (buffer_created && ckey)
- ENFN->ector_surface_cache_set(engine, ckey, buffer);
+ {
+ //Drop ex invalid cache buffers.
+ if (pd->frame_idx == 0 && ckey != pd->ckeys[0])
+ {
+ if (pd->ckeys[0])
+ ENFN->ector_surface_cache_drop(engine, pd->ckeys[0]);
+ pd->ckeys[0] = ckey;
+ }
+ else if (pd->frame_idx == (int) (evas_cache_vg_anim_frame_count_get(pd->vg_entry) - 1)
+ && ckey != pd->ckeys[1])
+ {
+ if (pd->ckeys[1])
+ ENFN->ector_surface_cache_drop(engine, pd->ckeys[1]);
+ pd->ckeys[1] = ckey;
+ }
+ ENFN->ector_surface_cache_set(engine, ckey, buffer);
+ }
return buffer;
}
@@ -546,6 +590,8 @@ _render_buffer_to_screen(Evas_Object_Protected_Data *obj,
int x, int y, int w, int h,
Eina_Bool do_async, Eina_Bool cacheable)
{
+ if (!buffer) return;
+
Eina_Bool async_unref;
//Draw the buffer as image to canvas
@@ -585,28 +631,30 @@ _cache_vg_entry_render(Evas_Object_Protected_Data *obj,
(vg_entry->h != h))
{
Eina_Size2D size = evas_cache_vg_entry_default_size_get(pd->vg_entry);
-
- //adjust size for aspect ratio.
- if (size.w > 0 && size.h > 0)
+ if (!vg_entry->vfd->is_wrap)
{
- float rw = (float) w / (float) size.w;
- float rh = (float) h / (float) size.h;
-
- if (rw < rh)
+ //adjust size for aspect ratio.
+ if (size.w > 0 && size.h > 0)
{
- size.w = w;
- size.h = (int) ((float) size.h * rw);
+ float rw = (float) w / (float) size.w;
+ float rh = (float) h / (float) size.h;
+
+ if (rw < rh)
+ {
+ size.w = w;
+ size.h = (int) ((float) size.h * rw);
+ }
+ else
+ {
+ size.w = (int) ((float) size.w * rh);
+ size.h = h;
+ }
}
else
{
- size.w = (int) ((float) size.w * rh);
- size.h = h;
- }
- }
- else
- {
- size.w = w;
- size.h = h;
+ size.w = w;
+ size.h = h;
+ }
}
//Size is changed, cached data is invalid.
@@ -635,10 +683,11 @@ _cache_vg_entry_render(Evas_Object_Protected_Data *obj,
}
//update for adjusted pos and size.
- offset.x = w - size.w;
+ offset.x = vg_entry->vfd->is_wrap?0:(w - size.w);
if (offset.x > 0) offset.x /= 2;
- offset.y = h - size.h;
+ offset.y = vg_entry->vfd->is_wrap?0:(h - size.h);
if (offset.y > 0) offset.y /= 2;
+
w = size.w;
h = size.h;
}
@@ -653,7 +702,7 @@ _cache_vg_entry_render(Evas_Object_Protected_Data *obj,
if (!buffer)
{
- buffer = _render_to_buffer(obj, pd, engine, root, w, h, NULL, key, do_async);
+ buffer = _render_to_buffer(obj, pd, engine, root, 0, 0, w, h, NULL, key, do_async);
}
else
{
@@ -675,26 +724,52 @@ _user_vg_entry_render(Evas_Object_Protected_Data *obj,
int x, int y, int w, int h, Eina_Bool do_async)
{
Vg_User_Entry *user_entry = pd->user_entry;
+ Eina_Rect render_rect = EINA_RECT(x, y, w, h);
+
+ // Get changed boundary and fit the size.
+ if (pd->changed)
+ efl_gfx_path_bounds_get(user_entry->root, &user_entry->path_bounds);
+
+ if (user_entry->path_bounds.w != 0 && user_entry->path_bounds.h != 0)
+ {
+ EINA_RECTANGLE_SET(&render_rect, user_entry->path_bounds.x,
+ user_entry->path_bounds.y,
+ user_entry->path_bounds.w,
+ user_entry->path_bounds.h);
+ }
+ // If size of the drawing area is 0, no render.
+ else return;
+
+ if (pd->viewbox.w != 0 && pd->viewbox.h !=0)
+ {
+ double sx = 0, sy= 0;
+ sx = (double)w / (double)pd->viewbox.w;
+ sy = (double)h / (double)pd->viewbox.h;
+ render_rect.x = (render_rect.x - pd->viewbox.x) * sx;
+ render_rect.y = (render_rect.y - pd->viewbox.y) * sy;
+ render_rect.w *= sx;
+ render_rect.h *= sy;
+ }
//if the size doesn't match, drop previous cache surface.
- if ((user_entry->w != w ) ||
- (user_entry->h != h))
+ if ((user_entry->w != render_rect.w ) ||
+ (user_entry->h != render_rect.h))
{
- ENFN->ector_surface_cache_drop(engine, user_entry->root);
- user_entry->w = w;
- user_entry->h = h;
+ ENFN->ector_surface_cache_drop(engine, user_entry->root);
+ user_entry->w = render_rect.w;
+ user_entry->h = render_rect.h;
}
//if the buffer is not created yet
void *buffer = NULL;
- buffer = ENFN->ector_surface_cache_get(engine, user_entry->root);
+ buffer = ENFN->ector_surface_cache_get(engine, user_entry->root);
if (!buffer)
{
// render to the buffer
buffer = _render_to_buffer(obj, pd, engine, user_entry->root,
- w, h, buffer, user_entry->root, do_async);
+ render_rect.x, render_rect.y, render_rect.w, render_rect.h, buffer, user_entry->root, do_async);
}
else
{
@@ -702,7 +777,7 @@ _user_vg_entry_render(Evas_Object_Protected_Data *obj,
if (pd->changed)
buffer = _render_to_buffer(obj, pd, engine,
user_entry->root,
- w, h, buffer, NULL,
+ render_rect.x, render_rect.y, render_rect.w, render_rect.h, buffer, NULL,
do_async);
//cache reference was increased when we get the cache.
ENFN->ector_surface_cache_drop(engine, user_entry->root);
@@ -711,7 +786,9 @@ _user_vg_entry_render(Evas_Object_Protected_Data *obj,
_render_buffer_to_screen(obj,
engine, output, context, surface,
buffer,
- x, y, w, h,
+ x + render_rect.x,
+ y + render_rect.y,
+ render_rect.w, render_rect.h,
do_async, EINA_TRUE);
}
@@ -769,7 +846,6 @@ _efl_canvas_vg_object_render_pre(Evas_Object *eo_obj,
{
Efl_Canvas_Vg_Object_Data *pd = type_private_data;
int is_v, was_v;
- Ector_Surface *s;
if (obj->pre_render_done) return;
obj->pre_render_done = EINA_TRUE;
@@ -789,12 +865,6 @@ _efl_canvas_vg_object_render_pre(Evas_Object *eo_obj,
obj->cur->clipper->private_data);
}
- // FIXME: handle damage only on changed renderer.
- // FIXME: Move this render_pre to efl_canvas_vg_render()
- s = evas_ector_get(obj->layer->evas);
- if (pd->root && s)
- _evas_vg_render_pre(obj, pd->root, NULL, NULL, NULL, s, NULL, 255, NULL, 0);
-
/* now figure what changed and add draw rects */
/* if it just became visible or invisible */
is_v = evas_object_is_visible(obj);
@@ -985,6 +1055,17 @@ Eina_Bool _efl_canvas_vg_object_efl_gfx_frame_controller_sector_get(const Eo *ob
return EINA_TRUE;
}
+EOLIAN static Eina_Iterator *
+_efl_canvas_vg_object_efl_gfx_frame_controller_sector_list_get(const Eo *obj EINA_UNUSED,
+ Efl_Canvas_Vg_Object_Data *pd)
+{
+ if (!pd->vg_entry) return EINA_FALSE;
+
+ Eina_Inarray* markers = evas_cache_vg_anim_sector_list_get(pd->vg_entry);
+ if (!markers) return NULL;
+ return eina_inarray_iterator_new(markers);
+}
+
EOLIAN static Eina_Bool
_efl_canvas_vg_object_efl_gfx_frame_controller_frame_set(Eo *eo_obj,
Efl_Canvas_Vg_Object_Data *pd,
@@ -1015,8 +1096,29 @@ _efl_canvas_vg_object_default_size_get(const Eo *eo_obj EINA_UNUSED,
return evas_cache_vg_entry_default_size_get(pd->vg_entry);
}
+EOLIAN static Eina_Position2D
+_efl_canvas_vg_object_default_position_get(const Eo *eo_obj EINA_UNUSED,
+ Efl_Canvas_Vg_Object_Data *pd EINA_UNUSED)
+{
+ return evas_cache_vg_entry_default_position_get(pd->vg_entry);
+}
+
+EOLIAN static Eina_Size2D
+_efl_canvas_vg_object_default_min_size_get(const Eo *eo_obj EINA_UNUSED,
+ Efl_Canvas_Vg_Object_Data *pd EINA_UNUSED)
+{
+ return evas_cache_vg_entry_default_min_size_get(pd->vg_entry);
+}
+
+EOLIAN static void
+_efl_canvas_vg_object_wrap_mode_set(Eo *obj EINA_UNUSED,
+ Efl_Canvas_Vg_Object_Data *pd, Eina_Bool wrap_mode)
+{
+ evas_cache_vg_entry_wrap_mode_set(pd->vg_entry, wrap_mode);
+}
+
/* the actual api call to add a vector graphic object */
-EAPI Evas_Object *
+EVAS_API Eo *
evas_object_vg_add(Evas *e)
{
e = evas_find(e);
@@ -1025,31 +1127,31 @@ evas_object_vg_add(Evas *e)
return efl_add(MY_CLASS, e, efl_canvas_object_legacy_ctor(efl_added));
}
-EAPI int
+EVAS_API int
evas_object_vg_animated_frame_get(const Evas_Object *obj)
{
return efl_gfx_frame_controller_frame_get(obj);
}
-EAPI double
+EVAS_API double
evas_object_vg_animated_frame_duration_get(const Evas_Object *obj, int start_frame, int frame_num)
{
return efl_gfx_frame_controller_frame_duration_get(obj, start_frame, frame_num);
}
-EAPI int
+EVAS_API int
evas_object_vg_animated_frame_count_get(const Evas_Object *obj)
{
return efl_gfx_frame_controller_frame_count_get(obj);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_vg_animated_frame_set(Evas_Object *obj, int frame_index)
{
return efl_gfx_frame_controller_frame_set(obj, frame_index);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_vg_file_set(Evas_Object *obj, const char *file, const char *key)
{
return efl_file_simple_load(obj, file, key);
@@ -1087,17 +1189,24 @@ _efl_ui_canvas_object_vg_fill_mode_to_evas_object_vg_fill_mode(Efl_Canvas_Vg_Fil
return EVAS_OBJECT_VG_FILL_MODE_NONE;
}
-EAPI void
-evas_object_vg_fill_mode_set(Efl_VG *obj, Evas_Object_Vg_Fill_Mode fill_mode)
+EVAS_API void
+evas_object_vg_fill_mode_set(Evas_Object *obj, Evas_Object_Vg_Fill_Mode fill_mode)
{
efl_canvas_vg_object_fill_mode_set(obj, _evas_object_vg_fill_mode_to_efl_ui_canvas_object_vg_fill_mode(fill_mode));
}
-EAPI Evas_Object_Vg_Fill_Mode
-evas_object_vg_fill_mode_get(const Efl_VG *obj)
+EVAS_API Evas_Object_Vg_Fill_Mode
+evas_object_vg_fill_mode_get(const Evas_Object *obj)
{
return _efl_ui_canvas_object_vg_fill_mode_to_evas_object_vg_fill_mode(efl_canvas_vg_object_fill_mode_get(obj));
}
+Eina_Bool
+evas_object_vg_changed_get(Evas_Object_Protected_Data *obj)
+{
+ Efl_Canvas_Vg_Object_Data *pd = obj->private_data;
+ return pd->changed;
+}
+
#include "efl_canvas_vg_object.eo.c"
#include "efl_canvas_vg_object_eo.legacy.c"
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.eo b/src/lib/evas/canvas/efl_canvas_vg_object.eo
index 51eded82d5..ee63bc19a7 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object.eo
+++ b/src/lib/evas/canvas/efl_canvas_vg_object.eo
@@ -74,6 +74,27 @@ class @beta Efl.Canvas.Vg.Object extends Efl.Canvas.Object implements Efl.File,
size: Eina.Size2D;
}
}
+ @property default_position {
+ get {
+ }
+ values {
+ size: Eina.Position2D;
+ }
+ }
+ @property default_min_size {
+ get {
+ }
+ values {
+ size: Eina.Size2D;
+ }
+ }
+ @property wrap_mode {
+ set {
+ }
+ values {
+ wrap_mode: bool;
+ }
+ }
}
implements {
Efl.Object.constructor;
@@ -90,5 +111,6 @@ class @beta Efl.Canvas.Vg.Object extends Efl.Canvas.Object implements Efl.File,
Efl.Gfx.Frame_Controller.loop_count { get; }
Efl.Gfx.Frame_Controller.frame_duration { get; }
Efl.Gfx.Frame_Controller.sector { set; get; }
+ Efl.Gfx.Frame_Controller.sector_list { get; }
}
}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.c b/src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.c
index 936ae0b512..58770b39aa 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.c
@@ -1,36 +1,36 @@
-EAPI void
-evas_object_vg_viewbox_set(Efl_VG *obj, Eina_Rect viewbox)
+EVAS_API void
+evas_object_vg_viewbox_set(Evas_Object *obj, Eina_Rect viewbox)
{
efl_canvas_vg_object_viewbox_set(obj, viewbox);
}
-EAPI Eina_Rect
-evas_object_vg_viewbox_get(const Efl_VG *obj)
+EVAS_API Eina_Rect
+evas_object_vg_viewbox_get(const Evas_Object *obj)
{
return efl_canvas_vg_object_viewbox_get(obj);
}
-EAPI void
-evas_object_vg_viewbox_align_set(Efl_VG *obj, double align_x, double align_y)
+EVAS_API void
+evas_object_vg_viewbox_align_set(Evas_Object *obj, double align_x, double align_y)
{
efl_canvas_vg_object_viewbox_align_set(obj, align_x, align_y);
}
-EAPI void
-evas_object_vg_viewbox_align_get(const Efl_VG *obj, double *align_x, double *align_y)
+EVAS_API void
+evas_object_vg_viewbox_align_get(const Evas_Object *obj, double *align_x, double *align_y)
{
efl_canvas_vg_object_viewbox_align_get(obj, align_x, align_y);
}
-EAPI void
-evas_object_vg_root_node_set(Efl_VG *obj, Efl_Canvas_Vg_Node *root)
+EVAS_API void
+evas_object_vg_root_node_set(Evas_Object *obj, Efl_Canvas_Vg_Node *root)
{
efl_canvas_vg_object_root_node_set(obj, root);
}
-EAPI Efl_Canvas_Vg_Node *
-evas_object_vg_root_node_get(const Efl_VG *obj)
+EVAS_API Efl_Canvas_Vg_Node *
+evas_object_vg_root_node_get(const Evas_Object *obj)
{
return efl_canvas_vg_object_root_node_get(obj);
}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.h b/src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.h
index 319305f8c6..fdbe083bd3 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.h
+++ b/src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.h
@@ -4,9 +4,11 @@
#ifndef _EVAS_OBJECT_VG_EO_LEGACY_TYPES
#define _EVAS_OBJECT_VG_EO_LEGACY_TYPES
-/** Enumeration that defines how viewbox will be filled int the vg canvs's
+/**
+ * @brief Enumeration that defines how viewbox will be filled int the vg canvs's
* viewport. default Fill_Mode is @c none
*
+ * @since 1.24
* @ingroup Evas_Object_Vg_Group
*/
typedef enum
@@ -38,9 +40,10 @@ typedef enum
* @param[in] obj The object.
* @param[in] fill_mode Fill mode type
*
+ * @since 1.24
* @ingroup Evas_Object_Vg_Group
*/
-EAPI void evas_object_vg_fill_mode_set(Efl_VG *obj, Evas_Object_Vg_Fill_Mode fill_mode);
+EVAS_API void evas_object_vg_fill_mode_set(Evas_Object *obj, Evas_Object_Vg_Fill_Mode fill_mode);
/**
* @brief Control how the viewbox is mapped to the vg canvas's viewport.
@@ -49,9 +52,10 @@ EAPI void evas_object_vg_fill_mode_set(Efl_VG *obj, Evas_Object_Vg_Fill_Mode fil
*
* @return Fill mode type
*
+ * @since 1.24
* @ingroup Evas_Object_Vg_Group
*/
-EAPI Evas_Object_Vg_Fill_Mode evas_object_vg_fill_mode_get(const Efl_VG *obj);
+EVAS_API Evas_Object_Vg_Fill_Mode evas_object_vg_fill_mode_get(const Evas_Object *obj);
/**
* @brief Sets the viewbox for the evas vg canvas. viewbox if set should be
@@ -60,9 +64,10 @@ EAPI Evas_Object_Vg_Fill_Mode evas_object_vg_fill_mode_get(const Efl_VG *obj);
* @param[in] obj The object.
* @param[in] viewbox viewbox for the vg canvas
*
+ * @since 1.24
* @ingroup Evas_Object_Vg_Group
*/
-EAPI void evas_object_vg_viewbox_set(Efl_VG *obj, Eina_Rect viewbox);
+EVAS_API void evas_object_vg_viewbox_set(Evas_Object *obj, Eina_Rect viewbox);
/**
* @brief Get the current viewbox from the evas_object_vg
@@ -71,9 +76,10 @@ EAPI void evas_object_vg_viewbox_set(Efl_VG *obj, Eina_Rect viewbox);
*
* @return viewbox for the vg canvas
*
+ * @since 1.24
* @ingroup Evas_Object_Vg_Group
*/
-EAPI Eina_Rect evas_object_vg_viewbox_get(const Efl_VG *obj);
+EVAS_API Eina_Rect evas_object_vg_viewbox_get(const Evas_Object *obj);
/**
* @brief Control how the viewbox is positioned inside the viewport.
@@ -82,9 +88,10 @@ EAPI Eina_Rect evas_object_vg_viewbox_get(const Efl_VG *obj);
* @param[in] align_x Alignment in the horizontal axis (0 <= align_x <= 1).
* @param[in] align_y Alignment in the vertical axis (0 <= align_y <= 1).
*
+ * @since 1.24
* @ingroup Evas_Object_Vg_Group
*/
-EAPI void evas_object_vg_viewbox_align_set(Efl_VG *obj, double align_x, double align_y);
+EVAS_API void evas_object_vg_viewbox_align_set(Evas_Object *obj, double align_x, double align_y);
/**
* @brief Control how the viewbox is positioned inside the viewport.
@@ -93,9 +100,10 @@ EAPI void evas_object_vg_viewbox_align_set(Efl_VG *obj, double align_x, double a
* @param[out] align_x Alignment in the horizontal axis (0 <= align_x <= 1).
* @param[out] align_y Alignment in the vertical axis (0 <= align_y <= 1).
*
+ * @since 1.24
* @ingroup Evas_Object_Vg_Group
*/
-EAPI void evas_object_vg_viewbox_align_get(const Efl_VG *obj, double *align_x, double *align_y);
+EVAS_API void evas_object_vg_viewbox_align_get(const Evas_Object *obj, double *align_x, double *align_y);
/**
* @brief Set the root node of the evas_object_vg.
@@ -106,11 +114,12 @@ EAPI void evas_object_vg_viewbox_align_get(const Efl_VG *obj, double *align_x, d
* It takes the ownership of the root node.
*
* @param[in] obj The object.
- * @param[in] root Root node(Efl_Canvas_Vg_Container) of the VG canvas.
+ * @param[in] root Root node(Evas_Vg_Container) of the VG canvas.
*
+ * @since 1.24
* @ingroup Evas_Object_Vg_Group
*/
-EAPI void evas_object_vg_root_node_set(Efl_VG *obj, Efl_Canvas_Vg_Node *root);
+EVAS_API void evas_object_vg_root_node_set(Evas_Object *obj, Evas_Vg_Node *root);
/**
* @brief Get the root node of the evas_object_vg.
@@ -123,6 +132,6 @@ EAPI void evas_object_vg_root_node_set(Efl_VG *obj, Efl_Canvas_Vg_Node *root);
*
* @ingroup Evas_Object_Vg_Group
*/
-EAPI Efl_Canvas_Vg_Node *evas_object_vg_root_node_get(const Efl_VG *obj);
+EVAS_API Evas_Vg_Node *evas_object_vg_root_node_get(const Evas_Object *obj);
#endif
diff --git a/src/lib/evas/canvas/efl_canvas_vg_shape.c b/src/lib/evas/canvas/efl_canvas_vg_shape.c
index 5ddff89350..a698e9aeae 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_shape.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_shape.c
@@ -235,246 +235,251 @@ _efl_canvas_vg_shape_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Shape_
return node;
}
-EAPI double
-evas_vg_shape_stroke_scale_get(Eo *obj)
+EVAS_API double
+evas_vg_shape_stroke_scale_get(Evas_Vg_Shape *obj)
{
return efl_gfx_shape_stroke_scale_get(obj);
}
-EAPI void
-evas_vg_shape_stroke_scale_set(Eo *obj, double s)
+EVAS_API void
+evas_vg_shape_stroke_scale_set(Evas_Vg_Shape *obj, double s)
{
efl_gfx_shape_stroke_scale_set(obj, s);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_stroke_color_get(Eo *obj, int *r, int *g, int *b, int *a)
+EVAS_API void
+evas_vg_shape_stroke_color_get(Evas_Vg_Shape *obj, int *r, int *g, int *b, int *a)
{
efl_gfx_shape_stroke_color_get(obj, r, g, b, a);
}
-EAPI void
-evas_vg_shape_stroke_color_set(Eo *obj, int r, int g, int b, int a)
+EVAS_API void
+evas_vg_shape_stroke_color_set(Evas_Vg_Shape *obj, int r, int g, int b, int a)
{
efl_gfx_shape_stroke_color_set(obj, r, g, b, a);
efl_canvas_vg_node_change(obj);
}
-EAPI double
-evas_vg_shape_stroke_width_get(Eo *obj)
+EVAS_API double
+evas_vg_shape_stroke_width_get(Evas_Vg_Shape *obj)
{
return efl_gfx_shape_stroke_width_get(obj);
}
-EAPI void
-evas_vg_shape_stroke_width_set(Eo *obj, double w)
+EVAS_API void
+evas_vg_shape_stroke_width_set(Evas_Vg_Shape *obj, double w)
{
efl_gfx_shape_stroke_width_set(obj, w);
efl_canvas_vg_node_change(obj);
}
-EAPI double
-evas_vg_shape_stroke_location_get(Eo *obj)
+EVAS_API double
+evas_vg_shape_stroke_location_get(Evas_Vg_Shape *obj)
{
return efl_gfx_shape_stroke_location_get(obj);
}
-EAPI void
-evas_vg_shape_stroke_location_set(Eo *obj, double centered)
+EVAS_API void
+evas_vg_shape_stroke_location_set(Evas_Vg_Shape *obj, double centered)
{
efl_gfx_shape_stroke_location_set(obj, centered);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_stroke_dash_get(Eo *obj, const Efl_Gfx_Dash **dash, unsigned int *length)
+EVAS_API void
+evas_vg_shape_stroke_dash_get(Evas_Vg_Shape *obj, const Evas_Vg_Dash **dash, unsigned int *length)
{
- efl_gfx_shape_stroke_dash_get(obj, dash, length);
+ efl_gfx_shape_stroke_dash_get(obj, (const Efl_Gfx_Dash **)dash, length);
}
-EAPI void
-evas_vg_shape_stroke_dash_set(Eo *obj, const Efl_Gfx_Dash *dash, unsigned int length)
+EVAS_API void
+evas_vg_shape_stroke_dash_set(Evas_Vg_Shape *obj, const Evas_Vg_Dash *dash, unsigned int length)
{
- efl_gfx_shape_stroke_dash_set(obj, dash, length);
+ efl_gfx_shape_stroke_dash_set(obj, (const Efl_Gfx_Dash *)dash, length);
efl_canvas_vg_node_change(obj);
}
-EAPI Efl_Gfx_Cap
-evas_vg_shape_stroke_cap_get(Eo *obj)
+EVAS_API Evas_Vg_Cap
+evas_vg_shape_stroke_cap_get(Evas_Vg_Shape *obj)
{
- return efl_gfx_shape_stroke_cap_get(obj);
+ return (Evas_Vg_Cap)efl_gfx_shape_stroke_cap_get(obj);
}
-EAPI void
-evas_vg_shape_stroke_cap_set(Eo *obj, Efl_Gfx_Cap c)
+EVAS_API void
+evas_vg_shape_stroke_cap_set(Evas_Vg_Shape *obj, Evas_Vg_Cap c)
{
- efl_gfx_shape_stroke_cap_set(obj, c);
+ efl_gfx_shape_stroke_cap_set(obj, (Efl_Gfx_Cap)c);
efl_canvas_vg_node_change(obj);
}
-EAPI Efl_Gfx_Join
-evas_vg_shape_stroke_join_get(Eo *obj)
+EVAS_API Evas_Vg_Join
+evas_vg_shape_stroke_join_get(Evas_Vg_Shape *obj)
{
- return efl_gfx_shape_stroke_join_get(obj);
+ return (Evas_Vg_Join)efl_gfx_shape_stroke_join_get(obj);
}
-EAPI void
-evas_vg_shape_stroke_join_set(Eo *obj, Efl_Gfx_Join j)
+EVAS_API void
+evas_vg_shape_stroke_join_set(Evas_Vg_Shape *obj, Evas_Vg_Join j)
{
- efl_gfx_shape_stroke_join_set(obj, j);
+ efl_gfx_shape_stroke_join_set(obj, (Efl_Gfx_Join)j);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_path_set(Eo *obj, const Efl_Gfx_Path_Command *op, const double *points)
+EVAS_API void
+evas_vg_shape_path_set(Evas_Vg_Shape *obj, const Evas_Vg_Path_Command *op, const double *points)
{
- efl_gfx_path_set(obj, op, points);
+ efl_gfx_path_set(obj, (const Efl_Gfx_Path_Command *)op, points);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_path_get(Eo *obj, const Efl_Gfx_Path_Command **op, const double **points)
+EVAS_API void
+evas_vg_shape_path_get(Evas_Vg_Shape *obj, const Evas_Vg_Path_Command **op, const double **points)
{
- efl_gfx_path_get(obj, op, points);
+ efl_gfx_path_get(obj, (const Efl_Gfx_Path_Command **)op, points);
}
-EAPI void
-evas_vg_shape_path_length_get(Eo *obj, unsigned int *commands, unsigned int *points)
+EVAS_API void
+evas_vg_shape_path_length_get(Evas_Vg_Shape *obj, unsigned int *commands, unsigned int *points)
{
efl_gfx_path_length_get(obj, commands, points);
}
-EAPI void
-evas_vg_shape_current_get(Eo *obj, double *x, double *y)
+EVAS_API void
+evas_vg_shape_current_get(Evas_Vg_Shape *obj, double *x, double *y)
{
efl_gfx_path_current_get(obj, x, y);
}
-EAPI void
-evas_vg_shape_current_ctrl_get(Eo *obj, double *x, double *y)
+EVAS_API void
+evas_vg_shape_current_ctrl_get(Evas_Vg_Shape *obj, double *x, double *y)
{
efl_gfx_path_current_ctrl_get(obj, x, y);
}
-EAPI void
-evas_vg_shape_dup(Eo *obj, Eo *dup_from)
+EVAS_API void
+evas_vg_shape_dup(Evas_Vg_Shape *obj, Evas_Vg_Shape *dup_from)
{
efl_gfx_path_copy_from(obj, dup_from);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_reset(Eo *obj)
+EVAS_API void
+evas_vg_shape_reset(Evas_Vg_Shape *obj)
{
efl_gfx_path_reset(obj);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_append_move_to(Eo *obj, double x, double y)
+EVAS_API void
+evas_vg_shape_append_move_to(Evas_Vg_Shape *obj, double x, double y)
{
efl_gfx_path_append_move_to(obj, x, y);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_append_line_to(Eo *obj, double x, double y)
+EVAS_API void
+evas_vg_shape_append_line_to(Evas_Vg_Shape *obj, double x, double y)
{
efl_gfx_path_append_line_to(obj, x, y);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_append_quadratic_to(Eo *obj, double x, double y, double ctrl_x, double ctrl_y)
+EVAS_API void
+evas_vg_shape_append_quadratic_to(Evas_Vg_Shape *obj, double x, double y, double ctrl_x, double ctrl_y)
{
efl_gfx_path_append_quadratic_to(obj, x, y, ctrl_x, ctrl_y);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_append_squadratic_to(Eo *obj, double x, double y)
+EVAS_API void
+evas_vg_shape_append_squadratic_to(Evas_Vg_Shape *obj, double x, double y)
{
efl_gfx_path_append_squadratic_to(obj, x, y);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_append_cubic_to(Eo *obj, double x, double y, double ctrl_x0, double ctrl_y0, double ctrl_x1, double ctrl_y1)
+EVAS_API void
+evas_vg_shape_append_cubic_to(Evas_Vg_Shape *obj, double x, double y, double ctrl_x0, double ctrl_y0, double ctrl_x1, double ctrl_y1)
{
- efl_gfx_path_append_cubic_to(obj, x, y, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1);
+ efl_gfx_path_append_cubic_to(obj, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1, x, y);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_append_scubic_to(Eo *obj, double x, double y, double ctrl_x, double ctrl_y)
+EVAS_API void
+evas_vg_shape_append_scubic_to(Evas_Vg_Shape *obj, double x, double y, double ctrl_x, double ctrl_y)
{
efl_gfx_path_append_scubic_to(obj, x, y, ctrl_x, ctrl_y);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_append_arc_to(Eo *obj, double x, double y, double rx, double ry, double angle, Eina_Bool large_arc, Eina_Bool sweep)
+EVAS_API void
+evas_vg_shape_append_arc_to(Evas_Vg_Shape *obj, double x, double y, double rx, double ry, double angle, Eina_Bool large_arc, Eina_Bool sweep)
{
efl_gfx_path_append_arc_to(obj, x, y, rx, ry, angle, large_arc, sweep);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_append_arc(Eo *obj, double x, double y, double w, double h, double start_angle, double sweep_length)
+EVAS_API void
+evas_vg_shape_append_arc(Evas_Vg_Shape *obj, double x, double y, double w, double h, double start_angle, double sweep_length)
{
efl_gfx_path_append_arc(obj, x, y, w, h, start_angle, sweep_length);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_append_close(Eo *obj)
+EVAS_API void
+evas_vg_shape_append_close(Evas_Vg_Shape *obj)
{
efl_gfx_path_append_close(obj);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_append_circle(Eo *obj, double x, double y, double radius)
+EVAS_API void
+evas_vg_shape_append_circle(Evas_Vg_Shape *obj, double x, double y, double radius)
{
efl_gfx_path_append_circle(obj, x, y, radius);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_append_rect(Eo *obj, double x, double y, double w, double h, double rx, double ry)
+EVAS_API void
+evas_vg_shape_append_rect(Evas_Vg_Shape *obj, double x, double y, double w, double h, double rx, double ry)
{
efl_gfx_path_append_rect(obj, x, y, w, h, rx, ry);
efl_canvas_vg_node_change(obj);
}
-EAPI void
-evas_vg_shape_append_svg_path(Eo *obj, const char *svg_path_data)
+EVAS_API void
+evas_vg_shape_append_svg_path(Evas_Vg_Shape *obj, const char *svg_path_data)
{
efl_gfx_path_append_svg_path(obj, svg_path_data);
efl_canvas_vg_node_change(obj);
}
-EAPI Eina_Bool
-evas_vg_shape_interpolate(Eo *obj, const Eo *from, const Eo *to, double pos_map)
+EVAS_API Eina_Bool
+evas_vg_shape_interpolate(Evas_Vg_Shape *obj, const Evas_Vg_Shape *from, const Evas_Vg_Shape *to, double pos_map)
{
Eina_Bool ret = efl_gfx_path_interpolate(obj, from, to, pos_map);
efl_canvas_vg_node_change(obj);
return ret;
}
-EAPI Eina_Bool
-evas_vg_shape_equal_commands(Eo *obj, const Eo *with)
+EVAS_API Eina_Bool
+evas_vg_shape_equal_commands(Evas_Vg_Shape *obj, const Evas_Vg_Shape *with)
{
return efl_gfx_path_equal_commands(obj, with);
}
-EAPI Efl_Canvas_Vg_Shape*
+EVAS_API Efl_Canvas_Vg_Shape*
evas_vg_shape_add(Efl_Canvas_Vg_Node *parent)
{
/* Warn it because the usage has been changed.
We can remove this message after v1.21. */
- if (!parent) CRI("Efl_Canvas_Vg_Shape only allow Efl_Canvas_Vg_Node as the parent");
+ if (!parent)
+ {
+ ERR("Efl_Canvas_Vg_Shape only allow Efl_Canvas_Vg_Node as the parent");
+ return NULL;
+ }
+
return efl_add(MY_CLASS, parent);
}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_shape_eo.legacy.c b/src/lib/evas/canvas/efl_canvas_vg_shape_eo.legacy.c
index 5630fe5f63..3dd3088a4c 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_shape_eo.legacy.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_shape_eo.legacy.c
@@ -1,35 +1,35 @@
-EAPI void
+EVAS_API void
evas_vg_shape_fill_set(Efl_Canvas_Vg_Shape *obj, Efl_Canvas_Vg_Node *f)
{
efl_canvas_vg_shape_fill_set(obj, f);
}
-EAPI Efl_Canvas_Vg_Node *
+EVAS_API Efl_Canvas_Vg_Node *
evas_vg_shape_fill_get(const Efl_Canvas_Vg_Shape *obj)
{
return efl_canvas_vg_shape_fill_get(obj);
}
-EAPI void
+EVAS_API void
evas_vg_shape_stroke_fill_set(Efl_Canvas_Vg_Shape *obj, Efl_Canvas_Vg_Node *f)
{
efl_canvas_vg_shape_stroke_fill_set(obj, f);
}
-EAPI Efl_Canvas_Vg_Node *
+EVAS_API Efl_Canvas_Vg_Node *
evas_vg_shape_stroke_fill_get(const Efl_Canvas_Vg_Shape *obj)
{
return efl_canvas_vg_shape_stroke_fill_get(obj);
}
-EAPI void
+EVAS_API void
evas_vg_shape_stroke_marker_set(Efl_Canvas_Vg_Shape *obj, Efl_Canvas_Vg_Node *m)
{
efl_canvas_vg_shape_stroke_marker_set(obj, m);
}
-EAPI Efl_Canvas_Vg_Node *
+EVAS_API Efl_Canvas_Vg_Node *
evas_vg_shape_stroke_marker_get(const Efl_Canvas_Vg_Shape *obj)
{
return efl_canvas_vg_shape_stroke_marker_get(obj);
diff --git a/src/lib/evas/canvas/efl_canvas_vg_shape_eo.legacy.h b/src/lib/evas/canvas/efl_canvas_vg_shape_eo.legacy.h
index 444acd2334..51612b7a12 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_shape_eo.legacy.h
+++ b/src/lib/evas/canvas/efl_canvas_vg_shape_eo.legacy.h
@@ -1,60 +1,70 @@
-#ifndef _EFL_CANVAS_VG_SHAPE_EO_LEGACY_H_
-#define _EFL_CANVAS_VG_SHAPE_EO_LEGACY_H_
+#ifndef _EVAS_VG_SHAPE_EO_LEGACY_H_
+#define _EVAS_VG_SHAPE_EO_LEGACY_H_
-#ifndef _EFL_CANVAS_VG_SHAPE_EO_CLASS_TYPE
-#define _EFL_CANVAS_VG_SHAPE_EO_CLASS_TYPE
+#ifndef _EVAS_VG_SHAPE_EO_CLASS_TYPE
+#define _EVAS_VG_SHAPE_EO_CLASS_TYPE
-typedef Eo Efl_Canvas_Vg_Shape;
+typedef Eo Evas_Vg_Shape;
#endif
-#ifndef _EFL_CANVAS_VG_SHAPE_EO_TYPES
-#define _EFL_CANVAS_VG_SHAPE_EO_TYPES
-
+#ifndef _EVAS_VG_SHAPE_EO_TYPES
+#define _EVAS_VG_SHAPE_EO_TYPES
#endif
/**
- * @brief Fill of the shape object
+ * @defgroup Evas_Vg_Shape_Group Vector Graphics Shape Functions
+ * @ingroup Evas_Object_Vg_Group
+ */
+
+/**
+ * @brief Fill of the shape object.
*
* @param[in] obj The object.
- * @param[in] f Fill object
+ * @param[in] f The fill object.
+ *
+ * @since 1.24
*
* @ingroup Evas_Vg_Shape_Group
*/
-EAPI void evas_vg_shape_fill_set(Efl_Canvas_Vg_Shape *obj, Efl_Canvas_Vg_Node *f);
+EVAS_API void evas_vg_shape_fill_set(Evas_Vg_Shape *obj, Evas_Vg_Node *f);
/**
- * @brief Fill of the shape object
+ * @brief Fill of the shape object.
*
* @param[in] obj The object.
+ * @return The fill object.
*
- * @return Fill object
+ * @since 1.24
*
* @ingroup Evas_Vg_Shape_Group
*/
-EAPI Efl_Canvas_Vg_Node *evas_vg_shape_fill_get(const Efl_Canvas_Vg_Shape *obj);
+EVAS_API Evas_Vg_Node *evas_vg_shape_fill_get(const Evas_Vg_Shape *obj);
/**
- * @brief Stroke fill of the shape object
+ * @brief Stroke fill of the shape object.
*
* @param[in] obj The object.
- * @param[in] f Stroke fill object
+ * @param[in] f The stroke fill object.
+ *
+ * @since 1.24
*
* @ingroup Evas_Vg_Shape_Group
*/
-EAPI void evas_vg_shape_stroke_fill_set(Efl_Canvas_Vg_Shape *obj, Efl_Canvas_Vg_Node *f);
+EVAS_API void evas_vg_shape_stroke_fill_set(Evas_Vg_Shape *obj, Evas_Vg_Node *f);
/**
- * @brief Stroke fill of the shape object
+ * @brief Stroke fill of the shape object.
*
* @param[in] obj The object.
+ * @return The stroke fill object.
*
- * @return Stroke fill object
+ * @since 1.24
*
* @ingroup Evas_Vg_Shape_Group
*/
-EAPI Efl_Canvas_Vg_Node *evas_vg_shape_stroke_fill_get(const Efl_Canvas_Vg_Shape *obj);
+EVAS_API Evas_Vg_Node *evas_vg_shape_stroke_fill_get(const Evas_Vg_Shape *obj);
/**
* @brief Stroke marker of the shape object
@@ -62,19 +72,22 @@ EAPI Efl_Canvas_Vg_Node *evas_vg_shape_stroke_fill_get(const Efl_Canvas_Vg_Shape
* @param[in] obj The object.
* @param[in] m Stroke marker object
*
+ * @since 1.24
+ *
* @ingroup Evas_Vg_Shape_Group
*/
-EAPI void evas_vg_shape_stroke_marker_set(Efl_Canvas_Vg_Shape *obj, Efl_Canvas_Vg_Node *m);
+EVAS_API void evas_vg_shape_stroke_marker_set(Evas_Vg_Shape *obj, Evas_Vg_Node *m);
/**
* @brief Stroke marker of the shape object
*
* @param[in] obj The object.
- *
* @return Stroke marker object
*
+ * @since 1.24
+ *
* @ingroup Evas_Vg_Shape_Group
*/
-EAPI Efl_Canvas_Vg_Node *evas_vg_shape_stroke_marker_get(const Efl_Canvas_Vg_Shape *obj);
+EVAS_API Evas_Vg_Node *evas_vg_shape_stroke_marker_get(const Evas_Vg_Shape *obj);
#endif
diff --git a/src/lib/evas/canvas/efl_gfx_mapping.c b/src/lib/evas/canvas/efl_gfx_mapping.c
index b05239b369..49b450ede4 100644
--- a/src/lib/evas/canvas/efl_gfx_mapping.c
+++ b/src/lib/evas/canvas/efl_gfx_mapping.c
@@ -305,6 +305,7 @@ _map_calc(const Eo *eo_obj, Evas_Object_Protected_Data *obj, Efl_Gfx_Mapping_Dat
if (!m)
{
m = evas_map_new(count);
+ if (!m) return NULL;
map_alloc = EINA_TRUE;
}
else _evas_map_reset(m);
diff --git a/src/lib/evas/canvas/efl_gfx_vg_value_provider.c b/src/lib/evas/canvas/efl_gfx_vg_value_provider.c
index ccf334924f..b22232a6f4 100644
--- a/src/lib/evas/canvas/efl_gfx_vg_value_provider.c
+++ b/src/lib/evas/canvas/efl_gfx_vg_value_provider.c
@@ -8,7 +8,7 @@ _efl_gfx_vg_value_provider_efl_object_constructor(Eo *obj,
{
obj = efl_constructor(efl_super(obj, MY_CLASS));
- pd->flag = EFL_GFX_VG_VALUE_PROVIDER_CHANGE_FLAG_NONE;
+ pd->flag = EFL_GFX_VG_VALUE_PROVIDER_FLAGS_NONE;
return obj;
}
@@ -35,17 +35,17 @@ _efl_gfx_vg_value_provider_keypath_get(const Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Val
}
EOLIAN void
-_efl_gfx_vg_value_provider_transform_set(Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_Provider_Data *pd, Eina_Matrix3 *m)
+_efl_gfx_vg_value_provider_transform_set(Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_Provider_Data *pd, Eina_Matrix4 *m)
{
if (m)
{
if (!pd->m)
{
- pd->m = malloc(sizeof (Eina_Matrix3));
+ pd->m = malloc(sizeof (Eina_Matrix4));
if (!pd->m) return;
}
- pd->flag = pd->flag | EFL_GFX_VG_VALUE_PROVIDER_CHANGE_FLAG_TRANSFORM_MATRIX;
- memcpy(pd->m, m, sizeof (Eina_Matrix3));
+ pd->flag = pd->flag | EFL_GFX_VG_VALUE_PROVIDER_FLAGS_TRANSFORM_MATRIX;
+ memcpy(pd->m, m, sizeof (Eina_Matrix4));
}
else
{
@@ -54,16 +54,16 @@ _efl_gfx_vg_value_provider_transform_set(Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_P
}
}
-EOLIAN Eina_Matrix3*
+EOLIAN Eina_Matrix4*
_efl_gfx_vg_value_provider_transform_get(const Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_Provider_Data *pd)
{
return pd->m;
}
-EOAPI void
+EVAS_API EVAS_API_WEAK void
_efl_gfx_vg_value_provider_fill_color_set(Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_Provider_Data *pd, int r, int g, int b, int a)
{
- pd->flag = pd->flag | EFL_GFX_VG_VALUE_PROVIDER_CHANGE_FLAG_FILL_COLOR;
+ pd->flag = pd->flag | EFL_GFX_VG_VALUE_PROVIDER_FLAGS_FILL_COLOR;
pd->fill.r = r;
pd->fill.g = g;
@@ -71,7 +71,7 @@ _efl_gfx_vg_value_provider_fill_color_set(Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_
pd->fill.a = a;
}
-EOAPI void
+EVAS_API EVAS_API_WEAK void
_efl_gfx_vg_value_provider_fill_color_get(const Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_Provider_Data *pd, int *r, int *g, int *b, int *a)
{
if (r) *r = pd->fill.r;
@@ -80,10 +80,10 @@ _efl_gfx_vg_value_provider_fill_color_get(const Eo *obj EINA_UNUSED, Efl_Gfx_Vg_
if (a) *a = pd->fill.a;
}
-EOAPI void
+EVAS_API EVAS_API_WEAK void
_efl_gfx_vg_value_provider_stroke_color_set(Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_Provider_Data *pd, int r, int g, int b, int a)
{
- pd->flag = pd->flag | EFL_GFX_VG_VALUE_PROVIDER_CHANGE_FLAG_STROKE_COLOR;
+ pd->flag = pd->flag | EFL_GFX_VG_VALUE_PROVIDER_FLAGS_STROKE_COLOR;
pd->stroke.r = r;
pd->stroke.g = g;
@@ -91,7 +91,7 @@ _efl_gfx_vg_value_provider_stroke_color_set(Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Valu
pd->stroke.a = a;
}
-EOAPI void
+EVAS_API EVAS_API_WEAK void
_efl_gfx_vg_value_provider_stroke_color_get(const Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_Provider_Data *pd, int *r, int *g, int *b, int *a)
{
if (r) *r = pd->stroke.r;
@@ -100,28 +100,24 @@ _efl_gfx_vg_value_provider_stroke_color_get(const Eo *obj EINA_UNUSED, Efl_Gfx_V
if (a) *a = pd->stroke.a;
}
-EOAPI void
+EVAS_API EVAS_API_WEAK void
_efl_gfx_vg_value_provider_stroke_width_set(Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_Provider_Data *pd, double w)
{
if (w < 0) return ;
- pd->flag = pd->flag | EFL_GFX_VG_VALUE_PROVIDER_CHANGE_FLAG_STROKE_WIDTH;
+ pd->flag = pd->flag | EFL_GFX_VG_VALUE_PROVIDER_FLAGS_STROKE_WIDTH;
pd->stroke.width = w;
}
-EOAPI double
+EVAS_API EVAS_API_WEAK double
_efl_gfx_vg_value_provider_stroke_width_get(const Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_Provider_Data *pd)
{
return pd->stroke.width;
}
-/* This function only use in internal */
-Efl_Gfx_Vg_Value_Provider_Change_Flag
-efl_gfx_vg_value_provider_changed_flag_get(Eo *obj)
+EVAS_API EVAS_API_WEAK Efl_Gfx_Vg_Value_Provider_Flags
+_efl_gfx_vg_value_provider_updated_get(const Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_Provider_Data *pd)
{
- EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(obj, MY_CLASS), EFL_GFX_VG_VALUE_PROVIDER_CHANGE_FLAG_NONE);
- Efl_Gfx_Vg_Value_Provider_Data *pd = efl_data_scope_get(obj, MY_CLASS);
- if (!pd) return EFL_GFX_VG_VALUE_PROVIDER_CHANGE_FLAG_NONE;
return pd->flag;
}
diff --git a/src/lib/evas/canvas/efl_gfx_vg_value_provider.eo b/src/lib/evas/canvas/efl_gfx_vg_value_provider.eo
index 2e21774a2f..2fe2516aad 100644
--- a/src/lib/evas/canvas/efl_gfx_vg_value_provider.eo
+++ b/src/lib/evas/canvas/efl_gfx_vg_value_provider.eo
@@ -1,3 +1,16 @@
+import eina_types;
+
+enum @beta Efl.Gfx.Vg_Value_Provider_Flags {
+ [[ Property information applied to value provider.
+ @since 1.24
+ ]]
+ none = 0, [[ Nothing changed.]]
+ fill_color = 1, [[ Fill color changed. ]]
+ stroke_color = 2, [[ Stroke color changed. ]]
+ stroke_width = 4, [[ Stroke width changed. ]]
+ transform_matrix = 8, [[ Transform matrix changed. ]]
+}
+
class @beta Efl.Gfx.Vg.Value_Provider extends Efl.Object
{
[[Efl Vector Value Provider class.
@@ -25,7 +38,7 @@ class @beta Efl.Gfx.Vg.Value_Provider extends Efl.Object
get {
}
values {
- m: ptr(Eina.Matrix3); [[ Matrix Value. ]]
+ m: ptr(Eina.Matrix4); [[ Matrix Value. ]]
}
}
@property fill_color {
@@ -64,6 +77,14 @@ class @beta Efl.Gfx.Vg.Value_Provider extends Efl.Object
width: double; [[ Width value of stroke. ]]
}
}
+ @property updated {
+ [[ Flag of properties updated in value provider object. ]]
+ get {
+ }
+ values {
+ flag: Efl.Gfx.Vg_Value_Provider_Flags; [[ Flag of the changed property. ]]
+ }
+ }
}
implements {
Efl.Object.constructor;
diff --git a/src/lib/evas/canvas/efl_gfx_vg_value_provider.h b/src/lib/evas/canvas/efl_gfx_vg_value_provider.h
index 5b4b806000..afcf72eba9 100644
--- a/src/lib/evas/canvas/efl_gfx_vg_value_provider.h
+++ b/src/lib/evas/canvas/efl_gfx_vg_value_provider.h
@@ -8,11 +8,11 @@
struct _Efl_Gfx_Vg_Value_Provider_Data
{
Eo* obj;
- Efl_Gfx_Vg_Value_Provider_Change_Flag flag;
+ Efl_Gfx_Vg_Value_Provider_Flags flag;
Eina_Stringshare *keypath;
- Eina_Matrix3 *m;
+ Eina_Matrix4 *m;
struct {
int r;
int g;
diff --git a/src/lib/evas/canvas/efl_input_device.c b/src/lib/evas/canvas/efl_input_device.c
index 52eae92cbb..3b6f3599c9 100644
--- a/src/lib/evas/canvas/efl_input_device.c
+++ b/src/lib/evas/canvas/efl_input_device.c
@@ -255,7 +255,7 @@ _efl_input_device_children_get(const Eo *obj EINA_UNUSED, Efl_Input_Device_Data
return pd->children;
}
-EOAPI EFL_FUNC_BODY_CONST(efl_input_device_children_get, const Eina_List *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(efl_input_device_children_get, const Eina_List *, NULL);
static Evas *
_efl_input_device_evas_get(const Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd)
@@ -263,7 +263,7 @@ _efl_input_device_evas_get(const Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd)
return pd->evas;
}
-EOAPI EFL_FUNC_BODY_CONST(efl_input_device_evas_get, Evas *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(efl_input_device_evas_get, Evas *, NULL);
static void
_efl_input_device_evas_set(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd, Evas *e)
@@ -271,7 +271,7 @@ _efl_input_device_evas_set(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd, Evas
pd->evas = e;
}
-EOAPI EFL_VOID_FUNC_BODYV(efl_input_device_evas_set, EFL_FUNC_CALL(e), Evas *e);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(efl_input_device_evas_set, EFL_FUNC_CALL(e), Evas *e);
static Evas_Device_Subclass
_efl_input_device_subclass_get(const Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd)
@@ -279,7 +279,7 @@ _efl_input_device_subclass_get(const Eo *obj EINA_UNUSED, Efl_Input_Device_Data
return pd->subclass;
}
-EOAPI EFL_FUNC_BODY_CONST(efl_input_device_subclass_get, Evas_Device_Subclass, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(efl_input_device_subclass_get, Evas_Device_Subclass, 0);
static void
_efl_input_device_subclass_set(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd,
@@ -288,7 +288,7 @@ _efl_input_device_subclass_set(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd,
pd->subclass = sub_clas;
}
-EOAPI EFL_VOID_FUNC_BODYV(efl_input_device_subclass_set, EFL_FUNC_CALL(sub_clas), Evas_Device_Subclass sub_clas);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(efl_input_device_subclass_set, EFL_FUNC_CALL(sub_clas), Evas_Device_Subclass sub_clas);
static void
_grab_del(void *data)
@@ -306,7 +306,7 @@ _efl_input_device_grab_register(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd,
eina_hash_add(pd->grabs, &grab, pdata);
}
-EOAPI EFL_VOID_FUNC_BODYV(efl_input_device_grab_register, EFL_FUNC_CALL(grab, pdata),
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(efl_input_device_grab_register, EFL_FUNC_CALL(grab, pdata),
Efl_Canvas_Object *grab, Evas_Object_Pointer_Data *pdata);
static void
@@ -316,7 +316,7 @@ _efl_input_device_grab_unregister(Eo *obj EINA_UNUSED, Efl_Input_Device_Data *pd
eina_hash_del(pd->grabs, &grab, pdata);
}
-EOAPI EFL_VOID_FUNC_BODYV(efl_input_device_grab_unregister, EFL_FUNC_CALL(grab, pdata),
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(efl_input_device_grab_unregister, EFL_FUNC_CALL(grab, pdata),
Efl_Canvas_Object *grab, Evas_Object_Pointer_Data *pdata);
#define EFL_INPUT_DEVICE_EXTRA_OPS \
diff --git a/src/lib/evas/canvas/efl_input_event.c b/src/lib/evas/canvas/efl_input_event.c
index 90bddde143..f839127015 100644
--- a/src/lib/evas/canvas/efl_input_event.c
+++ b/src/lib/evas/canvas/efl_input_event.c
@@ -133,7 +133,7 @@ efl_input_event_instance_clean(Eo *klass)
/* Internal EO APIs */
-EOAPI EFL_FUNC_BODY_CONST(efl_input_legacy_info_get, void *, NULL)
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(efl_input_legacy_info_get, void *, NULL)
#define EFL_INPUT_EVENT_EXTRA_OPS \
EFL_OBJECT_OP_FUNC(efl_input_legacy_info_get, NULL)
diff --git a/src/lib/evas/canvas/efl_input_focus.c b/src/lib/evas/canvas/efl_input_focus.c
index cb154a0017..9a65e88fbf 100644
--- a/src/lib/evas/canvas/efl_input_focus.c
+++ b/src/lib/evas/canvas/efl_input_focus.c
@@ -97,7 +97,7 @@ _efl_input_focus_efl_duplicate_duplicate(const Eo *obj, Efl_Input_Focus_Data *pd
}
-EOAPI Eo*
+EVAS_API EVAS_API_WEAK Eo*
efl_input_focus_instance_get(Efl_Object *owner, void **priv)
{
Efl_Input_Focus_Data *ev;
diff --git a/src/lib/evas/canvas/efl_input_hold.c b/src/lib/evas/canvas/efl_input_hold.c
index b5ad65b644..926a2f5fe4 100644
--- a/src/lib/evas/canvas/efl_input_hold.c
+++ b/src/lib/evas/canvas/efl_input_hold.c
@@ -80,7 +80,7 @@ _efl_input_hold_efl_object_destructor(Eo *obj, Efl_Input_Hold_Data *pd)
}
-EOAPI Eo*
+EVAS_API EVAS_API_WEAK Eo*
efl_input_hold_instance_get(Efl_Object *owner, void **priv)
{
Efl_Input_Event *evt = efl_input_event_instance_get(EFL_INPUT_HOLD_CLASS, owner);;
diff --git a/src/lib/evas/canvas/efl_input_key.c b/src/lib/evas/canvas/efl_input_key.c
index 79c833ccda..24dfd21d6d 100644
--- a/src/lib/evas/canvas/efl_input_key.c
+++ b/src/lib/evas/canvas/efl_input_key.c
@@ -9,7 +9,7 @@
#define MY_CLASS EFL_INPUT_KEY_CLASS
-EOAPI Eo*
+EVAS_API EVAS_API_WEAK Eo*
efl_input_key_instance_get(Efl_Object *owner, void **priv)
{
Efl_Input_Key_Data *ev;
diff --git a/src/lib/evas/canvas/efl_input_pointer.c b/src/lib/evas/canvas/efl_input_pointer.c
index 33cb80ce68..f0e11fd959 100644
--- a/src/lib/evas/canvas/efl_input_pointer.c
+++ b/src/lib/evas/canvas/efl_input_pointer.c
@@ -21,7 +21,7 @@
*/
/* internal eo */
-EOAPI Eo*
+EVAS_API EVAS_API_WEAK Eo*
efl_input_pointer_instance_get(Efl_Object *owner, void **priv)
{
Efl_Input_Pointer_Data *ev;
@@ -43,7 +43,7 @@ _efl_input_pointer_class_destructor(Efl_Class *klass)
efl_input_event_instance_clean(klass);
}
-EAPI void
+EVAS_API void
efl_input_pointer_finalize(Efl_Input_Pointer *obj)
{
const Evas_Pointer_Data *pdata;
diff --git a/src/lib/evas/canvas/efl_input_pointer.eo b/src/lib/evas/canvas/efl_input_pointer.eo
index a9558def3d..32d5d4a84d 100644
--- a/src/lib/evas/canvas/efl_input_pointer.eo
+++ b/src/lib/evas/canvas/efl_input_pointer.eo
@@ -1,4 +1,5 @@
import efl_input_types;
+import eina_types;
class Efl.Input.Pointer extends Efl.Object implements Efl.Input.Event, Efl.Input.State
{
diff --git a/src/lib/evas/canvas/efl_input_types.eot b/src/lib/evas/canvas/efl_input_types.eot
index a716686528..ccd4b1e484 100644
--- a/src/lib/evas/canvas/efl_input_types.eot
+++ b/src/lib/evas/canvas/efl_input_types.eot
@@ -2,7 +2,7 @@ enum Efl.Pointer.Action
{
[[Pointer event type. Represents which kind of event this is.
- @since 1.19
+ @since 1.24
]]
none, [[Not a valid event, or nothing new happened (eg. when querying
current state of touch points).]]
@@ -22,7 +22,7 @@ enum Efl.Pointer.Flags
{
[[Pointer flags indicating whether a double or triple click is under way.
- @since 1.19
+ @since 1.22
]]
none = 0, [[No extra mouse button data]]
double_click = (1 << 0), [[This mouse button press was the 2nd press of a double click]]
@@ -33,7 +33,7 @@ enum Efl.Input.Flags
{
[[Special flags set during an input event propagation.
- @since 1.19
+ @since 1.22
]]
none = 0, [[No fancy flags set]]
processed = (1 << 0), [[This event is being delivered and has been processed,
@@ -60,8 +60,7 @@ enum @beta Efl.Input.Object_Pointer_Mode {
In the mode $nograb, the pointer will always be bound to the object
right below it.
-
- @since 1.19
+ @since 1.22
]]
auto_grab, [[Default, X11-like.]]
no_grab, [[Pointer always bound to the object right below it.]]
@@ -69,15 +68,13 @@ enum @beta Efl.Input.Object_Pointer_Mode {
where mouse/touch up and down events WON'T be
repeated to objects and these objects wont be
auto-grabbed.
-
- @since 1.2
]]
}
enum @beta Efl.Input.Value {
[[Keys for the generic values of all events.
- @since 1.19
+ @since 1.22
]]
none, [[Not a valid value type.]]
timestamp, [[Timestamp of this event in seconds.]]
@@ -147,7 +144,7 @@ enum Efl.Input.Modifier {
The available keys may vary depending on the physical keyboard layout, or
language and keyboard settings, or depending on the platform.
- @since 1.20
+ @since 1.22
]]
none = 0, [[No key modifier]]
alt = 1 << 0, [[Alt key modifier]]
@@ -168,7 +165,7 @@ enum Efl.Input.Lock {
The available keys may vary depending on the physical keyboard layout, or
language and keyboard settings, or depending on the platform.
- @since 1.20
+ @since 1.22
]]
none = 0, [[No key modifier]]
num = 1 << 0, [[Num Lock for numeric key pad use]]
diff --git a/src/lib/evas/canvas/efl_text_cursor.c b/src/lib/evas/canvas/efl_text_cursor_object.c
index b52298c1c0..070a2521af 100644
--- a/src/lib/evas/canvas/efl_text_cursor.c
+++ b/src/lib/evas/canvas/efl_text_cursor_object.c
@@ -1,15 +1,16 @@
#include "evas_common_private.h"
#include "evas_private.h"
#include "efl_canvas_textblock_internal.h"
+#include "eo_internal.h"
-#define MY_CLASS EFL_TEXT_CURSOR_CLASS
+#define MY_CLASS EFL_TEXT_CURSOR_OBJECT_CLASS
#define MY_CLASS_NAME "Efl.Text.Cursor"
typedef struct
{
Efl_Text_Cursor_Handle *handle;
Efl_Canvas_Object *text_obj;
-} Efl_Text_Cursor_Data;
+} Efl_Text_Cursor_Object_Data;
struct _Evas_Textblock_Selection_Iterator
{
@@ -20,20 +21,22 @@ struct _Evas_Textblock_Selection_Iterator
typedef struct _Evas_Textblock_Selection_Iterator Evas_Textblock_Selection_Iterator;
+EFL_CLASS_SIMPLE_CLASS(efl_text_cursor_object, "Efl.Text.Cursor", EFL_TEXT_CURSOR_OBJECT_CLASS)
+
EOLIAN static void
-_efl_text_cursor_position_set(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, int position)
+_efl_text_cursor_object_position_set(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, int position)
{
evas_textblock_cursor_pos_set(pd->handle, position);
}
EOLIAN static int
-_efl_text_cursor_position_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd)
+_efl_text_cursor_object_position_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd)
{
return evas_textblock_cursor_pos_get(pd->handle);
}
EOLIAN static Eina_Unicode
-_efl_text_cursor_content_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd)
+_efl_text_cursor_object_content_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd)
{
if (pd->handle && pd->handle->node)
return eina_ustrbuf_string_get(pd->handle->node->unicode)[pd->handle->pos];
@@ -42,7 +45,7 @@ _efl_text_cursor_content_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd
}
EOLIAN static Eina_Rect
-_efl_text_cursor_content_geometry_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd)
+_efl_text_cursor_object_content_geometry_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd)
{
Eina_Rect rect = {0};
Eina_Bool item_is = evas_textblock_cursor_format_item_geometry_get(pd->handle, &(rect.x), &(rect.y), &(rect.w), &(rect.h));
@@ -55,13 +58,13 @@ _efl_text_cursor_content_geometry_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor
}
EOLIAN static void
-_efl_text_cursor_line_number_set(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, int line_number)
+_efl_text_cursor_object_line_number_set(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, int line_number)
{
evas_textblock_cursor_line_set(pd->handle, line_number);
}
EOLIAN static int
-_efl_text_cursor_line_number_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd)
+_efl_text_cursor_object_line_number_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd)
{
Eina_Rect rect = {0};
@@ -69,7 +72,7 @@ _efl_text_cursor_line_number_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data
}
EOLIAN static Eina_Rect
-_efl_text_cursor_cursor_geometry_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, Efl_Text_Cursor_Type ctype)
+_efl_text_cursor_object_cursor_geometry_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, Efl_Text_Cursor_Type ctype)
{
Eina_Rect rc = {0};
Evas_Textblock_Cursor_Type cursor_type = (ctype == EFL_TEXT_CURSOR_TYPE_BEFORE) ? EVAS_TEXTBLOCK_CURSOR_BEFORE : EVAS_TEXTBLOCK_CURSOR_UNDER;
@@ -78,7 +81,7 @@ _efl_text_cursor_cursor_geometry_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_
}
EOLIAN static Eina_Bool
-_efl_text_cursor_lower_cursor_geometry_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, Eina_Rect *geometry2)
+_efl_text_cursor_object_lower_cursor_geometry_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, Eina_Rect *geometry2)
{
Eina_Rect rc = {0};
Eina_Bool b_ret = EINA_FALSE;
@@ -91,58 +94,62 @@ _efl_text_cursor_lower_cursor_geometry_get(const Eo *obj EINA_UNUSED, Efl_Text_C
}
EOLIAN static Eina_Bool
-_efl_text_cursor_equal(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, const Efl_Text_Cursor *dst)
+_efl_text_cursor_object_equal(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, const Efl_Text_Cursor_Object *dst)
{
- return evas_textblock_cursor_equal(pd->handle, efl_text_cursor_handle_get(dst));
+ return evas_textblock_cursor_equal(pd->handle, efl_text_cursor_object_handle_get(dst));
}
EOLIAN static int
-_efl_text_cursor_compare(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, const Efl_Text_Cursor *dst)
+_efl_text_cursor_object_compare(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, const Efl_Text_Cursor_Object *dst)
{
- return evas_textblock_cursor_compare(pd->handle, efl_text_cursor_handle_get(dst));
+ return evas_textblock_cursor_compare(pd->handle, efl_text_cursor_object_handle_get(dst));
}
-EOLIAN static void
-_efl_text_cursor_copy(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, Efl_Text_Cursor *dst)
+static void
+_efl_text_cursor_object_copy(const Efl_Text_Cursor_Object *obj, Efl_Text_Cursor_Object *dst)
{
- Efl_Text_Cursor_Data *pd_dest = efl_data_scope_safe_get(dst, MY_CLASS);
+ Efl_Text_Cursor_Object_Data *pd = efl_data_scope_safe_get(obj, MY_CLASS);
+ EINA_SAFETY_ON_NULL_RETURN(pd);
+
+ Efl_Text_Cursor_Object_Data *pd_dest = efl_data_scope_safe_get(dst, MY_CLASS);
EINA_SAFETY_ON_NULL_RETURN(pd_dest);
+
if (!pd->handle) return;
Efl_Text_Cursor_Handle *handle = evas_object_textblock_cursor_new(pd->handle->obj);
evas_textblock_cursor_copy(pd->handle, handle);
pd_dest->text_obj = pd->text_obj;
- efl_text_cursor_handle_set(dst, handle);
+ efl_text_cursor_object_handle_set(dst, handle);
evas_textblock_cursor_unref(handle, NULL);
}
-EOLIAN static Efl_Text_Cursor *
-_efl_text_cursor_efl_duplicate_duplicate(const Eo *obj, Efl_Text_Cursor_Data *pd EINA_UNUSED)
+EOLIAN static Efl_Text_Cursor_Object *
+_efl_text_cursor_object_efl_duplicate_duplicate(const Eo *obj, Efl_Text_Cursor_Object_Data *pd EINA_UNUSED)
{
- Efl_Text_Cursor *dup = efl_new(MY_CLASS);
+ Efl_Text_Cursor_Object *dup = efl_text_cursor_object_create(efl_parent_get(obj));
- efl_text_cursor_copy(obj, dup);
+ _efl_text_cursor_object_copy(obj, dup);
return dup;
}
EOLIAN static Eina_Bool
-_efl_text_cursor_move(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, Efl_Text_Cursor_Move_Type type)
+_efl_text_cursor_object_move(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, Efl_Text_Cursor_Move_Type type)
{
Eina_Bool moved = EINA_FALSE;
int pos = evas_textblock_cursor_pos_get(pd->handle);
switch (type) {
- case EFL_TEXT_CURSOR_MOVE_TYPE_CHAR_NEXT :
+ case EFL_TEXT_CURSOR_MOVE_TYPE_CHARACTER_NEXT :
moved = evas_textblock_cursor_char_next(pd->handle);
break;
- case EFL_TEXT_CURSOR_MOVE_TYPE_CHAR_PREV :
+ case EFL_TEXT_CURSOR_MOVE_TYPE_CHARACTER_PREVIOUS :
moved = evas_textblock_cursor_char_prev(pd->handle);
break;
case EFL_TEXT_CURSOR_MOVE_TYPE_CLUSTER_NEXT :
moved = evas_textblock_cursor_cluster_next(pd->handle);
break;
- case EFL_TEXT_CURSOR_MOVE_TYPE_CLUSTER_PREV :
+ case EFL_TEXT_CURSOR_MOVE_TYPE_CLUSTER_PREVIOUS :
moved = evas_textblock_cursor_cluster_prev(pd->handle);
break;
case EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_START :
@@ -184,7 +191,7 @@ _efl_text_cursor_move(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, Efl_Text_Cu
case EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_NEXT :
moved = evas_textblock_cursor_paragraph_next(pd->handle);
break;
- case EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_PREV :
+ case EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_PREVIOUS :
moved = evas_textblock_cursor_paragraph_prev(pd->handle);
break;
}
@@ -193,13 +200,13 @@ _efl_text_cursor_move(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, Efl_Text_Cu
}
EOLIAN static void
-_efl_text_cursor_char_delete(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd)
+_efl_text_cursor_object_char_delete(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd)
{
evas_textblock_cursor_char_delete(pd->handle);
}
EOLIAN static Eina_Bool
-_efl_text_cursor_line_jump_by(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, int by)
+_efl_text_cursor_object_line_jump_by(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, int by)
{
if (!pd->handle) return EINA_FALSE;
@@ -211,13 +218,13 @@ _efl_text_cursor_line_jump_by(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, int
}
EOLIAN static void
-_efl_text_cursor_char_coord_set(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, Eina_Position2D coord)
+_efl_text_cursor_object_char_coord_set(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, Eina_Position2D coord)
{
evas_textblock_cursor_char_coord_set(pd->handle, coord.x, coord.y);
}
EOLIAN static void
-_efl_text_cursor_cluster_coord_set(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, Eina_Position2D coord)
+_efl_text_cursor_object_cluster_coord_set(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, Eina_Position2D coord)
{
evas_textblock_cursor_cluster_coord_set(pd->handle, coord.x, coord.y);
}
@@ -246,7 +253,8 @@ _cursor_text_append(Efl_Text_Cursor_Handle *cur,
const char *off = text;
int len = 0;
- Evas_Object_Protected_Data *obj = efl_data_scope_get(cur->obj, EFL_CANVAS_OBJECT_CLASS);
+ Evas_Object_Protected_Data *obj = efl_data_scope_safe_get(cur->obj, EFL_CANVAS_OBJECT_CLASS);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(obj, 0);
evas_object_async_block(obj);
while (*off)
@@ -286,33 +294,33 @@ _cursor_text_append(Efl_Text_Cursor_Handle *cur,
}
EOLIAN static void
-_efl_text_cursor_text_insert(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, const char *text)
+_efl_text_cursor_object_text_insert(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, const char *text)
{
_cursor_text_append(pd->handle, text);
}
EOLIAN static char *
-_efl_text_cursor_range_text_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, Efl_Text_Cursor *cur2)
+_efl_text_cursor_object_range_text_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, Efl_Text_Cursor_Object *cur2)
{
- return evas_textblock_cursor_range_text_get(pd->handle, efl_text_cursor_handle_get(cur2), EVAS_TEXTBLOCK_TEXT_PLAIN);
+ return evas_textblock_cursor_range_text_get(pd->handle, efl_text_cursor_object_handle_get(cur2), EVAS_TEXTBLOCK_TEXT_PLAIN);
}
EOLIAN static void
-_efl_text_cursor_markup_insert(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, const char *markup)
+_efl_text_cursor_object_markup_insert(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, const char *markup)
{
evas_object_textblock_text_markup_prepend(pd->handle, markup);
}
EOLIAN static char *
-_efl_text_cursor_range_markup_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, Efl_Text_Cursor *cur2)
+_efl_text_cursor_object_range_markup_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, Efl_Text_Cursor_Object *cur2)
{
- return evas_textblock_cursor_range_text_get(pd->handle,efl_text_cursor_handle_get(cur2), EVAS_TEXTBLOCK_TEXT_MARKUP);
+ return evas_textblock_cursor_range_text_get(pd->handle,efl_text_cursor_object_handle_get(cur2), EVAS_TEXTBLOCK_TEXT_MARKUP);
}
EOLIAN static Eina_Iterator *
-_efl_text_cursor_range_geometry_get(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, Efl_Text_Cursor *cur2)
+_efl_text_cursor_object_range_geometry_get(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, Efl_Text_Cursor_Object *cur2)
{
- return evas_textblock_cursor_range_simple_geometry_get(pd->handle, efl_text_cursor_handle_get(cur2));
+ return evas_textblock_cursor_range_simple_geometry_get(pd->handle, efl_text_cursor_object_handle_get(cur2));
}
/** selection iterator */
@@ -397,22 +405,23 @@ _evas_textblock_selection_iterator_new(Eina_List *list)
}
EOLIAN static Eina_Iterator *
-_efl_text_cursor_range_precise_geometry_get(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, Efl_Text_Cursor *cur2)
+_efl_text_cursor_object_range_precise_geometry_get(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, Efl_Text_Cursor_Object *cur2)
{
- Eina_List *rects = evas_textblock_cursor_range_geometry_get(pd->handle, efl_text_cursor_handle_get(cur2));
+ Eina_List *rects = evas_textblock_cursor_range_geometry_get(pd->handle, efl_text_cursor_object_handle_get(cur2));
return _evas_textblock_selection_iterator_new(rects);
}
EOLIAN static void
-_efl_text_cursor_range_delete(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd, Efl_Text_Cursor *cur2)
+_efl_text_cursor_object_range_delete(Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd, Efl_Text_Cursor_Object *cur2)
{
- evas_textblock_cursor_range_delete(pd->handle, efl_text_cursor_handle_get(cur2));
+ evas_textblock_cursor_range_delete(pd->handle, efl_text_cursor_object_handle_get(cur2));
}
-EAPI void
-efl_text_cursor_handle_set(Eo *obj, Efl_Text_Cursor_Handle *handle)
+EVAS_API void
+efl_text_cursor_object_handle_set(Eo *obj, Efl_Text_Cursor_Handle *handle)
{
- Efl_Text_Cursor_Data *pd = efl_data_scope_get(obj, MY_CLASS);
+ Efl_Text_Cursor_Object_Data *pd = efl_data_scope_safe_get(obj, MY_CLASS);
+ EINA_SAFETY_ON_NULL_RETURN(pd);
if (handle == pd->handle)
return;
@@ -426,16 +435,22 @@ efl_text_cursor_handle_set(Eo *obj, Efl_Text_Cursor_Handle *handle)
}
}
-EAPI Efl_Text_Cursor_Handle *
-efl_text_cursor_handle_get(const Eo *obj)
+EVAS_API Efl_Text_Cursor_Handle *
+efl_text_cursor_object_handle_get(const Eo *obj)
{
- Efl_Text_Cursor_Data *pd = efl_data_scope_get(obj, MY_CLASS);
+ Efl_Text_Cursor_Object_Data *pd = efl_data_scope_safe_get(obj, MY_CLASS);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(pd, NULL);
return pd->handle;
}
-void efl_text_cursor_text_object_set(Eo *cursor, Eo *canvas_text_obj, Eo *text_obj)
+Eo* efl_text_cursor_object_create(Eo *parent)
+{
+ return efl_add(efl_text_cursor_object_realized_class_get(), parent);
+}
+
+void efl_text_cursor_object_text_object_set(Eo *cursor, Eo *canvas_text_obj, Eo *text_obj)
{
- Efl_Text_Cursor_Data *pd = efl_data_scope_safe_get(cursor, MY_CLASS);
+ Efl_Text_Cursor_Object_Data *pd = efl_data_scope_safe_get(cursor, MY_CLASS);
EINA_SAFETY_ON_NULL_RETURN(pd);
Efl_Text_Cursor_Handle *handle = NULL;
if (efl_isa(canvas_text_obj, EFL_CANVAS_TEXTBLOCK_CLASS))
@@ -450,19 +465,19 @@ void efl_text_cursor_text_object_set(Eo *cursor, Eo *canvas_text_obj, Eo *text_o
if (handle)
{
- efl_text_cursor_handle_set(cursor, handle);
+ efl_text_cursor_object_handle_set(cursor, handle);
evas_textblock_cursor_unref(handle, NULL);
}
}
EOLIAN static Efl_Canvas_Object *
-_efl_text_cursor_text_object_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Data *pd)
+_efl_text_cursor_object_text_object_get(const Eo *obj EINA_UNUSED, Efl_Text_Cursor_Object_Data *pd)
{
return pd->text_obj;
}
EOLIAN static void
-_efl_text_cursor_efl_object_destructor(Eo *obj, Efl_Text_Cursor_Data *pd)
+_efl_text_cursor_object_efl_object_destructor(Eo *obj, Efl_Text_Cursor_Object_Data *pd)
{
if (pd->handle)
{
@@ -479,4 +494,4 @@ _efl_text_cursor_efl_object_destructor(Eo *obj, Efl_Text_Cursor_Data *pd)
}
-#include "efl_text_cursor.eo.c"
+#include "efl_text_cursor_object.eo.c"
diff --git a/src/lib/evas/canvas/efl_text_cursor.eo b/src/lib/evas/canvas/efl_text_cursor_object.eo
index 70cfdfad21..9c936047c9 100644
--- a/src/lib/evas/canvas/efl_text_cursor.eo
+++ b/src/lib/evas/canvas/efl_text_cursor_object.eo
@@ -1,34 +1,42 @@
-enum @beta Efl.Text.Cursor_Type
+enum Efl.Text_Cursor.Type
{
- [[Text cursor types.]]
- before, [[Cursor type before.]]
- under [[Cursor type under.]]
+ [[Shape of the text cursor.
+ This is normally used in @Efl.Text_Cursor.Object methods to retrieve the cursor's geometry.
+ @since 1.24
+ ]]
+ before, [[Cursor is a vertical bar (I-beam) placed before the selected character.]]
+ under [[Cursor is an horizontal line (underscore) placed under the selected character.]]
}
-enum @beta Efl.Text.Cursor_Move_Type
+enum Efl.Text_Cursor.Move_Type
{
- [[Text cursor movement types.]]
- char_next, [[Advances to the next character.]]
- char_prev, [[Advances to the previous character.]]
- cluster_next, [[Advances to the next grapheme cluster
+ [[Text cursor movement types.
+
+ @since 1.24
+ ]]
+ character_next, [[Advances to the next character.]]
+ character_previous, [[Advances to the previous character.]]
+ cluster_next, [[Advances to the next grapheme cluster
(A character sequence rendered together. See https://unicode.org/reports/tr29/).]]
- cluster_prev, [[Advances to the previous grapheme cluster
+ cluster_previous, [[Advances to the previous grapheme cluster
(A character sequence rendered together. See https://unicode.org/reports/tr29/).]]
- paragraph_start, [[Advances to the first character in current paragraph.]]
- paragraph_end, [[Advances to the last character in current paragraph.]]
- word_start, [[Advance to current word start.]]
- word_end, [[Advance to current word end.]]
- line_start, [[Advance to current line first character.]]
- line_end, [[Advance to current line last character.]]
- first, [[Advance to first character in the first paragraph.]]
- last, [[Advance to last character in the last paragraph.]]
- paragraph_next, [[Advances to the start of the next paragraph.]]
- paragraph_prev [[Advances to the end of the previous paragraph.]]
+ paragraph_start, [[Advances to the first character in current paragraph.]]
+ paragraph_end, [[Advances to the last character in current paragraph.]]
+ word_start, [[Advance to current word start.]]
+ word_end, [[Advance to current word end.]]
+ line_start, [[Advance to current line first character.]]
+ line_end, [[Advance to current line last character.]]
+ first, [[Advance to first character in the first paragraph.]]
+ last, [[Advance to last character in the last paragraph.]]
+ paragraph_next, [[Advances to the start of the next paragraph.]]
+ paragraph_previous [[Advances to the end of the previous paragraph.]]
}
-class @beta Efl.Text.Cursor extends Efl.Object implements Efl.Duplicate{
- [[Cursor API.]]
- c_prefix: efl_text_cursor;
+abstract Efl.Text_Cursor.Object extends Efl.Object implements Efl.Duplicate{
+ [[Cursor API.
+
+ @since 1.24
+ ]]
methods {
@property position {
@@ -67,15 +75,15 @@ class @beta Efl.Text.Cursor extends Efl.Object implements Efl.Duplicate{
}
@property cursor_geometry {
- [[Returns the geometry of cursor, if cursor is shown for the text
- of the same direction as paragraph,else ("split cursor") will return
+ [[Returns the geometry of cursor, if cursor is shown for the text
+ of the same direction as paragraph,else ("split cursor") will return
and you need to consider the lower ("split cursor") @.lower_cursor_geometry
- Split cursor geometry is valid only in @Efl.Text.Cursor_Type.before cursor mode.]]
+ Split cursor geometry is valid only in @Efl.Text_Cursor.Type.before cursor mode.]]
get {
}
keys {
- ctype: Efl.Text.Cursor_Type; [[The type of the cursor.]]
+ ctype: Efl.Text_Cursor.Type; [[The type of the cursor.]]
}
values {
geometry: Eina.Rect; [[The geometry of the cursor (or upper cursor) in pixels.]]
@@ -86,7 +94,7 @@ class @beta Efl.Text.Cursor extends Efl.Object implements Efl.Duplicate{
[[Returns the geometry of the lower ("split cursor"), if logical cursor is
between LTR/RTL text.
- To get the upper ("split cursor") @.cursor_geometry with @Efl.Text.Cursor_Type.before cursor mode.]]
+ To get the upper ("split cursor") @.cursor_geometry with @Efl.Text_Cursor.Type.before cursor mode.]]
get {
return: bool; [[$true if split cursor, $false otherwise.]]
}
@@ -98,7 +106,7 @@ class @beta Efl.Text.Cursor extends Efl.Object implements Efl.Duplicate{
equal @const {
[[Check if two cursors are equal - faster than compare if all you want is equality.]]
params {
- dst: const(Efl.Text.Cursor); [[Destination Cursor.]]
+ dst: const(Efl.Text_Cursor.Object); [[Destination Cursor.]]
}
return: bool; [[$true if cursors are equal, $false otherwise.]]
}
@@ -107,22 +115,15 @@ class @beta Efl.Text.Cursor extends Efl.Object implements Efl.Duplicate{
[[Compare two cursors
Return <0 if cursor position less than dst, 0 if cursor == dest and >0 otherwise.]]
params {
- dst: const(Efl.Text.Cursor); [[Destination Cursor.]]
+ dst: const(Efl.Text_Cursor.Object); [[Destination Cursor.]]
}
return: int; [[Difference between cursors.]]
}
- copy @const {
- [[Copy existing cursor to destination cursor, like position and cursor text object.]]
- params {
- dst: Efl.Text.Cursor; [[Destination Cursor.]]
- }
- }
-
move {
[[Move the cursor.]]
params {
- @in type: Efl.Text.Cursor_Move_Type; [[The type of movement.]]
+ @in type: Efl.Text_Cursor.Move_Type; [[The type of movement.]]
}
return: bool; [[True if actually moved.]]
}
@@ -173,7 +174,7 @@ class @beta Efl.Text.Cursor extends Efl.Object implements Efl.Duplicate{
[[Markup of a given range in the text.]]
return: mstring @move; [[The markup in the given range.]]
params {
- cur2: Efl.Text.Cursor; [[End of range.]]
+ cur2: Efl.Text_Cursor.Object; [[End of range.]]
}
}
@@ -181,7 +182,7 @@ class @beta Efl.Text.Cursor extends Efl.Object implements Efl.Duplicate{
[[Returns the text in the range between cursor and $cur2.]]
return: mstring @move; [[The text in the given range.]]
params {
- cur2: Efl.Text.Cursor; [[End of range.]]
+ cur2: Efl.Text_Cursor.Object; [[End of range.]]
}
}
@@ -192,10 +193,10 @@ class @beta Efl.Text.Cursor extends Efl.Object implements Efl.Duplicate{
range are merged into one big rectangle. This is an optimized
version of @.range_precise_geometry_get.]]
params {
- cur2: Efl.Text.Cursor; [[End of range.]]
+ cur2: Efl.Text_Cursor.Object; [[End of range.]]
}
return: iterator<Eina.Rect> @move; [[
- Iterator on all geoemtries of the given range.]]
+ Iterator on all geometries of the given range.]]
}
range_precise_geometry_get {
@@ -204,7 +205,7 @@ class @beta Efl.Text.Cursor extends Efl.Object implements Efl.Duplicate{
The geometry is represented as rectangles for each of the line
segments in the given range [$cur1, $cur2].]]
params {
- cur2: Efl.Text.Cursor; [[End of range.]]
+ cur2: Efl.Text_Cursor.Object; [[End of range.]]
}
return: iterator<Eina.Rect> @move; [[
Iterator on all simple geometries of the given range.]]
@@ -215,7 +216,7 @@ class @beta Efl.Text.Cursor extends Efl.Object implements Efl.Duplicate{
This removes all the text in given range [$start,$end].]]
params {
- @in cur2: Efl.Text.Cursor; [[Range end position.]]
+ @in cur2: Efl.Text_Cursor.Object; [[Range end position.]]
}
}
diff --git a/src/lib/evas/canvas/efl_text_formatter.c b/src/lib/evas/canvas/efl_text_formatter.c
index 8325245cd2..96eab7ad9f 100644
--- a/src/lib/evas/canvas/efl_text_formatter.c
+++ b/src/lib/evas/canvas/efl_text_formatter.c
@@ -2,7 +2,7 @@
#include "evas_common_private.h"
#include "evas_private.h"
#include "efl_canvas_textblock_internal.h"
-#include "efl_text_cursor.eo.h"
+#include "efl_text_cursor_object.eo.h"
#define MY_CLASS EFL_TEXT_FORMATTER_CLASS
@@ -12,22 +12,22 @@ typedef struct
} Efl_Text_Formatter_Data;
EOLIAN static void
-_efl_text_formatter_attribute_insert(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end, const char *format)
+_efl_text_formatter_attribute_insert(const Efl_Text_Cursor_Object *start, const Efl_Text_Cursor_Object *end, const char *format)
{
- EINA_SAFETY_ON_TRUE_RETURN(!efl_text_cursor_handle_get(start) ||
- !efl_text_cursor_handle_get(end) ||
- efl_text_cursor_handle_get(start)->obj != efl_text_cursor_handle_get(end)->obj);
+ EINA_SAFETY_ON_TRUE_RETURN(!efl_text_cursor_object_handle_get(start) ||
+ !efl_text_cursor_object_handle_get(end) ||
+ efl_text_cursor_object_handle_get(start)->obj != efl_text_cursor_object_handle_get(end)->obj);
- Eo *eo_obj= efl_text_cursor_handle_get(start)->obj;
+ Eo *eo_obj= efl_text_cursor_object_handle_get(start)->obj;
evas_textblock_async_block(eo_obj);
- _evas_textblock_annotations_insert(eo_obj, efl_text_cursor_handle_get(start), efl_text_cursor_handle_get(end), format,
+ _evas_textblock_annotations_insert(eo_obj, efl_text_cursor_object_handle_get(start), efl_text_cursor_object_handle_get(end), format,
EINA_FALSE);
efl_event_callback_legacy_call(eo_obj, EFL_CANVAS_TEXTBLOCK_EVENT_CHANGED, NULL);
}
EOLIAN static unsigned int
-_efl_text_formatter_attribute_clear(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end)
+_efl_text_formatter_attribute_clear(const Efl_Text_Cursor_Object *start, const Efl_Text_Cursor_Object *end)
{
unsigned int ret = 0;
Eina_Iterator *annotations;
@@ -55,29 +55,29 @@ efl_text_formatter_attribute_get(Efl_Text_Attribute_Handle *annotation)
}
Eina_Iterator *
-efl_text_formatter_range_attributes_get(const Efl_Text_Cursor *start, const Efl_Text_Cursor *end)
+efl_text_formatter_range_attributes_get(const Efl_Text_Cursor_Object *start, const Efl_Text_Cursor_Object *end)
{
Eina_List *lst = NULL;
Efl_Text_Attribute_Handle *it;
- EINA_SAFETY_ON_TRUE_RETURN_VAL(!efl_text_cursor_handle_get(start) ||
- !efl_text_cursor_handle_get(end) ||
- efl_text_cursor_handle_get(start)->obj != efl_text_cursor_handle_get(end)->obj, NULL);
+ EINA_SAFETY_ON_TRUE_RETURN_VAL(!efl_text_cursor_object_handle_get(start) ||
+ !efl_text_cursor_object_handle_get(end) ||
+ efl_text_cursor_object_handle_get(start)->obj != efl_text_cursor_object_handle_get(end)->obj, NULL);
- Eina_Inlist *annotations = _evas_textblock_annotations_get(efl_text_cursor_handle_get(start)->obj);
+ Eina_Inlist *annotations = _evas_textblock_annotations_get(efl_text_cursor_object_handle_get(start)->obj);
EINA_INLIST_FOREACH(annotations, it)
{
Efl_Text_Cursor_Handle start2, end2;
- _evas_textblock_cursor_init(&start2, efl_text_cursor_handle_get(start)->obj);
- _evas_textblock_cursor_init(&end2, efl_text_cursor_handle_get(start)->obj);
+ _evas_textblock_cursor_init(&start2, efl_text_cursor_object_handle_get(start)->obj);
+ _evas_textblock_cursor_init(&end2, efl_text_cursor_object_handle_get(start)->obj);
if (!it->start_node || !it->end_node) continue;
_textblock_cursor_pos_at_fnode_set(&start2, it->start_node);
_textblock_cursor_pos_at_fnode_set(&end2, it->end_node);
evas_textblock_cursor_char_prev(&end2);
- if (!((evas_textblock_cursor_compare(&start2, efl_text_cursor_handle_get(end)) > 0) ||
- (evas_textblock_cursor_compare(&end2, efl_text_cursor_handle_get(start)) < 0)))
+ if (!((evas_textblock_cursor_compare(&start2, efl_text_cursor_object_handle_get(end)) > 0) ||
+ (evas_textblock_cursor_compare(&end2, efl_text_cursor_object_handle_get(start)) < 0)))
{
lst = eina_list_append(lst, it);
}
@@ -86,14 +86,14 @@ efl_text_formatter_range_attributes_get(const Efl_Text_Cursor *start, const Efl_
}
void
-efl_text_formatter_attribute_cursors_get(const Efl_Text_Attribute_Handle *handle, Efl_Text_Cursor *start, Efl_Text_Cursor *end)
+efl_text_formatter_attribute_cursors_get(const Efl_Text_Attribute_Handle *handle, Efl_Text_Cursor_Object *start, Efl_Text_Cursor_Object *end)
{
EINA_SAFETY_ON_TRUE_RETURN (!handle || !(handle->obj));
- efl_text_cursor_text_object_set(start, handle->obj, handle->obj);
- efl_text_cursor_text_object_set(end, handle->obj, handle->obj);
- _textblock_cursor_pos_at_fnode_set(efl_text_cursor_handle_get(start), handle->start_node);
- _textblock_cursor_pos_at_fnode_set(efl_text_cursor_handle_get(end), handle->end_node);
+ efl_text_cursor_object_text_object_set(start, handle->obj, handle->obj);
+ efl_text_cursor_object_text_object_set(end, handle->obj, handle->obj);
+ _textblock_cursor_pos_at_fnode_set(efl_text_cursor_object_handle_get(start), handle->start_node);
+ _textblock_cursor_pos_at_fnode_set(efl_text_cursor_object_handle_get(end), handle->end_node);
}
void
@@ -121,7 +121,8 @@ efl_text_formatter_item_geometry_get(const Efl_Text_Attribute_Handle *annotation
Efl_Text_Cursor_Handle cur;
Eo *eo_obj = annotation->obj;
- Evas_Object_Protected_Data *obj_data = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
+ Evas_Object_Protected_Data *obj_data = efl_data_scope_safe_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(obj_data, EINA_FALSE);
evas_object_async_block(obj_data);
_evas_textblock_relayout_if_needed(eo_obj);
diff --git a/src/lib/evas/canvas/efl_text_formatter.eo b/src/lib/evas/canvas/efl_text_formatter.eo
index fca4e84b3b..a34ce640f5 100644
--- a/src/lib/evas/canvas/efl_text_formatter.eo
+++ b/src/lib/evas/canvas/efl_text_formatter.eo
@@ -1,14 +1,15 @@
-import efl_text_types;
-
-abstract @beta Efl.Text.Formatter extends Efl.Object {
+abstract Efl.Text_Formatter extends Efl.Object {
[[Text Formatter API to manage text formatting(attributes).
- Use it to insert and remove style attributes (font, size, color, ...) using @Efl.Text.Cursor on EFL Widgets.
+ Use it to insert and remove style attributes (font, size, color, ...) using @Efl.Text_Cursor.Object on EFL Widgets.
- Attributes can be assigned to character ranges, selected using two @Efl.Text.Cursor instances.
+ Attributes can be assigned to character ranges, selected using two @Efl.Text_Cursor.Object instances.
Cursor instances are already bound to a text object so there's no need to provide it to this class.
Style is specified using format strings as described in @Efl.Canvas.Textblock.style_apply.
- There is no need to instantiate this class. Use directly the @.attribute_insert and @.attribute_clear static methods.]]
+ There is no need to instantiate this class. Use directly the @.attribute_insert and @.attribute_clear static methods.
+
+ @since 1.24
+ ]]
methods {
attribute_insert @static {
[[Inserts an attribute format in a specified range [$start, $end - 1].
@@ -17,8 +18,8 @@ abstract @beta Efl.Text.Formatter extends Efl.Object {
The passed cursors must belong to same text object, otherwise insertion will be ignored.
]]
params {
- start: const(Efl.Text.Cursor); [[Start of range.]]
- end: const(Efl.Text.Cursor); [[End of range.]]
+ start: const(Efl.Text_Cursor.Object); [[Start of range.]]
+ end: const(Efl.Text_Cursor.Object); [[End of range.]]
format: string; [[Format string. Uses same format as $style in @Efl.Canvas.Textblock.style_apply.]]
}
}
@@ -27,8 +28,8 @@ abstract @beta Efl.Text.Formatter extends Efl.Object {
[[Clear (remove) attributes in the specified range [$start, $end - 1].
]]
params {
- start: const(Efl.Text.Cursor); [[Start of range.]]
- end: const(Efl.Text.Cursor); [[End of range.]]
+ start: const(Efl.Text_Cursor.Object); [[Start of range.]]
+ end: const(Efl.Text_Cursor.Object); [[End of range.]]
}
return: uint; [[Number of removed attributes.]]
}
diff --git a/src/lib/evas/canvas/evas_async_events.c b/src/lib/evas/canvas/evas_async_events.c
index 9e19c3d38d..9b9e6714e8 100644
--- a/src/lib/evas/canvas/evas_async_events.c
+++ b/src/lib/evas/canvas/evas_async_events.c
@@ -171,13 +171,13 @@ evas_async_events_shutdown(void)
return _init_evas_event;
}
-EAPI int
+EVAS_API int
evas_async_events_fd_get(void)
{
return -1;
}
-EAPI int
+EVAS_API int
evas_async_events_process(void)
{
int count = 0;
@@ -207,7 +207,7 @@ _evas_async_events_fd_blocking_set(Eina_Bool blocking)
#endif
}
-EAPI int
+EVAS_API int
evas_async_events_process_blocking(void)
{
int ret;
@@ -224,7 +224,7 @@ evas_async_events_process_blocking(void)
return ret;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func)
{
Evas_Event_Async *ev;
@@ -295,7 +295,7 @@ _evas_thread_main_loop_lock(void *target EINA_UNUSED,
free(call);
}
-EAPI int
+EVAS_API int
evas_thread_main_loop_begin(void)
{
Evas_Safe_Call *order;
@@ -334,7 +334,7 @@ evas_thread_main_loop_begin(void)
return _thread_loop;
}
-EAPI int
+EVAS_API int
evas_thread_main_loop_end(void)
{
int current_id;
diff --git a/src/lib/evas/canvas/evas_box_eo.c b/src/lib/evas/canvas/evas_box_eo.c
index 80bcd33f89..5c2b39f08c 100644
--- a/src/lib/evas/canvas/evas_box_eo.c
+++ b/src/lib/evas/canvas/evas_box_eo.c
@@ -1,163 +1,163 @@
-EWAPI const Efl_Event_Description _EVAS_BOX_EVENT_CHILD_ADDED =
+EVAS_API EVAS_API_WEAK const Efl_Event_Description _EVAS_BOX_EVENT_CHILD_ADDED =
EFL_EVENT_DESCRIPTION("child,added");
-EWAPI const Efl_Event_Description _EVAS_BOX_EVENT_CHILD_REMOVED =
+EVAS_API EVAS_API_WEAK const Efl_Event_Description _EVAS_BOX_EVENT_CHILD_REMOVED =
EFL_EVENT_DESCRIPTION("child,removed");
void _evas_box_align_set(Eo *obj, Evas_Object_Box_Data *pd, double horizontal, double vertical);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_box_align_set, EFL_FUNC_CALL(horizontal, vertical), double horizontal, double vertical);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_box_align_set, EFL_FUNC_CALL(horizontal, vertical), double horizontal, double vertical);
void _evas_box_align_get(const Eo *obj, Evas_Object_Box_Data *pd, double *horizontal, double *vertical);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_box_align_get, EFL_FUNC_CALL(horizontal, vertical), double *horizontal, double *vertical);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_obj_box_align_get, EFL_FUNC_CALL(horizontal, vertical), double *horizontal, double *vertical);
void _evas_box_padding_set(Eo *obj, Evas_Object_Box_Data *pd, int horizontal, int vertical);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_box_padding_set, EFL_FUNC_CALL(horizontal, vertical), int horizontal, int vertical);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_box_padding_set, EFL_FUNC_CALL(horizontal, vertical), int horizontal, int vertical);
void _evas_box_padding_get(const Eo *obj, Evas_Object_Box_Data *pd, int *horizontal, int *vertical);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_box_padding_get, EFL_FUNC_CALL(horizontal, vertical), int *horizontal, int *vertical);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_obj_box_padding_get, EFL_FUNC_CALL(horizontal, vertical), int *horizontal, int *vertical);
void _evas_box_layout_set(Eo *obj, Evas_Object_Box_Data *pd, Evas_Object_Box_Layout cb, const void *data, Eina_Free_Cb free_data);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_box_layout_set, EFL_FUNC_CALL(cb, data, free_data), Evas_Object_Box_Layout cb, const void *data, Eina_Free_Cb free_data);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_box_layout_set, EFL_FUNC_CALL(cb, data, free_data), Evas_Object_Box_Layout cb, const void *data, Eina_Free_Cb free_data);
void _evas_box_layout_horizontal(Eo *obj, Evas_Object_Box_Data *pd, Evas_Object_Box_Data *priv, void *data);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_box_layout_horizontal, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_box_layout_horizontal, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
void _evas_box_layout_vertical(Eo *obj, Evas_Object_Box_Data *pd, Evas_Object_Box_Data *priv, void *data);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_box_layout_vertical, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_box_layout_vertical, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
void _evas_box_layout_homogeneous_max_size_horizontal(Eo *obj, Evas_Object_Box_Data *pd, Evas_Object_Box_Data *priv, void *data);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_box_layout_homogeneous_max_size_horizontal, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_box_layout_homogeneous_max_size_horizontal, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
Efl_Canvas_Object *_evas_box_internal_remove(Eo *obj, Evas_Object_Box_Data *pd, Efl_Canvas_Object *child);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_internal_remove, Efl_Canvas_Object *, NULL, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_internal_remove, Efl_Canvas_Object *, NULL, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
void _evas_box_layout_flow_vertical(Eo *obj, Evas_Object_Box_Data *pd, Evas_Object_Box_Data *priv, void *data);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_box_layout_flow_vertical, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_box_layout_flow_vertical, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
void _evas_box_internal_option_free(Eo *obj, Evas_Object_Box_Data *pd, Evas_Object_Box_Option *opt);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_box_internal_option_free, EFL_FUNC_CALL(opt), Evas_Object_Box_Option *opt);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_box_internal_option_free, EFL_FUNC_CALL(opt), Evas_Object_Box_Option *opt);
Evas_Object_Box_Option *_evas_box_insert_after(Eo *obj, Evas_Object_Box_Data *pd, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_insert_after, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child, reference), Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_insert_after, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child, reference), Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);
Eina_Bool _evas_box_remove_all(Eo *obj, Evas_Object_Box_Data *pd, Eina_Bool clear);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_remove_all, Eina_Bool, 0, EFL_FUNC_CALL(clear), Eina_Bool clear);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_remove_all, Eina_Bool, 0, EFL_FUNC_CALL(clear), Eina_Bool clear);
Eina_Iterator *_evas_box_iterator_new(const Eo *obj, Evas_Object_Box_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_box_iterator_new, Eina_Iterator *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_box_iterator_new, Eina_Iterator *, NULL);
Efl_Canvas_Object *_evas_box_add_to(Eo *obj, Evas_Object_Box_Data *pd);
-EOAPI EFL_FUNC_BODY(evas_obj_box_add_to, Efl_Canvas_Object *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY(evas_obj_box_add_to, Efl_Canvas_Object *, NULL);
Evas_Object_Box_Option *_evas_box_append(Eo *obj, Evas_Object_Box_Data *pd, Efl_Canvas_Object *child);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_append, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_append, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
int _evas_box_option_property_id_get(const Eo *obj, Evas_Object_Box_Data *pd, const char *name);
-EOAPI EFL_FUNC_BODYV_CONST(evas_obj_box_option_property_id_get, int, 0, EFL_FUNC_CALL(name), const char *name);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_obj_box_option_property_id_get, int, 0, EFL_FUNC_CALL(name), const char *name);
Evas_Object_Box_Option *_evas_box_prepend(Eo *obj, Evas_Object_Box_Data *pd, Efl_Canvas_Object *child);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_prepend, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_prepend, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
Eina_Accessor *_evas_box_accessor_new(const Eo *obj, Evas_Object_Box_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_box_accessor_new, Eina_Accessor *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_box_accessor_new, Eina_Accessor *, NULL);
Evas_Object_Box_Option *_evas_box_internal_append(Eo *obj, Evas_Object_Box_Data *pd, Efl_Canvas_Object *child);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_internal_append, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_internal_append, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
Eina_Bool _evas_box_option_property_vset(Eo *obj, Evas_Object_Box_Data *pd, Evas_Object_Box_Option *opt, int property, va_list *args);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_option_property_vset, Eina_Bool, 0, EFL_FUNC_CALL(opt, property, args), Evas_Object_Box_Option *opt, int property, va_list *args);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_option_property_vset, Eina_Bool, 0, EFL_FUNC_CALL(opt, property, args), Evas_Object_Box_Option *opt, int property, va_list *args);
Efl_Canvas_Object *_evas_box_internal_remove_at(Eo *obj, Evas_Object_Box_Data *pd, unsigned int pos);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_internal_remove_at, Efl_Canvas_Object *, NULL, EFL_FUNC_CALL(pos), unsigned int pos);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_internal_remove_at, Efl_Canvas_Object *, NULL, EFL_FUNC_CALL(pos), unsigned int pos);
Eina_Bool _evas_box_remove_at(Eo *obj, Evas_Object_Box_Data *pd, unsigned int pos);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_remove_at, Eina_Bool, 0, EFL_FUNC_CALL(pos), unsigned int pos);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_remove_at, Eina_Bool, 0, EFL_FUNC_CALL(pos), unsigned int pos);
Eina_Bool _evas_box_option_property_vget(const Eo *obj, Evas_Object_Box_Data *pd, Evas_Object_Box_Option *opt, int property, va_list *args);
-EOAPI EFL_FUNC_BODYV_CONST(evas_obj_box_option_property_vget, Eina_Bool, 0, EFL_FUNC_CALL(opt, property, args), Evas_Object_Box_Option *opt, int property, va_list *args);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_obj_box_option_property_vget, Eina_Bool, 0, EFL_FUNC_CALL(opt, property, args), Evas_Object_Box_Option *opt, int property, va_list *args);
Evas_Object_Box_Option *_evas_box_internal_insert_at(Eo *obj, Evas_Object_Box_Data *pd, Efl_Canvas_Object *child, unsigned int pos);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_internal_insert_at, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child, pos), Efl_Canvas_Object *child, unsigned int pos);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_internal_insert_at, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child, pos), Efl_Canvas_Object *child, unsigned int pos);
Evas_Object_Box_Option *_evas_box_insert_before(Eo *obj, Evas_Object_Box_Data *pd, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_insert_before, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child, reference), Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_insert_before, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child, reference), Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);
const char *_evas_box_option_property_name_get(const Eo *obj, Evas_Object_Box_Data *pd, int property);
-EOAPI EFL_FUNC_BODYV_CONST(evas_obj_box_option_property_name_get, const char *, NULL, EFL_FUNC_CALL(property), int property);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_obj_box_option_property_name_get, const char *, NULL, EFL_FUNC_CALL(property), int property);
Evas_Object_Box_Option *_evas_box_internal_insert_before(Eo *obj, Evas_Object_Box_Data *pd, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_internal_insert_before, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child, reference), Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_internal_insert_before, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child, reference), Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);
void _evas_box_layout_homogeneous_horizontal(Eo *obj, Evas_Object_Box_Data *pd, Evas_Object_Box_Data *priv, void *data);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_box_layout_homogeneous_horizontal, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_box_layout_homogeneous_horizontal, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
Evas_Object_Box_Option *_evas_box_internal_option_new(Eo *obj, Evas_Object_Box_Data *pd, Efl_Canvas_Object *child);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_internal_option_new, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_internal_option_new, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
void _evas_box_layout_homogeneous_max_size_vertical(Eo *obj, Evas_Object_Box_Data *pd, Evas_Object_Box_Data *priv, void *data);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_box_layout_homogeneous_max_size_vertical, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_box_layout_homogeneous_max_size_vertical, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
Evas_Object_Box_Option *_evas_box_internal_insert_after(Eo *obj, Evas_Object_Box_Data *pd, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_internal_insert_after, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child, reference), Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_internal_insert_after, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child, reference), Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);
Evas_Object_Box_Option *_evas_box_insert_at(Eo *obj, Evas_Object_Box_Data *pd, Efl_Canvas_Object *child, unsigned int pos);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_insert_at, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child, pos), Efl_Canvas_Object *child, unsigned int pos);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_insert_at, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child, pos), Efl_Canvas_Object *child, unsigned int pos);
Evas_Object_Box_Option *_evas_box_internal_prepend(Eo *obj, Evas_Object_Box_Data *pd, Efl_Canvas_Object *child);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_internal_prepend, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_internal_prepend, Evas_Object_Box_Option *, NULL, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
Eina_Bool _evas_box_remove(Eo *obj, Evas_Object_Box_Data *pd, Efl_Canvas_Object *child);
-EOAPI EFL_FUNC_BODYV(evas_obj_box_remove, Eina_Bool, 0, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_box_remove, Eina_Bool, 0, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
void _evas_box_layout_stack(Eo *obj, Evas_Object_Box_Data *pd, Evas_Object_Box_Data *priv, void *data);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_box_layout_stack, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_box_layout_stack, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
void _evas_box_layout_homogeneous_vertical(Eo *obj, Evas_Object_Box_Data *pd, Evas_Object_Box_Data *priv, void *data);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_box_layout_homogeneous_vertical, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_box_layout_homogeneous_vertical, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
void _evas_box_layout_flow_horizontal(Eo *obj, Evas_Object_Box_Data *pd, Evas_Object_Box_Data *priv, void *data);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_box_layout_flow_horizontal, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_box_layout_flow_horizontal, EFL_FUNC_CALL(priv, data), Evas_Object_Box_Data *priv, void *data);
int _evas_box_count(Eo *obj, Evas_Object_Box_Data *pd);
-EOAPI EFL_FUNC_BODY(evas_obj_box_count, int, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY(evas_obj_box_count, int, 0);
Efl_Object *_evas_box_efl_object_constructor(Eo *obj, Evas_Object_Box_Data *pd);
diff --git a/src/lib/evas/canvas/evas_box_eo.h b/src/lib/evas/canvas/evas_box_eo.h
index 2f36d7c490..d9134cf5c5 100644
--- a/src/lib/evas/canvas/evas_box_eo.h
+++ b/src/lib/evas/canvas/evas_box_eo.h
@@ -19,7 +19,7 @@ typedef Eo Evas_Box;
*/
#define EVAS_BOX_CLASS evas_box_class_get()
-EWAPI const Efl_Class *evas_box_class_get(void);
+EVAS_API EVAS_API_WEAK const Efl_Class *evas_box_class_get(void) EINA_CONST;
/**
* @brief Set the alignment of the whole bounding box of contents, for a given
@@ -41,7 +41,7 @@ EWAPI const Efl_Class *evas_box_class_get(void);
*
* @ingroup Evas_Box
*/
-EOAPI void evas_obj_box_align_set(Eo *obj, double horizontal, double vertical);
+EVAS_API EVAS_API_WEAK void evas_obj_box_align_set(Eo *obj, double horizontal, double vertical);
/**
* @brief Get the alignment of the whole bounding box of contents, for a given
@@ -55,7 +55,7 @@ EOAPI void evas_obj_box_align_set(Eo *obj, double horizontal, double vertical);
*
* @ingroup Evas_Box
*/
-EOAPI void evas_obj_box_align_get(const Eo *obj, double *horizontal, double *vertical);
+EVAS_API EVAS_API_WEAK void evas_obj_box_align_get(const Eo *obj, double *horizontal, double *vertical);
/**
* @brief Set the (space) padding between cells set for a given box object.
@@ -70,7 +70,7 @@ EOAPI void evas_obj_box_align_get(const Eo *obj, double *horizontal, double *ver
*
* @ingroup Evas_Box
*/
-EOAPI void evas_obj_box_padding_set(Eo *obj, int horizontal, int vertical);
+EVAS_API EVAS_API_WEAK void evas_obj_box_padding_set(Eo *obj, int horizontal, int vertical);
/**
* @brief Get the (space) padding between cells set for a given box object.
@@ -83,7 +83,7 @@ EOAPI void evas_obj_box_padding_set(Eo *obj, int horizontal, int vertical);
*
* @ingroup Evas_Box
*/
-EOAPI void evas_obj_box_padding_get(const Eo *obj, int *horizontal, int *vertical);
+EVAS_API EVAS_API_WEAK void evas_obj_box_padding_get(const Eo *obj, int *horizontal, int *vertical);
/**
* @brief Set a new layouting function to a given box object
@@ -110,7 +110,7 @@ EOAPI void evas_obj_box_padding_get(const Eo *obj, int *horizontal, int *vertica
*
* @ingroup Evas_Box
*/
-EOAPI void evas_obj_box_layout_set(Eo *obj, Evas_Object_Box_Layout cb, const void *data, Eina_Free_Cb free_data) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK void evas_obj_box_layout_set(Eo *obj, Evas_Object_Box_Layout cb, const void *data, Eina_Free_Cb free_data) EINA_ARG_NONNULL(2);
/**
* @brief Layout function which sets the box o to a (basic) horizontal box
@@ -161,7 +161,7 @@ EOAPI void evas_obj_box_layout_set(Eo *obj, Evas_Object_Box_Layout cb, const voi
*
* @ingroup Evas_Box
*/
-EOAPI void evas_obj_box_layout_horizontal(Eo *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK void evas_obj_box_layout_horizontal(Eo *obj, Evas_Object_Box_Data *priv, void *data);
/**
* @brief Layout function which sets the box o to a (basic) vertical box
@@ -176,7 +176,7 @@ EOAPI void evas_obj_box_layout_horizontal(Eo *obj, Evas_Object_Box_Data *priv, v
*
* @ingroup Evas_Box
*/
-EOAPI void evas_obj_box_layout_vertical(Eo *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK void evas_obj_box_layout_vertical(Eo *obj, Evas_Object_Box_Data *priv, void *data);
/**
* @brief Layout function which sets the box o to a maximum size, homogeneous
@@ -221,10 +221,10 @@ EOAPI void evas_obj_box_layout_vertical(Eo *obj, Evas_Object_Box_Data *priv, voi
*
* @ingroup Evas_Box
*/
-EOAPI void evas_obj_box_layout_homogeneous_max_size_horizontal(Eo *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK void evas_obj_box_layout_homogeneous_max_size_horizontal(Eo *obj, Evas_Object_Box_Data *priv, void *data);
/**
- * @brief No description supplied by the EAPI.
+ * @brief No description supplied by the EVAS_API.
*
* @param[in] obj The object.
* @param[in] child Child object to be removed
@@ -233,7 +233,7 @@ EOAPI void evas_obj_box_layout_homogeneous_max_size_horizontal(Eo *obj, Evas_Obj
*
* @ingroup Evas_Box
*/
-EOAPI Efl_Canvas_Object *evas_obj_box_internal_remove(Eo *obj, Efl_Canvas_Object *child);
+EVAS_API EVAS_API_WEAK Efl_Canvas_Object *evas_obj_box_internal_remove(Eo *obj, Efl_Canvas_Object *child);
/**
* @brief Layout function which sets the box o to a flow vertical box.
@@ -248,17 +248,17 @@ EOAPI Efl_Canvas_Object *evas_obj_box_internal_remove(Eo *obj, Efl_Canvas_Object
*
* @ingroup Evas_Box
*/
-EOAPI void evas_obj_box_layout_flow_vertical(Eo *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK void evas_obj_box_layout_flow_vertical(Eo *obj, Evas_Object_Box_Data *priv, void *data);
/**
- * @brief No description supplied by the EAPI.
+ * @brief No description supplied by the EVAS_API.
*
* @param[in] obj The object.
* @param[in] opt Box option to be freed
*
* @ingroup Evas_Box
*/
-EOAPI void evas_obj_box_internal_option_free(Eo *obj, Evas_Object_Box_Option *opt);
+EVAS_API EVAS_API_WEAK void evas_obj_box_internal_option_free(Eo *obj, Evas_Object_Box_Option *opt);
/**
* @brief Insert a new child object after another existing one, in a given box
@@ -283,7 +283,7 @@ EOAPI void evas_obj_box_internal_option_free(Eo *obj, Evas_Object_Box_Option *op
*
* @ingroup Evas_Box
*/
-EOAPI Evas_Object_Box_Option *evas_obj_box_insert_after(Eo *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference) EINA_ARG_NONNULL(2, 3);
+EVAS_API EVAS_API_WEAK Evas_Object_Box_Option *evas_obj_box_insert_after(Eo *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference) EINA_ARG_NONNULL(2, 3);
/**
* @brief Remove all child objects from a box object, unparenting them again.
@@ -299,7 +299,7 @@ EOAPI Evas_Object_Box_Option *evas_obj_box_insert_after(Eo *obj, Efl_Canvas_Obje
*
* @ingroup Evas_Box
*/
-EOAPI Eina_Bool evas_obj_box_remove_all(Eo *obj, Eina_Bool clear);
+EVAS_API EVAS_API_WEAK Eina_Bool evas_obj_box_remove_all(Eo *obj, Eina_Bool clear);
/**
* @brief Get an iterator to walk the list of children of a given box object.
@@ -313,7 +313,7 @@ EOAPI Eina_Bool evas_obj_box_remove_all(Eo *obj, Eina_Bool clear);
*
* @ingroup Evas_Box
*/
-EOAPI Eina_Iterator *evas_obj_box_iterator_new(const Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Eina_Iterator *evas_obj_box_iterator_new(const Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Add a new box as a child of a given smart object.
@@ -327,7 +327,7 @@ EOAPI Eina_Iterator *evas_obj_box_iterator_new(const Eo *obj) EINA_WARN_UNUSED_R
*
* @ingroup Evas_Box
*/
-EOAPI Efl_Canvas_Object *evas_obj_box_add_to(Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Efl_Canvas_Object *evas_obj_box_add_to(Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Append a new child object to the given box object o.
@@ -349,7 +349,7 @@ EOAPI Efl_Canvas_Object *evas_obj_box_add_to(Eo *obj) EINA_WARN_UNUSED_RESULT;
*
* @ingroup Evas_Box
*/
-EOAPI Evas_Object_Box_Option *evas_obj_box_append(Eo *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK Evas_Object_Box_Option *evas_obj_box_append(Eo *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
/**
* @brief Get the numerical identifier of the property of the child elements of
@@ -369,7 +369,7 @@ EOAPI Evas_Object_Box_Option *evas_obj_box_append(Eo *obj, Efl_Canvas_Object *ch
*
* @ingroup Evas_Box
*/
-EOAPI int evas_obj_box_option_property_id_get(const Eo *obj, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK int evas_obj_box_option_property_id_get(const Eo *obj, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(2);
/**
* @brief Prepend a new child object to the given box object o.
@@ -391,7 +391,7 @@ EOAPI int evas_obj_box_option_property_id_get(const Eo *obj, const char *name) E
*
* @ingroup Evas_Box
*/
-EOAPI Evas_Object_Box_Option *evas_obj_box_prepend(Eo *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK Evas_Object_Box_Option *evas_obj_box_prepend(Eo *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
/**
* @brief Get an accessor (a structure providing random items access) to the
@@ -406,10 +406,10 @@ EOAPI Evas_Object_Box_Option *evas_obj_box_prepend(Eo *obj, Efl_Canvas_Object *c
*
* @ingroup Evas_Box
*/
-EOAPI Eina_Accessor *evas_obj_box_accessor_new(const Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Eina_Accessor *evas_obj_box_accessor_new(const Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
- * @brief No description supplied by the EAPI.
+ * @brief No description supplied by the EVAS_API.
*
* @param[in] obj The object.
* @param[in] child Child object to be appended
@@ -418,7 +418,7 @@ EOAPI Eina_Accessor *evas_obj_box_accessor_new(const Eo *obj) EINA_WARN_UNUSED_R
*
* @ingroup Evas_Box
*/
-EOAPI Evas_Object_Box_Option *evas_obj_box_internal_append(Eo *obj, Efl_Canvas_Object *child);
+EVAS_API EVAS_API_WEAK Evas_Object_Box_Option *evas_obj_box_internal_append(Eo *obj, Efl_Canvas_Object *child);
/**
* @brief Set a property value (by its given numerical identifier), on a given
@@ -438,10 +438,10 @@ EOAPI Evas_Object_Box_Option *evas_obj_box_internal_append(Eo *obj, Efl_Canvas_O
*
* @ingroup Evas_Box
*/
-EOAPI Eina_Bool evas_obj_box_option_property_vset(Eo *obj, Evas_Object_Box_Option *opt, int property, va_list *args) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK Eina_Bool evas_obj_box_option_property_vset(Eo *obj, Evas_Object_Box_Option *opt, int property, va_list *args) EINA_ARG_NONNULL(2);
/**
- * @brief No description supplied by the EAPI.
+ * @brief No description supplied by the EVAS_API.
*
* @param[in] obj The object.
* @param[in] pos Position of object to be removed
@@ -450,7 +450,7 @@ EOAPI Eina_Bool evas_obj_box_option_property_vset(Eo *obj, Evas_Object_Box_Optio
*
* @ingroup Evas_Box
*/
-EOAPI Efl_Canvas_Object *evas_obj_box_internal_remove_at(Eo *obj, unsigned int pos);
+EVAS_API EVAS_API_WEAK Efl_Canvas_Object *evas_obj_box_internal_remove_at(Eo *obj, unsigned int pos);
/**
* @brief Remove an object, bound to a given position in a box object,
@@ -475,7 +475,7 @@ EOAPI Efl_Canvas_Object *evas_obj_box_internal_remove_at(Eo *obj, unsigned int p
*
* @ingroup Evas_Box
*/
-EOAPI Eina_Bool evas_obj_box_remove_at(Eo *obj, unsigned int pos);
+EVAS_API EVAS_API_WEAK Eina_Bool evas_obj_box_remove_at(Eo *obj, unsigned int pos);
/**
* @brief Get a property's value (by its given numerical identifier), on a
@@ -496,10 +496,10 @@ EOAPI Eina_Bool evas_obj_box_remove_at(Eo *obj, unsigned int pos);
*
* @ingroup Evas_Box
*/
-EOAPI Eina_Bool evas_obj_box_option_property_vget(const Eo *obj, Evas_Object_Box_Option *opt, int property, va_list *args) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK Eina_Bool evas_obj_box_option_property_vget(const Eo *obj, Evas_Object_Box_Option *opt, int property, va_list *args) EINA_ARG_NONNULL(2);
/**
- * @brief No description supplied by the EAPI.
+ * @brief No description supplied by the EVAS_API.
*
* @param[in] obj The object.
* @param[in] child Child object to be inserted
@@ -509,7 +509,7 @@ EOAPI Eina_Bool evas_obj_box_option_property_vget(const Eo *obj, Evas_Object_Box
*
* @ingroup Evas_Box
*/
-EOAPI Evas_Object_Box_Option *evas_obj_box_internal_insert_at(Eo *obj, Efl_Canvas_Object *child, unsigned int pos);
+EVAS_API EVAS_API_WEAK Evas_Object_Box_Option *evas_obj_box_internal_insert_at(Eo *obj, Efl_Canvas_Object *child, unsigned int pos);
/**
* @brief Insert a new child object before another existing one, in a given box
@@ -534,7 +534,7 @@ EOAPI Evas_Object_Box_Option *evas_obj_box_internal_insert_at(Eo *obj, Efl_Canva
*
* @ingroup Evas_Box
*/
-EOAPI Evas_Object_Box_Option *evas_obj_box_insert_before(Eo *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference) EINA_ARG_NONNULL(2, 3);
+EVAS_API EVAS_API_WEAK Evas_Object_Box_Option *evas_obj_box_insert_before(Eo *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference) EINA_ARG_NONNULL(2, 3);
/**
* @brief Get the name of the property of the child elements of the box o which
@@ -555,10 +555,10 @@ EOAPI Evas_Object_Box_Option *evas_obj_box_insert_before(Eo *obj, Efl_Canvas_Obj
*
* @ingroup Evas_Box
*/
-EOAPI const char *evas_obj_box_option_property_name_get(const Eo *obj, int property) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK const char *evas_obj_box_option_property_name_get(const Eo *obj, int property) EINA_WARN_UNUSED_RESULT;
/**
- * @brief No description supplied by the EAPI.
+ * @brief No description supplied by the EVAS_API.
*
* @param[in] obj The object.
* @param[in] child Object to be inserted
@@ -568,7 +568,7 @@ EOAPI const char *evas_obj_box_option_property_name_get(const Eo *obj, int prope
*
* @ingroup Evas_Box
*/
-EOAPI Evas_Object_Box_Option *evas_obj_box_internal_insert_before(Eo *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);
+EVAS_API EVAS_API_WEAK Evas_Object_Box_Option *evas_obj_box_internal_insert_before(Eo *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);
/**
* @brief Layout function which sets the box o to a homogeneous horizontal box
@@ -605,10 +605,10 @@ EOAPI Evas_Object_Box_Option *evas_obj_box_internal_insert_before(Eo *obj, Efl_C
*
* @ingroup Evas_Box
*/
-EOAPI void evas_obj_box_layout_homogeneous_horizontal(Eo *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK void evas_obj_box_layout_homogeneous_horizontal(Eo *obj, Evas_Object_Box_Data *priv, void *data);
/**
- * @brief No description supplied by the EAPI.
+ * @brief No description supplied by the EVAS_API.
*
* @param[in] obj The object.
* @param[in] child New box object
@@ -617,7 +617,7 @@ EOAPI void evas_obj_box_layout_homogeneous_horizontal(Eo *obj, Evas_Object_Box_D
*
* @ingroup Evas_Box
*/
-EOAPI Evas_Object_Box_Option *evas_obj_box_internal_option_new(Eo *obj, Efl_Canvas_Object *child);
+EVAS_API EVAS_API_WEAK Evas_Object_Box_Option *evas_obj_box_internal_option_new(Eo *obj, Efl_Canvas_Object *child);
/**
* @brief Layout function which sets the box o to a maximum size, homogeneous
@@ -633,10 +633,10 @@ EOAPI Evas_Object_Box_Option *evas_obj_box_internal_option_new(Eo *obj, Efl_Canv
*
* @ingroup Evas_Box
*/
-EOAPI void evas_obj_box_layout_homogeneous_max_size_vertical(Eo *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK void evas_obj_box_layout_homogeneous_max_size_vertical(Eo *obj, Evas_Object_Box_Data *priv, void *data);
/**
- * @brief No description supplied by the EAPI.
+ * @brief No description supplied by the EVAS_API.
*
* @param[in] obj The object.
* @param[in] child Object to be inserted
@@ -646,7 +646,7 @@ EOAPI void evas_obj_box_layout_homogeneous_max_size_vertical(Eo *obj, Evas_Objec
*
* @ingroup Evas_Box
*/
-EOAPI Evas_Object_Box_Option *evas_obj_box_internal_insert_after(Eo *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);
+EVAS_API EVAS_API_WEAK Evas_Object_Box_Option *evas_obj_box_internal_insert_after(Eo *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference);
/**
* @brief Insert a new child object at a given position, in a given box object
@@ -673,10 +673,10 @@ EOAPI Evas_Object_Box_Option *evas_obj_box_internal_insert_after(Eo *obj, Efl_Ca
*
* @ingroup Evas_Box
*/
-EOAPI Evas_Object_Box_Option *evas_obj_box_insert_at(Eo *obj, Efl_Canvas_Object *child, unsigned int pos) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK Evas_Object_Box_Option *evas_obj_box_insert_at(Eo *obj, Efl_Canvas_Object *child, unsigned int pos) EINA_ARG_NONNULL(2);
/**
- * @brief No description supplied by the EAPI.
+ * @brief No description supplied by the EVAS_API.
*
* @param[in] obj The object.
* @param[in] child Object to be prepended
@@ -685,7 +685,7 @@ EOAPI Evas_Object_Box_Option *evas_obj_box_insert_at(Eo *obj, Efl_Canvas_Object
*
* @ingroup Evas_Box
*/
-EOAPI Evas_Object_Box_Option *evas_obj_box_internal_prepend(Eo *obj, Efl_Canvas_Object *child);
+EVAS_API EVAS_API_WEAK Evas_Object_Box_Option *evas_obj_box_internal_prepend(Eo *obj, Efl_Canvas_Object *child);
/**
* @brief Remove a given object from a box object, unparenting it again.
@@ -705,7 +705,7 @@ EOAPI Evas_Object_Box_Option *evas_obj_box_internal_prepend(Eo *obj, Efl_Canvas_
*
* @ingroup Evas_Box
*/
-EOAPI Eina_Bool evas_obj_box_remove(Eo *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK Eina_Bool evas_obj_box_remove(Eo *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
/**
* @brief Layout function which sets the box o to a stacking box
@@ -731,7 +731,7 @@ EOAPI Eina_Bool evas_obj_box_remove(Eo *obj, Efl_Canvas_Object *child) EINA_ARG_
*
* @ingroup Evas_Box
*/
-EOAPI void evas_obj_box_layout_stack(Eo *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK void evas_obj_box_layout_stack(Eo *obj, Evas_Object_Box_Data *priv, void *data);
/**
* @brief Layout function which sets the box o to a homogeneous vertical box.
@@ -746,7 +746,7 @@ EOAPI void evas_obj_box_layout_stack(Eo *obj, Evas_Object_Box_Data *priv, void *
*
* @ingroup Evas_Box
*/
-EOAPI void evas_obj_box_layout_homogeneous_vertical(Eo *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK void evas_obj_box_layout_homogeneous_vertical(Eo *obj, Evas_Object_Box_Data *priv, void *data);
/**
* @brief Layout function which sets the box o to a flow horizontal box.
@@ -784,7 +784,7 @@ EOAPI void evas_obj_box_layout_homogeneous_vertical(Eo *obj, Evas_Object_Box_Dat
*
* @ingroup Evas_Box
*/
-EOAPI void evas_obj_box_layout_flow_horizontal(Eo *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API EVAS_API_WEAK void evas_obj_box_layout_flow_horizontal(Eo *obj, Evas_Object_Box_Data *priv, void *data);
/**
* @brief Returns the number of items in the box.
@@ -795,9 +795,9 @@ EOAPI void evas_obj_box_layout_flow_horizontal(Eo *obj, Evas_Object_Box_Data *pr
*
* @ingroup Evas_Box
*/
-EOAPI int evas_obj_box_count(Eo *obj);
+EVAS_API EVAS_API_WEAK int evas_obj_box_count(Eo *obj);
-EWAPI extern const Efl_Event_Description _EVAS_BOX_EVENT_CHILD_ADDED;
+EVAS_API EVAS_API_WEAK extern const Efl_Event_Description _EVAS_BOX_EVENT_CHILD_ADDED;
/** Called when a child object was added to the box
* @return Evas_Object_Box_Option *
@@ -806,7 +806,7 @@ EWAPI extern const Efl_Event_Description _EVAS_BOX_EVENT_CHILD_ADDED;
*/
#define EVAS_BOX_EVENT_CHILD_ADDED (&(_EVAS_BOX_EVENT_CHILD_ADDED))
-EWAPI extern const Efl_Event_Description _EVAS_BOX_EVENT_CHILD_REMOVED;
+EVAS_API EVAS_API_WEAK extern const Efl_Event_Description _EVAS_BOX_EVENT_CHILD_REMOVED;
/** Called when a child object was removed from the box
* @return Efl_Canvas_Object *
diff --git a/src/lib/evas/canvas/evas_box_eo.legacy.c b/src/lib/evas/canvas/evas_box_eo.legacy.c
index c2ac6b840c..1eedf18f37 100644
--- a/src/lib/evas/canvas/evas_box_eo.legacy.c
+++ b/src/lib/evas/canvas/evas_box_eo.legacy.c
@@ -1,161 +1,161 @@
-EAPI void
+EVAS_API void
evas_object_box_align_set(Evas_Box *obj, double horizontal, double vertical)
{
evas_obj_box_align_set(obj, horizontal, vertical);
}
-EAPI void
+EVAS_API void
evas_object_box_align_get(const Evas_Box *obj, double *horizontal, double *vertical)
{
evas_obj_box_align_get(obj, horizontal, vertical);
}
-EAPI void
+EVAS_API void
evas_object_box_padding_set(Evas_Box *obj, int horizontal, int vertical)
{
evas_obj_box_padding_set(obj, horizontal, vertical);
}
-EAPI void
+EVAS_API void
evas_object_box_padding_get(const Evas_Box *obj, int *horizontal, int *vertical)
{
evas_obj_box_padding_get(obj, horizontal, vertical);
}
-EAPI void
+EVAS_API void
evas_object_box_layout_set(Evas_Box *obj, Evas_Object_Box_Layout cb, const void *data, Eina_Free_Cb free_data)
{
evas_obj_box_layout_set(obj, cb, data, free_data);
}
-EAPI void
+EVAS_API void
evas_object_box_layout_horizontal(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data)
{
evas_obj_box_layout_horizontal(obj, priv, data);
}
-EAPI void
+EVAS_API void
evas_object_box_layout_vertical(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data)
{
evas_obj_box_layout_vertical(obj, priv, data);
}
-EAPI void
+EVAS_API void
evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data)
{
evas_obj_box_layout_homogeneous_max_size_horizontal(obj, priv, data);
}
-EAPI void
+EVAS_API void
evas_object_box_layout_flow_vertical(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data)
{
evas_obj_box_layout_flow_vertical(obj, priv, data);
}
-EAPI Evas_Object_Box_Option *
+EVAS_API Evas_Object_Box_Option *
evas_object_box_insert_after(Evas_Box *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference)
{
return evas_obj_box_insert_after(obj, child, reference);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_box_remove_all(Evas_Box *obj, Eina_Bool clear)
{
return evas_obj_box_remove_all(obj, clear);
}
-EAPI Eina_Iterator *
+EVAS_API Eina_Iterator *
evas_object_box_iterator_new(const Evas_Box *obj)
{
return evas_obj_box_iterator_new(obj);
}
-EAPI Efl_Canvas_Object *
+EVAS_API Efl_Canvas_Object *
evas_object_box_add_to(Evas_Box *obj)
{
return evas_obj_box_add_to(obj);
}
-EAPI Evas_Object_Box_Option *
+EVAS_API Evas_Object_Box_Option *
evas_object_box_append(Evas_Box *obj, Efl_Canvas_Object *child)
{
return evas_obj_box_append(obj, child);
}
-EAPI int
+EVAS_API int
evas_object_box_option_property_id_get(const Evas_Box *obj, const char *name)
{
return evas_obj_box_option_property_id_get(obj, name);
}
-EAPI Evas_Object_Box_Option *
+EVAS_API Evas_Object_Box_Option *
evas_object_box_prepend(Evas_Box *obj, Efl_Canvas_Object *child)
{
return evas_obj_box_prepend(obj, child);
}
-EAPI Eina_Accessor *
+EVAS_API Eina_Accessor *
evas_object_box_accessor_new(const Evas_Box *obj)
{
return evas_obj_box_accessor_new(obj);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_box_remove_at(Evas_Box *obj, unsigned int pos)
{
return evas_obj_box_remove_at(obj, pos);
}
-EAPI Evas_Object_Box_Option *
+EVAS_API Evas_Object_Box_Option *
evas_object_box_insert_before(Evas_Box *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference)
{
return evas_obj_box_insert_before(obj, child, reference);
}
-EAPI const char *
+EVAS_API const char *
evas_object_box_option_property_name_get(const Evas_Box *obj, int property)
{
return evas_obj_box_option_property_name_get(obj, property);
}
-EAPI void
+EVAS_API void
evas_object_box_layout_homogeneous_horizontal(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data)
{
evas_obj_box_layout_homogeneous_horizontal(obj, priv, data);
}
-EAPI void
+EVAS_API void
evas_object_box_layout_homogeneous_max_size_vertical(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data)
{
evas_obj_box_layout_homogeneous_max_size_vertical(obj, priv, data);
}
-EAPI Evas_Object_Box_Option *
+EVAS_API Evas_Object_Box_Option *
evas_object_box_insert_at(Evas_Box *obj, Efl_Canvas_Object *child, unsigned int pos)
{
return evas_obj_box_insert_at(obj, child, pos);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_box_remove(Evas_Box *obj, Efl_Canvas_Object *child)
{
return evas_obj_box_remove(obj, child);
}
-EAPI void
+EVAS_API void
evas_object_box_layout_stack(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data)
{
evas_obj_box_layout_stack(obj, priv, data);
}
-EAPI void
+EVAS_API void
evas_object_box_layout_homogeneous_vertical(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data)
{
evas_obj_box_layout_homogeneous_vertical(obj, priv, data);
}
-EAPI void
+EVAS_API void
evas_object_box_layout_flow_horizontal(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data)
{
evas_obj_box_layout_flow_horizontal(obj, priv, data);
diff --git a/src/lib/evas/canvas/evas_box_eo.legacy.h b/src/lib/evas/canvas/evas_box_eo.legacy.h
index ba67589525..71c0d8ff4e 100644
--- a/src/lib/evas/canvas/evas_box_eo.legacy.h
+++ b/src/lib/evas/canvas/evas_box_eo.legacy.h
@@ -34,7 +34,7 @@ typedef Eo Evas_Box;
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI void evas_object_box_align_set(Evas_Box *obj, double horizontal, double vertical);
+EVAS_API void evas_object_box_align_set(Evas_Box *obj, double horizontal, double vertical);
/**
* @brief Get the alignment of the whole bounding box of contents, for a given
@@ -48,7 +48,7 @@ EAPI void evas_object_box_align_set(Evas_Box *obj, double horizontal, double ver
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI void evas_object_box_align_get(const Evas_Box *obj, double *horizontal, double *vertical);
+EVAS_API void evas_object_box_align_get(const Evas_Box *obj, double *horizontal, double *vertical);
/**
* @brief Set the (space) padding between cells set for a given box object.
@@ -63,7 +63,7 @@ EAPI void evas_object_box_align_get(const Evas_Box *obj, double *horizontal, dou
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI void evas_object_box_padding_set(Evas_Box *obj, int horizontal, int vertical);
+EVAS_API void evas_object_box_padding_set(Evas_Box *obj, int horizontal, int vertical);
/**
* @brief Get the (space) padding between cells set for a given box object.
@@ -76,7 +76,7 @@ EAPI void evas_object_box_padding_set(Evas_Box *obj, int horizontal, int vertica
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI void evas_object_box_padding_get(const Evas_Box *obj, int *horizontal, int *vertical);
+EVAS_API void evas_object_box_padding_get(const Evas_Box *obj, int *horizontal, int *vertical);
/**
* @brief Set a new layouting function to a given box object
@@ -105,7 +105,7 @@ EAPI void evas_object_box_padding_get(const Evas_Box *obj, int *horizontal, int
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI void evas_object_box_layout_set(Evas_Box *obj, Evas_Object_Box_Layout cb, const void *data, Eina_Free_Cb free_data) EINA_ARG_NONNULL(2);
+EVAS_API void evas_object_box_layout_set(Evas_Box *obj, Evas_Object_Box_Layout cb, const void *data, Eina_Free_Cb free_data) EINA_ARG_NONNULL(2);
/**
* @brief Layout function which sets the box o to a (basic) horizontal box
@@ -156,7 +156,7 @@ EAPI void evas_object_box_layout_set(Evas_Box *obj, Evas_Object_Box_Layout cb, c
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI void evas_object_box_layout_horizontal(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API void evas_object_box_layout_horizontal(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
/**
* @brief Layout function which sets the box o to a (basic) vertical box
@@ -171,7 +171,7 @@ EAPI void evas_object_box_layout_horizontal(Evas_Box *obj, Evas_Object_Box_Data
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI void evas_object_box_layout_vertical(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API void evas_object_box_layout_vertical(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
/**
* @brief Layout function which sets the box o to a maximum size, homogeneous
@@ -216,7 +216,7 @@ EAPI void evas_object_box_layout_vertical(Evas_Box *obj, Evas_Object_Box_Data *p
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI void evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API void evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
/**
@@ -232,7 +232,7 @@ EAPI void evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Box *obj,
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI void evas_object_box_layout_flow_vertical(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API void evas_object_box_layout_flow_vertical(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
/**
@@ -258,7 +258,7 @@ EAPI void evas_object_box_layout_flow_vertical(Evas_Box *obj, Evas_Object_Box_Da
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI Evas_Object_Box_Option *evas_object_box_insert_after(Evas_Box *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference) EINA_ARG_NONNULL(2, 3);
+EVAS_API Evas_Object_Box_Option *evas_object_box_insert_after(Evas_Box *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference) EINA_ARG_NONNULL(2, 3);
/**
* @brief Remove all child objects from a box object, unparenting them again.
@@ -274,7 +274,7 @@ EAPI Evas_Object_Box_Option *evas_object_box_insert_after(Evas_Box *obj, Efl_Can
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI Eina_Bool evas_object_box_remove_all(Evas_Box *obj, Eina_Bool clear);
+EVAS_API Eina_Bool evas_object_box_remove_all(Evas_Box *obj, Eina_Bool clear);
/**
* @brief Get an iterator to walk the list of children of a given box object.
@@ -288,7 +288,7 @@ EAPI Eina_Bool evas_object_box_remove_all(Evas_Box *obj, Eina_Bool clear);
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI Eina_Iterator *evas_object_box_iterator_new(const Evas_Box *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Eina_Iterator *evas_object_box_iterator_new(const Evas_Box *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Add a new box as a child of a given smart object.
@@ -302,7 +302,7 @@ EAPI Eina_Iterator *evas_object_box_iterator_new(const Evas_Box *obj) EINA_WARN_
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI Efl_Canvas_Object *evas_object_box_add_to(Evas_Box *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Efl_Canvas_Object *evas_object_box_add_to(Evas_Box *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Append a new child object to the given box object o.
@@ -324,7 +324,7 @@ EAPI Efl_Canvas_Object *evas_object_box_add_to(Evas_Box *obj) EINA_WARN_UNUSED_R
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI Evas_Object_Box_Option *evas_object_box_append(Evas_Box *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
+EVAS_API Evas_Object_Box_Option *evas_object_box_append(Evas_Box *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
/**
* @brief Get the numerical identifier of the property of the child elements of
@@ -344,7 +344,7 @@ EAPI Evas_Object_Box_Option *evas_object_box_append(Evas_Box *obj, Efl_Canvas_Ob
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI int evas_object_box_option_property_id_get(const Evas_Box *obj, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(2);
+EVAS_API int evas_object_box_option_property_id_get(const Evas_Box *obj, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(2);
/**
* @brief Prepend a new child object to the given box object o.
@@ -366,7 +366,7 @@ EAPI int evas_object_box_option_property_id_get(const Evas_Box *obj, const char
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI Evas_Object_Box_Option *evas_object_box_prepend(Evas_Box *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
+EVAS_API Evas_Object_Box_Option *evas_object_box_prepend(Evas_Box *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
/**
* @brief Get an accessor (a structure providing random items access) to the
@@ -381,7 +381,7 @@ EAPI Evas_Object_Box_Option *evas_object_box_prepend(Evas_Box *obj, Efl_Canvas_O
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI Eina_Accessor *evas_object_box_accessor_new(const Evas_Box *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Eina_Accessor *evas_object_box_accessor_new(const Evas_Box *obj) EINA_WARN_UNUSED_RESULT;
@@ -409,7 +409,7 @@ EAPI Eina_Accessor *evas_object_box_accessor_new(const Evas_Box *obj) EINA_WARN_
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI Eina_Bool evas_object_box_remove_at(Evas_Box *obj, unsigned int pos);
+EVAS_API Eina_Bool evas_object_box_remove_at(Evas_Box *obj, unsigned int pos);
@@ -436,7 +436,7 @@ EAPI Eina_Bool evas_object_box_remove_at(Evas_Box *obj, unsigned int pos);
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI Evas_Object_Box_Option *evas_object_box_insert_before(Evas_Box *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference) EINA_ARG_NONNULL(2, 3);
+EVAS_API Evas_Object_Box_Option *evas_object_box_insert_before(Evas_Box *obj, Efl_Canvas_Object *child, const Efl_Canvas_Object *reference) EINA_ARG_NONNULL(2, 3);
/**
* @brief Get the name of the property of the child elements of the box o which
@@ -457,7 +457,7 @@ EAPI Evas_Object_Box_Option *evas_object_box_insert_before(Evas_Box *obj, Efl_Ca
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI const char *evas_object_box_option_property_name_get(const Evas_Box *obj, int property) EINA_WARN_UNUSED_RESULT;
+EVAS_API const char *evas_object_box_option_property_name_get(const Evas_Box *obj, int property) EINA_WARN_UNUSED_RESULT;
/**
@@ -495,7 +495,7 @@ EAPI const char *evas_object_box_option_property_name_get(const Evas_Box *obj, i
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI void evas_object_box_layout_homogeneous_horizontal(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API void evas_object_box_layout_homogeneous_horizontal(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
/**
@@ -512,7 +512,7 @@ EAPI void evas_object_box_layout_homogeneous_horizontal(Evas_Box *obj, Evas_Obje
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI void evas_object_box_layout_homogeneous_max_size_vertical(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API void evas_object_box_layout_homogeneous_max_size_vertical(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
/**
@@ -540,7 +540,7 @@ EAPI void evas_object_box_layout_homogeneous_max_size_vertical(Evas_Box *obj, Ev
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI Evas_Object_Box_Option *evas_object_box_insert_at(Evas_Box *obj, Efl_Canvas_Object *child, unsigned int pos) EINA_ARG_NONNULL(2);
+EVAS_API Evas_Object_Box_Option *evas_object_box_insert_at(Evas_Box *obj, Efl_Canvas_Object *child, unsigned int pos) EINA_ARG_NONNULL(2);
/**
@@ -561,7 +561,7 @@ EAPI Evas_Object_Box_Option *evas_object_box_insert_at(Evas_Box *obj, Efl_Canvas
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI Eina_Bool evas_object_box_remove(Evas_Box *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
+EVAS_API Eina_Bool evas_object_box_remove(Evas_Box *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
/**
* @brief Layout function which sets the box o to a stacking box
@@ -587,7 +587,7 @@ EAPI Eina_Bool evas_object_box_remove(Evas_Box *obj, Efl_Canvas_Object *child) E
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI void evas_object_box_layout_stack(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API void evas_object_box_layout_stack(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
/**
* @brief Layout function which sets the box o to a homogeneous vertical box.
@@ -602,7 +602,7 @@ EAPI void evas_object_box_layout_stack(Evas_Box *obj, Evas_Object_Box_Data *priv
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI void evas_object_box_layout_homogeneous_vertical(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API void evas_object_box_layout_homogeneous_vertical(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
/**
* @brief Layout function which sets the box o to a flow horizontal box.
@@ -640,7 +640,7 @@ EAPI void evas_object_box_layout_homogeneous_vertical(Evas_Box *obj, Evas_Object
*
* @ingroup Evas_Object_Box_Group
*/
-EAPI void evas_object_box_layout_flow_horizontal(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
+EVAS_API void evas_object_box_layout_flow_horizontal(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data);
#endif
diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c
index d9aac154f8..39bf42c6d5 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -193,7 +193,8 @@ _eo_evas_object_cb(void *data, const Efl_Event *event)
if (event_flags) evflags = *event_flags;
info->func.object_cb(info->data, evas, event->object, event_info);
if (event_flags && (evflags != *event_flags))
- efl_input_event_flags_set(efl_event_info, *event_flags);
+ efl_input_event_flags_set(efl_event_info,
+ (Efl_Input_Flags)*event_flags);
}
static void
@@ -403,7 +404,7 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
if ((type == EVAS_CALLBACK_MOUSE_DOWN) || (type == EVAS_CALLBACK_MOUSE_UP))
{
- flags = efl_input_pointer_button_flags_get(event_info);
+ flags = (Evas_Button_Flags)efl_input_pointer_button_flags_get(event_info);
if (flags & CLICK_MASK)
{
if (obj->last_mouse_down_counter < (e->last_mouse_down_counter - 1))
@@ -432,7 +433,7 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
e->current_event = EVAS_CALLBACK_MULTI_DOWN;
efl_event_callback_call(eo_obj, EFL_EVENT_FINGER_DOWN, event_info);
}
- efl_input_pointer_button_flags_set(event_info, flags);
+ efl_input_pointer_button_flags_set(event_info, (Efl_Pointer_Flags) flags);
}
else if (type == EVAS_CALLBACK_MOUSE_UP)
{
@@ -441,7 +442,7 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
e->current_event = EVAS_CALLBACK_MULTI_UP;
efl_event_callback_call(eo_obj, EFL_EVENT_FINGER_UP, event_info);
}
- efl_input_pointer_button_flags_set(event_info, flags);
+ efl_input_pointer_button_flags_set(event_info, (Efl_Pointer_Flags)flags);
}
else if (type == EVAS_CALLBACK_MOUSE_MOVE)
{
@@ -473,14 +474,14 @@ nothing_here:
_evas_unwalk(e);
}
-EAPI void
+EVAS_API void
evas_object_event_callback_add(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
{
evas_object_event_callback_priority_add(eo_obj, type,
EVAS_CALLBACK_PRIORITY_DEFAULT, func, data);
}
-EAPI void
+EVAS_API void
evas_object_event_callback_priority_add(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Object_Event_Cb func, const void *data)
{
Evas_Object_Protected_Data *obj;
@@ -508,7 +509,7 @@ evas_object_event_callback_priority_add(Evas_Object *eo_obj, Evas_Callback_Type
eina_inlist_append(obj->callbacks, EINA_INLIST_GET(cb_info));
}
-EAPI void *
+EVAS_API void *
evas_object_event_callback_del(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func)
{
Evas_Object_Protected_Data *obj;
@@ -538,7 +539,7 @@ evas_object_event_callback_del(Evas_Object *eo_obj, Evas_Callback_Type type, Eva
return NULL;
}
-EAPI void *
+EVAS_API void *
evas_object_event_callback_del_full(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
{
Evas_Object_Protected_Data *obj;
@@ -568,7 +569,7 @@ evas_object_event_callback_del_full(Evas_Object *eo_obj, Evas_Callback_Type type
return NULL;
}
-EAPI void
+EVAS_API void
evas_event_callback_add(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
{
evas_event_callback_priority_add(eo_e, type, EVAS_CALLBACK_PRIORITY_DEFAULT,
@@ -593,7 +594,7 @@ _deferred_callbacks_process(Evas *eo_e, Evas_Public_Data *e)
}
}
-EAPI void
+EVAS_API void
evas_event_callback_priority_add(Evas *eo_e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data)
{
Evas_Public_Data *e;
@@ -629,7 +630,7 @@ evas_event_callback_priority_add(Evas *eo_e, Evas_Callback_Type type, Evas_Callb
}
}
-EAPI void *
+EVAS_API void *
evas_event_callback_del(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func)
{
Evas_Public_Data *e;
@@ -673,7 +674,7 @@ evas_event_callback_del(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func)
return NULL;
}
-EAPI void *
+EVAS_API void *
evas_event_callback_del_full(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
{
Evas_Public_Data *e;
@@ -717,7 +718,7 @@ evas_event_callback_del_full(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb
return NULL;
}
-EAPI void
+EVAS_API void
evas_post_event_callback_push(Evas *eo_e, Evas_Object_Event_Post_Cb func, const void *data)
{
Evas_Public_Data *e;
@@ -731,7 +732,7 @@ evas_post_event_callback_push(Evas *eo_e, Evas_Object_Event_Post_Cb func, const
if (e->delete_me) return;
if (e->current_event == EVAS_CALLBACK_LAST)
{
- ERR("%s() can only be called from an input event callback!", __FUNCTION__);
+ ERR("%s() can only be called from an input event callback!", __func__);
return;
}
EVAS_MEMPOOL_INIT(_mp_pc, "evas_post_callback", Evas_Post_Callback, 64, );
@@ -746,7 +747,7 @@ evas_post_event_callback_push(Evas *eo_e, Evas_Object_Event_Post_Cb func, const
e->post_events = eina_list_prepend(e->post_events, pc);
}
-EAPI void
+EVAS_API void
evas_post_event_callback_remove(Evas *eo_e, Evas_Object_Event_Post_Cb func)
{
Evas_Public_Data *e;
@@ -767,7 +768,7 @@ evas_post_event_callback_remove(Evas *eo_e, Evas_Object_Event_Post_Cb func)
}
}
-EAPI void
+EVAS_API void
evas_post_event_callback_remove_full(Evas *eo_e, Evas_Object_Event_Post_Cb func, const void *data)
{
Evas_Public_Data *e;
@@ -872,3 +873,10 @@ evas_object_callbacks_event_catcher_del(Eo *eo_obj EINA_UNUSED, Evas_Object_Prot
}
}
+void
+evas_object_callbacks_shutdown(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
+{
+ if (obj->animator_ref > 0)
+ efl_event_callback_del(obj->layer->evas->evas, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _animator_repeater, obj);
+ obj->animator_ref = 0;
+}
diff --git a/src/lib/evas/canvas/evas_canvas3d_camera.c b/src/lib/evas/canvas/evas_canvas3d_camera.c
deleted file mode 100644
index 97f0576431..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_camera.c
+++ /dev/null
@@ -1,203 +0,0 @@
-#include "evas_common_private.h"
-#include "evas_private.h"
-
-#define MY_CLASS EVAS_CANVAS3D_CAMERA_CLASS
-
-static Eina_Bool
-_camera_node_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
- void *data EINA_UNUSED, void *fdata)
-{
- Evas_Canvas3D_Node *n = *(Evas_Canvas3D_Node **)key;
- evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_CAMERA, (Evas_Canvas3D_Object *)fdata);
- return EINA_TRUE;
-}
-
-EOLIAN static void
-_evas_canvas3d_camera_evas_canvas3d_object_change_notify(Eo *obj,Evas_Canvas3D_Camera_Data *pd, Evas_Canvas3D_State state EINA_UNUSED, Evas_Canvas3D_Object *ref EINA_UNUSED)
-{
- if (pd->nodes) eina_hash_foreach(pd->nodes, _camera_node_change_notify, obj);
-}
-
-EOLIAN static void
-_evas_canvas3d_camera_evas_canvas3d_object_update_notify(Eo *obj EINA_UNUSED,
- Evas_Canvas3D_Camera_Data *pd EINA_UNUSED)
-{
-
-}
-
-void
-evas_canvas3d_camera_node_add(Evas_Canvas3D_Camera *camera, Evas_Canvas3D_Node *node)
-{
- Evas_Canvas3D_Camera_Data *pd = efl_data_scope_get(camera, MY_CLASS);
- int count = 0;
-
- if (!pd->nodes)
- {
- pd->nodes = eina_hash_pointer_new(NULL);
-
- if (!pd->nodes)
- {
- ERR("Failed to create hash table. camera(%p)", camera);
- return;
- }
- }
- else count = (int)(uintptr_t)eina_hash_find(pd->nodes, &node);
- eina_hash_set(pd->nodes, &node, (const void *)(uintptr_t)(count + 1));
-}
-
-void
-evas_canvas3d_camera_node_del(Evas_Canvas3D_Camera *camera, Evas_Canvas3D_Node *node)
-{
- Evas_Canvas3D_Camera_Data *pd = efl_data_scope_get(camera, MY_CLASS);
- int count = 0;
-
- if (!pd->nodes)
- {
- ERR("No node to delete.");
- return;
- }
-
- count = (int)(uintptr_t)eina_hash_find(pd->nodes, &node);
- if (count == 1) eina_hash_del(pd->nodes, &node, NULL);
- else eina_hash_set(pd->nodes, &node, (const void *)(uintptr_t)(count - 1));
-}
-
-EOLIAN static Eo *
-_evas_canvas3d_camera_efl_object_constructor(Eo *obj,
- Evas_Canvas3D_Camera_Data *pd EINA_UNUSED)
-{
- obj = efl_constructor(efl_super(obj, MY_CLASS));
- evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_CAMERA);
-
- return obj;
-}
-
-EOLIAN static void
-_evas_canvas3d_camera_efl_object_destructor(Eo *obj,
- Evas_Canvas3D_Camera_Data *pd)
-{
- Eina_Iterator *it = NULL;
- void *data = NULL;
- Evas_Canvas3D_Node_Data *node = NULL;
-
- if (pd->nodes)
- {
- it = eina_hash_iterator_key_new(pd->nodes);
- while (eina_iterator_next(it, &data))
- {
- node = efl_data_scope_get(data, EVAS_CANVAS3D_NODE_CLASS);
- node->data.camera.camera = NULL;
- }
-
- eina_hash_free(pd->nodes);
- }
-
- efl_destructor(efl_super(obj, MY_CLASS));
-}
-
-EAPI Evas_Canvas3D_Camera *
-evas_canvas3d_camera_add(Evas *e)
-{
- MAGIC_CHECK(e, Evas, MAGIC_EVAS);
- return NULL;
- MAGIC_CHECK_END();
- return efl_add(MY_CLASS, e);
-}
-
-EOLIAN static void
-_evas_canvas3d_camera_projection_matrix_set(Eo *obj, Evas_Canvas3D_Camera_Data *pd,
- const Evas_Real *matrix)
-{
- eina_matrix4_array_set(&pd->projection, matrix);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_camera_projection_matrix_get(const Eo *obj EINA_UNUSED,
- Evas_Canvas3D_Camera_Data *pd,
- Evas_Real *matrix)
-{
- memcpy(matrix, &pd->projection.xx, sizeof(Evas_Real) * 16);
-}
-
-EOLIAN static void
-_evas_canvas3d_camera_projection_perspective_set(Eo *obj, Evas_Canvas3D_Camera_Data *pd,
- Evas_Real fovy, Evas_Real aspect,
- Evas_Real dnear, Evas_Real dfar)
-{
- Evas_Real xmax;
- Evas_Real ymax;
-
- ymax = dnear * (Evas_Real)tan((double)fovy * M_PI / 360.0);
- xmax = ymax * aspect;
-
- evas_mat4_frustum_set(&pd->projection, -xmax, xmax, -ymax, ymax, dnear, dfar);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_camera_projection_frustum_set(Eo *obj, Evas_Canvas3D_Camera_Data *pd,
- Evas_Real left, Evas_Real right,
- Evas_Real bottom, Evas_Real top,
- Evas_Real dnear, Evas_Real dfar)
-{
- evas_mat4_frustum_set(&pd->projection, left, right, bottom, top, dnear, dfar);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_camera_projection_ortho_set(Eo *obj, Evas_Canvas3D_Camera_Data *pd,
- Evas_Real left, Evas_Real right,
- Evas_Real bottom, Evas_Real top,
- Evas_Real dnear, Evas_Real dfar)
-{
- eina_matrix4_ortho_set(&pd->projection, left, right, bottom, top, dnear, dfar);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL);
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_camera_node_visible_get(Eo *obj EINA_UNUSED, Evas_Canvas3D_Camera_Data *pd, Evas_Canvas3D_Node *camera_node, Evas_Canvas3D_Node *node, Evas_Canvas3D_Frustum_Mode key)
-{
- Eina_Matrix4 matrix_vp;
- Eina_Quaternion planes[6];
- Evas_Canvas3D_Node_Data *pd_node = efl_data_scope_get(node, EVAS_CANVAS3D_NODE_CLASS);
- Evas_Canvas3D_Node_Data *pd_camera = efl_data_scope_get(camera_node, EVAS_CANVAS3D_NODE_CLASS);
- Eina_Vector3 central_point;
-
- if (!node || pd_node->type != EVAS_CANVAS3D_NODE_TYPE_MESH)
- {
- ERR("Mesh node %p type mismatch.", node);
- return EINA_FALSE;
- }
-
- if (!camera_node || pd_camera->type != EVAS_CANVAS3D_NODE_TYPE_CAMERA)
- {
- ERR("Camera node %p type mismatch.", camera_node);
- return EINA_FALSE;
- }
-
- /*get need matrix like multiply projection matrix with view matrix*/
- eina_matrix4_multiply(&matrix_vp, &pd->projection, &pd_camera->data.camera.matrix_world_to_eye);
-
- evas_frustum_calculate(planes, &matrix_vp);
-
- if (key == EVAS_CANVAS3D_FRUSTUM_MODE_BSPHERE)
- return evas_is_sphere_in_frustum(&pd_node->bsphere, planes);
- else if (key == EVAS_CANVAS3D_FRUSTUM_MODE_AABB)
- return evas_is_box_in_frustum(&pd_node->aabb, planes);
- else if (key == EVAS_CANVAS3D_FRUSTUM_MODE_CENTRAL_POINT)
- {
- central_point.x = (pd_node->aabb.p0.x + pd_node->aabb.p1.x) / 2;
- central_point.y = (pd_node->aabb.p0.y + pd_node->aabb.p1.y) / 2;
- central_point.z = (pd_node->aabb.p0.z + pd_node->aabb.p1.z) / 2;
- return evas_is_point_in_frustum(&central_point, planes);
- }
- else
- {
- ERR("Unknown frustun mode.");
- return EINA_TRUE;
- }
-}
-
-#include "canvas/evas_canvas3d_camera.eo.c"
-
diff --git a/src/lib/evas/canvas/evas_canvas3d_camera.eo b/src/lib/evas/canvas/evas_canvas3d_camera.eo
deleted file mode 100644
index 9cd98007f2..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_camera.eo
+++ /dev/null
@@ -1,89 +0,0 @@
-import evas_canvas3d_types;
-
-class @beta Evas.Canvas3D.Camera extends Evas.Canvas3D.Object
-{
- [[Evas 3D canvas camera class]]
- data: Evas_Canvas3D_Camera_Data;
- methods {
- projection_matrix_set {
- [[Set the projection matrix of the given camera.
-
- Default projection matrix is identity matrix.
-
- See also @.projection_perspective_set, @.projection_ortho_set and @.projection_frustum_set.]]
- params {
- @in matrix: ptr(const(Evas.Real)); [[Projection Matrix]]
- }
- }
-
- projection_matrix_get @const {
- [[Get the projection matrix of the given camera.
-
- See also @.projection_matrix_set.]]
- params {
- @out matrix: Evas.Real; [[Projection Matrix]]
- }
- }
-
- projection_perspective_set {
- [[Set the projection matrix of the given camera with perspective projection.
-
- See also @.projection_matrix_set.]]
-
- params {
- fovy: Evas.Real; [[Field of view angle in Y direction.]]
- aspect: Evas.Real; [[Aspect ratio.]]
- dnear: Evas.Real; [[Distance to near clipping plane.]]
- dfar: Evas.Real; [[Distance to far clipping plane.]]
- }
- }
-
- projection_frustum_set {
- [[Set the projection matrix of the given camera with frustum projection.
-
- See also @.projection_matrix_set.]]
- params {
- left: Evas.Real; [[Left X coordinate of the near clipping plane.]]
- right: Evas.Real; [[Right X coordinate of the near clipping plane..]]
- bottom: Evas.Real; [[Bottom Y coordinate of the near clipping plane.]]
- top: Evas.Real; [[Top Y coordinate of the near clipping plane]]
- dnear: Evas.Real; [[Distance to near clipping plane.]]
- dfar: Evas.Real; [[Distance to far clipping plane.]]
- }
- }
- projection_ortho_set {
- [[Set the projection matrix of the given camera with orthogonal projection.
-
- See also @.projection_matrix_set.]]
- params {
- left: Evas.Real; [[Left X coordinate of the near clipping plane.]]
- right: Evas.Real; [[Right X coordinate of the near clipping plane..]]
- bottom: Evas.Real; [[Bottom Y coordinate of the near clipping plane.]]
- top: Evas.Real; [[Top Y coordinate of the near clipping plane]]
- dnear: Evas.Real; [[Distance to near clipping plane.]]
- dfar: Evas.Real; [[Distance to far clipping plane.]]
- }
- }
- node_visible_get {
- [[Check is bounding sphere of given node inside frustum of camera node.
-
- If the nodes are $null or nodes type mismatch error wrong type of nodes will be generated and returned $false.]]
- return: bool; [[$true in frustum, $false otherwise]]
- params {
- @in camera_node: Evas.Canvas3D.Node; [[The given camera node.]]
- @in node: Evas.Canvas3D.Node; [[The given node.]]
- @in key: Evas.Canvas3D.Frustum_Mode; [[The given key]]
- }
- }
- }
-
- implements {
- Efl.Object.constructor;
- Efl.Object.destructor;
- Evas.Canvas3D.Object.update_notify;
- Evas.Canvas3D.Object.change_notify;
- @empty Evas.Canvas3D.Object.callback_register;
- @empty Evas.Canvas3D.Object.callback_unregister;
- }
-
-}
diff --git a/src/lib/evas/canvas/evas_canvas3d_eet.c b/src/lib/evas/canvas/evas_canvas3d_eet.c
deleted file mode 100644
index ca24450626..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_eet.c
+++ /dev/null
@@ -1,211 +0,0 @@
-#include "evas_common_private.h"
-#include "evas_private.h"
-
-static Eet_Data_Descriptor *_vec2_descriptor = NULL;
-static Eet_Data_Descriptor *_vec3_descriptor = NULL;
-static Eet_Data_Descriptor *_vertex_descriptor = NULL;
-static Eet_Data_Descriptor *_geometry_descriptor = NULL;
-static Eet_Data_Descriptor *_color_descriptor = NULL;
-static Eet_Data_Descriptor *_material_descriptor = NULL;
-static Eet_Data_Descriptor *_frame_descriptor = NULL;
-static Eet_Data_Descriptor *_mesh_descriptor = NULL;
-static Eet_Data_Descriptor *_header_descriptor = NULL;
-static Eet_Data_Descriptor *_file_descriptor = NULL;
-
-Evas_Canvas3D_File_Eet *
-_evas_canvas3d_eet_file_new(void)
-{
- Evas_Canvas3D_File_Eet *creating_file = calloc(1, sizeof(Evas_Canvas3D_File_Eet));
-
- if (!creating_file)
- {
- ERR("Could not calloc Evas_Canvas3D_File_Eet");
- return NULL;
- }
-
- return creating_file;
-}
-
-Eet_Data_Descriptor*
-_evas_canvas3d_eet_file_get(void)
-{
- if(_file_descriptor == NULL)
- _evas_canvas3d_eet_file_init();
-
- return _file_descriptor;
-}
-void
-_evas_canvas3d_eet_file_init(void)
-{
-/* initialization of bonding between structure units in eet file */
- Eet_Data_Descriptor_Class eddc;
- EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Vec2_Eet);
- _vec2_descriptor = eet_data_descriptor_file_new(&eddc);
- EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Vec3_Eet);
- _vec3_descriptor = eet_data_descriptor_file_new(&eddc);
- EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Vertex_Eet);
- _vertex_descriptor = eet_data_descriptor_file_new(&eddc);
- EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Geometry_Eet);
- _geometry_descriptor = eet_data_descriptor_file_new(&eddc);
- EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Color_Eet);
- _color_descriptor = eet_data_descriptor_file_new(&eddc);
- EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Frame_Eet);
- _frame_descriptor = eet_data_descriptor_file_new(&eddc);
- EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Material_Eet);
- _material_descriptor = eet_data_descriptor_file_new(&eddc);
- EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Mesh_Eet);
- _mesh_descriptor = eet_data_descriptor_file_new(&eddc);
- EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Header_Eet);
- _header_descriptor = eet_data_descriptor_file_new(&eddc);
- EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_File_Eet);
- _file_descriptor = eet_data_descriptor_file_new(&eddc);
-
-/* Vec_2 */
-#define ADD_BASIC(member, eet_type) EET_DATA_DESCRIPTOR_ADD_BASIC \
- (_vec2_descriptor, Evas_Canvas3D_Vec3_Eet, # member, member, eet_type);
- ADD_BASIC(x, EET_T_FLOAT);
- ADD_BASIC(y, EET_T_FLOAT);
-#undef ADD_BASIC
-
-/* Vec_3 */
-#define ADD_BASIC(member, eet_type) EET_DATA_DESCRIPTOR_ADD_BASIC \
- (_vec3_descriptor, Evas_Canvas3D_Vec3_Eet, # member, member, eet_type);
- ADD_BASIC(x, EET_T_FLOAT);
- ADD_BASIC(y, EET_T_FLOAT);
- ADD_BASIC(z, EET_T_FLOAT);
-#undef ADD_BASIC
-
-/* Vertex */
- EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_vertex_descriptor, Evas_Canvas3D_Vertex_Eet,
- "position", position, _vec3_descriptor);
- EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_vertex_descriptor, Evas_Canvas3D_Vertex_Eet,
- "normal", normal, _vec3_descriptor);
- EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_vertex_descriptor, Evas_Canvas3D_Vertex_Eet,
- "texcoord", texcoord, _vec2_descriptor);
-
-/* Geometry */
- EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_geometry_descriptor, Evas_Canvas3D_Geometry_Eet,
- "vertices", vertices, _vertex_descriptor);
-#define ADD_BASIC(member, eet_type) \
- EET_DATA_DESCRIPTOR_ADD_BASIC \
- (_geometry_descriptor, Evas_Canvas3D_Geometry_Eet, # member, member, eet_type);
- ADD_BASIC(vertices_count, EET_T_UINT);
- ADD_BASIC(id, EET_T_UINT);
-#undef ADD_BASIC
-
-/* Color */
-#define ADD_BASIC(member, eet_type) EET_DATA_DESCRIPTOR_ADD_BASIC \
- (_color_descriptor, Evas_Canvas3D_Color_Eet, # member, member, eet_type);
- ADD_BASIC(r, EET_T_FLOAT);
- ADD_BASIC(g, EET_T_FLOAT);
- ADD_BASIC(b, EET_T_FLOAT);
- ADD_BASIC(a, EET_T_FLOAT);
-#undef ADD_BASIC
-
-/* Material */
- EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_material_descriptor, Evas_Canvas3D_Material_Eet,
- "colors", colors, _color_descriptor);
-#define ADD_BASIC(member, eet_type) \
- EET_DATA_DESCRIPTOR_ADD_BASIC \
- (_material_descriptor, Evas_Canvas3D_Material_Eet, # member, member, eet_type);
- ADD_BASIC(id, EET_T_UINT);
- ADD_BASIC(colors_count, EET_T_UINT);
- ADD_BASIC(shininess, EET_T_FLOAT);
-#undef ADD_BASIC
-
-/* Frame */
-#define ADD_BASIC(member, eet_type) EET_DATA_DESCRIPTOR_ADD_BASIC \
- (_frame_descriptor, Evas_Canvas3D_Frame_Eet, # member, member, eet_type);
- ADD_BASIC(id, EET_T_UINT);
- ADD_BASIC(geometry_id, EET_T_UINT);
- ADD_BASIC(material_id, EET_T_UINT);
-#undef ADD_BASIC
-
-/* Mesh */
- EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_mesh_descriptor, Evas_Canvas3D_Mesh_Eet,
- "frames", frames, _frame_descriptor);
- EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_mesh_descriptor, Evas_Canvas3D_Mesh_Eet,
- "geometries", geometries, _geometry_descriptor);
- EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_mesh_descriptor, Evas_Canvas3D_Mesh_Eet,
- "materials", materials, _material_descriptor);
-#define ADD_BASIC(member, eet_type) \
- EET_DATA_DESCRIPTOR_ADD_BASIC \
- (_mesh_descriptor, Evas_Canvas3D_Mesh_Eet, # member, member, eet_type);
- ADD_BASIC(materials_count, EET_T_UINT);
- ADD_BASIC(frames_count, EET_T_UINT);
- ADD_BASIC(geometries_count, EET_T_UINT);
-#undef ADD_BASIC
-
-/* Header */
- EET_DATA_DESCRIPTOR_ADD_BASIC_VAR_ARRAY(_header_descriptor, Evas_Canvas3D_Header_Eet,
- "materials", materials, EET_T_UINT);
- EET_DATA_DESCRIPTOR_ADD_BASIC_VAR_ARRAY(_header_descriptor, Evas_Canvas3D_Header_Eet,
- "geometries", geometries, EET_T_UINT);
-#define ADD_BASIC(member, eet_type) \
- EET_DATA_DESCRIPTOR_ADD_BASIC \
- (_header_descriptor, Evas_Canvas3D_Header_Eet, # member, member, eet_type);
- ADD_BASIC(version, EET_T_UINT);
- ADD_BASIC(materials_count, EET_T_UINT);
- ADD_BASIC(frames, EET_T_UINT);
- ADD_BASIC(geometries_count, EET_T_UINT);
-#undef ADD_BASIC
-
-/* File */
- EET_DATA_DESCRIPTOR_ADD_SUB(_file_descriptor, Evas_Canvas3D_File_Eet,
- "mesh", mesh, _mesh_descriptor);
- EET_DATA_DESCRIPTOR_ADD_SUB(_file_descriptor, Evas_Canvas3D_File_Eet,
- "header", header, _header_descriptor);
-}
-
-void
-_evas_canvas3d_eet_descriptor_shutdown(void)
-{
- eet_data_descriptor_free(_geometry_descriptor);
- _geometry_descriptor = NULL;
- eet_data_descriptor_free(_vertex_descriptor);
- _vertex_descriptor = NULL;
- eet_data_descriptor_free(_vec2_descriptor);
- _vec2_descriptor = NULL;
- eet_data_descriptor_free(_vec3_descriptor);
- _vec3_descriptor = NULL;
- eet_data_descriptor_free(_color_descriptor);
- _color_descriptor = NULL;
- eet_data_descriptor_free(_material_descriptor);
- _material_descriptor = NULL;
- eet_data_descriptor_free(_frame_descriptor);
- _frame_descriptor = NULL;
- eet_data_descriptor_free(_mesh_descriptor);
- _mesh_descriptor = NULL;
- eet_data_descriptor_free(_header_descriptor);
- _header_descriptor = NULL;
- eet_data_descriptor_free(_file_descriptor);
- _file_descriptor = NULL;
-}
-
-void
-_evas_canvas3d_eet_file_free(Evas_Canvas3D_File_Eet* eet_file)
-{
- if (eet_file)
- {
- if (eet_file->mesh)
- {
- free(eet_file->mesh->geometries[0].vertices);
- free(eet_file->mesh->geometries);
- free(eet_file->mesh->frames);
- free(eet_file->mesh->materials[0].colors);
- free(eet_file->mesh->materials);
- free(eet_file->mesh);
- }
-
- if (eet_file->header)
- {
- free(eet_file->header->materials);
- free(eet_file->header->geometries);
- free(eet_file->header);
- }
-
- free(eet_file);
- }
-
- _evas_canvas3d_eet_descriptor_shutdown();
-}
diff --git a/src/lib/evas/canvas/evas_canvas3d_light.c b/src/lib/evas/canvas/evas_canvas3d_light.c
deleted file mode 100644
index 887f3abb6c..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_light.c
+++ /dev/null
@@ -1,309 +0,0 @@
-#include "evas_common_private.h"
-#include "evas_private.h"
-
-#define MY_CLASS EVAS_CANVAS3D_LIGHT_CLASS
-
-static Eina_Bool
-_light_node_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
- void *data EINA_UNUSED, void *fdata)
-{
- Evas_Canvas3D_Node *n = *(Evas_Canvas3D_Node **)key;
- evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_LIGHT, (Evas_Canvas3D_Object *)fdata);
- return EINA_TRUE;
-}
-
-EOLIAN static void
-_evas_canvas3d_light_evas_canvas3d_object_change_notify(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Canvas3D_State state EINA_UNUSED, Evas_Canvas3D_Object *ref EINA_UNUSED)
-{
- if (pd->nodes)
- eina_hash_foreach(pd->nodes, _light_node_change_notify, obj);
-}
-
-EOLIAN static void
-_evas_canvas3d_light_evas_canvas3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd EINA_UNUSED)
-{
-
-}
-
-void
-evas_canvas3d_light_node_add(Evas_Canvas3D_Light *light, Evas_Canvas3D_Node *node)
-{
- int count = 0;
- Evas_Canvas3D_Light_Data *pd = efl_data_scope_get(light, MY_CLASS);
- if (pd->nodes == NULL)
- {
- pd->nodes = eina_hash_pointer_new(NULL);
-
- if (pd->nodes == NULL)
- {
- ERR("Failed to create hash table.");
- return;
- }
- }
- else
- count = (int)(uintptr_t)eina_hash_find(pd->nodes, &node);
-
- eina_hash_set(pd->nodes, &node, (const void *)(uintptr_t)(count + 1));
-}
-
-void
-evas_canvas3d_light_node_del(Evas_Canvas3D_Light *light, Evas_Canvas3D_Node *node)
-{
- int count = 0;
- Evas_Canvas3D_Light_Data *pd = efl_data_scope_get(light, MY_CLASS);
- if (pd->nodes == NULL)
- {
- ERR("No node to delete.");
- return;
- }
-
- count = (int)(uintptr_t)eina_hash_find(pd->nodes, &node);
-
- if (count == 1)
- eina_hash_del(pd->nodes, &node, NULL);
- else
- eina_hash_set(pd->nodes, &node, (const void *)(uintptr_t)(count - 1));
-}
-
-
-EAPI Evas_Canvas3D_Light *
-evas_canvas3d_light_add(Evas *e)
-{
- MAGIC_CHECK(e, Evas, MAGIC_EVAS);
- return NULL;
- MAGIC_CHECK_END();
- return efl_add(MY_CLASS, e);
-}
-
-EOLIAN static Eo *
-_evas_canvas3d_light_efl_object_constructor(Eo *obj, Evas_Canvas3D_Light_Data *pd)
-{
- obj = efl_constructor(efl_super(obj, MY_CLASS));
- evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_LIGHT);
- evas_color_set(&pd->ambient, 0.0, 0.0, 0.0, 1.0);
- evas_color_set(&pd->diffuse, 1.0, 1.0, 1.0, 1.0);
- evas_color_set(&pd->specular, 1.0, 1.0, 1.0, 1.0);
-
- pd->spot_exp = 0.0;
- pd->spot_cutoff = 180.0;
- pd->spot_cutoff_cos = -1.0;
-
- pd->atten_const = 1.0;
- pd->atten_linear = 0.0;
- pd->atten_quad = 0.0;
-
- return obj;
-}
-
-EOLIAN static void
-_evas_canvas3d_light_efl_object_destructor(Eo *obj, Evas_Canvas3D_Light_Data *pd)
-{
- Eina_Iterator *it = NULL;
- void *data = NULL;
- Evas_Canvas3D_Node_Data *node = NULL;
-
- if (pd->nodes)
- {
- it = eina_hash_iterator_key_new(pd->nodes);
- while (eina_iterator_next(it, &data))
- {
- node = efl_data_scope_get(data, EVAS_CANVAS3D_NODE_CLASS);
- node->data.light.light = NULL;
- }
-
- eina_hash_free(pd->nodes);
- }
-
- efl_destructor(efl_super(obj, MY_CLASS));
-}
-
-
-EOLIAN static void
-_evas_canvas3d_light_directional_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Eina_Bool directional)
-{
- if (pd->directional != directional)
- {
- pd->directional = directional;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_ANY, NULL);
- }
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_light_directional_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd)
-{
- return pd->directional;
-}
-
-EOLIAN static void
-_evas_canvas3d_light_ambient_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
-{
- pd->ambient.r = r;
- pd->ambient.g = g;
- pd->ambient.b = b;
- pd->ambient.a = a;
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_AMBIENT, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_light_ambient_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a)
-{
- if (r) *r = pd->ambient.r;
- if (g) *g = pd->ambient.g;
- if (b) *b = pd->ambient.b;
- if (a) *a = pd->ambient.a;
-}
-
-EOLIAN static void
-_evas_canvas3d_light_diffuse_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
-{
- pd->diffuse.r = r;
- pd->diffuse.g = g;
- pd->diffuse.b = b;
- pd->diffuse.a = a;
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_DIFFUSE, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_light_diffuse_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a)
-{
- if (r) *r = pd->diffuse.r;
- if (g) *g = pd->diffuse.g;
- if (b) *b = pd->diffuse.b;
- if (a) *a = pd->diffuse.a;
-}
-
-EOLIAN static void
-_evas_canvas3d_light_specular_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
-{
- pd->specular.r = r;
- pd->specular.g = g;
- pd->specular.b = b;
- pd->specular.a = a;
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_SPECULAR, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_light_specular_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a)
-{
- if (r) *r = pd->specular.r;
- if (g) *g = pd->specular.g;
- if (b) *b = pd->specular.b;
- if (a) *a = pd->specular.a;
-}
-
-EOLIAN static void
-_evas_canvas3d_light_spot_exponent_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Real exponent)
-{
- pd->spot_exp = exponent;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_SPOT_EXP, NULL);
-}
-
-EOLIAN static Evas_Real
-_evas_canvas3d_light_spot_exponent_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd)
-{
- return pd->spot_exp;
-}
-
-EOLIAN static void
-_evas_canvas3d_light_spot_cutoff_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Real cutoff)
-{
- pd->spot_cutoff = cutoff;
- pd->spot_cutoff_cos = cos(cutoff * M_PI / 180.0);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_SPOT_CUTOFF, NULL);
-}
-
-EOLIAN static Evas_Real
-_evas_canvas3d_light_spot_cutoff_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd)
-{
- return pd->spot_cutoff;
-}
-
-EOLIAN static void
-_evas_canvas3d_light_attenuation_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Real constant, Evas_Real linear, Evas_Real quadratic)
-{
- pd->atten_const = constant;
- pd->atten_linear = linear;
- pd->atten_quad = quadratic;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_ATTENUATION, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_light_attenuation_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd, Evas_Real *constant, Evas_Real *linear, Evas_Real *quadratic)
-{
- if (constant) *constant = pd->atten_const;
- if (linear) *linear = pd->atten_linear;
- if (quadratic) *quadratic = pd->atten_quad;
-}
-
-EOLIAN static void
-_evas_canvas3d_light_attenuation_enable_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Eina_Bool enable)
-{
- if (pd->enable_attenuation != enable)
- {
- pd->enable_attenuation = enable;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_ATTENUATION, NULL);
- }
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_light_attenuation_enable_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd)
-{
- return pd->enable_attenuation;
-}
-
-EOLIAN static void
-_evas_canvas3d_light_projection_matrix_set(Eo *obj, Evas_Canvas3D_Light_Data *pd,
- const Evas_Real *matrix)
-{
- eina_matrix4_array_set(&pd->projection, matrix);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_PROJECTION, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_light_projection_matrix_get(const Eo *obj EINA_UNUSED,
- Evas_Canvas3D_Light_Data *pd,
- Evas_Real *matrix)
-{
- memcpy(matrix, &pd->projection.xx, sizeof(Evas_Real) * 16);
-}
-
-EOLIAN static void
-_evas_canvas3d_light_projection_perspective_set(Eo *obj, Evas_Canvas3D_Light_Data *pd,
- Evas_Real fovy, Evas_Real aspect,
- Evas_Real dnear, Evas_Real dfar)
-{
- Evas_Real xmax;
- Evas_Real ymax;
-
- ymax = dnear * (Evas_Real)tan((double)fovy * M_PI / 360.0);
- xmax = ymax * aspect;
-
- evas_mat4_frustum_set(&pd->projection, -xmax, xmax, -ymax, ymax, dnear, dfar);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_PROJECTION, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_light_projection_frustum_set(Eo *obj, Evas_Canvas3D_Light_Data *pd,
- Evas_Real left, Evas_Real right,
- Evas_Real bottom, Evas_Real top,
- Evas_Real dnear, Evas_Real dfar)
-{
- evas_mat4_frustum_set(&pd->projection, left, right, bottom, top, dnear, dfar);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_PROJECTION, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_light_projection_ortho_set(Eo *obj, Evas_Canvas3D_Light_Data *pd,
- Evas_Real left, Evas_Real right,
- Evas_Real bottom, Evas_Real top,
- Evas_Real dnear, Evas_Real dfar)
-{
- eina_matrix4_ortho_set(&pd->projection, left, right, bottom, top, dnear, dfar);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_PROJECTION, NULL);
-}
-
-
-#include "canvas/evas_canvas3d_light.eo.c"
diff --git a/src/lib/evas/canvas/evas_canvas3d_light.eo b/src/lib/evas/canvas/evas_canvas3d_light.eo
deleted file mode 100644
index f15a088f17..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_light.eo
+++ /dev/null
@@ -1,249 +0,0 @@
-import evas_canvas3d_types;
-
-class @beta Evas.Canvas3D.Light extends Evas.Canvas3D.Object
-{
- [[Evas 3D canvas light class]]
-
- data: Evas_Canvas3D_Light_Data;
-
- methods {
- @property directional {
- [[The directional flag of the given light.
-
- Directional light is a type of light which is infinitely far away with no
- attenuation. The light direction is determined by the containing node's
- forward vector (negative Z-axis).
-
- By default, directional is not enabled.
-
- \@ref evas_canvas3d_node_look_at_set]]
- set {
- }
- get {
- }
- values {
- directional: bool; [[Whether the light is directional ($true), or not ($false).]]
- }
- }
-
- @property spot_exponent {
- [[The spot exponent of the given light.
-
- Higher spot exponent means intensity at the center of the cone is relatively
- stronger. Zero exponent means the light intensity is evenly distributed. The
- spot exponent has no effect when the light is not spot light (spot cutoff
- angle is less than 180 degree).
-
- Default spot exponent is 0.
-
- See also @.spot_cutoff.set]]
- set {
- }
- get {
- }
- values {
- exponent: Evas.Real; [[Spot exponent value.]]
- }
- }
-
- @property spot_cutoff {
- [[The spot cutoff angle of the given light.
-
- Only angle less than 180 degree will make it spot light, so that other spot
- light attribute will take effect.
-
- Default spot cutoff angle is 180.]]
- set {
- }
- get {
- }
- values {
- cutoff: Evas.Real; [[Cutoff angle in degree..]]
- }
- }
-
- @property attenuation_enable {
- [[The attenuation enable flag of the given light.
-
- By default, light attenuation is not enabled.
-
- See also @.attenuation_set]]
- set {
- }
- get {
- }
- values {
- enable: bool; [[Whether to enable attenuation ($true), or not ($false)..]]
- }
- }
-
- ambient_set {
- [[Set the ambient color of the given light.
-
- Default ambient color is (0.0, 0.0, 0.0, 1.0).]]
- params {
- @in r: Evas.Real; [[Red component of the ambient color between [0.0, 1.0].]]
- @in g: Evas.Real; [[Green component of the ambient color between [0.0, 1.0].]]
- @in b: Evas.Real; [[Blue component of the ambient color between [0.0, 1.0].]]
- @in a: Evas.Real; [[Alpha component of the ambient color between [0.0, 1.0].]]
- }
- }
- ambient_get @const {
- [[Get the ambient color of the given light.
-
- See also @.ambient_set]]
- params {
- @out r: Evas.Real; [[Red component of the ambient color between [0.0, 1.0].]]
- @out g: Evas.Real; [[Green component of the ambient color between [0.0, 1.0].]]
- @out b: Evas.Real; [[Blue component of the ambient color between [0.0, 1.0].]]
- @out a: Evas.Real; [[Alpha component of the ambient color between [0.0, 1.0].]]
- }
- }
-
- diffuse_set {
- [[Set the diffuse color of the given light.
-
- Default diffuse color is (1.0, 1.0, 1.0, 1.0).]]
- params {
- @in r: Evas.Real; [[Red component of the diffuse color between [0.0, 1.0].]]
- @in g: Evas.Real; [[Green component of the diffuse color between [0.0, 1.0].]]
- @in b: Evas.Real; [[Blue component of the diffuse color between [0.0, 1.0].]]
- @in a: Evas.Real; [[Alpha component of the diffuse color between [0.0, 1.0].]]
- }
- }
- diffuse_get @const {
- [[Get the diffuse color of the given light.
-
- See also @.diffuse_set]]
- params {
- @out r: Evas.Real; [[Red component of the diffuse color between [0.0, 1.0].]]
- @out g: Evas.Real; [[Green component of the diffuse color between [0.0, 1.0].]]
- @out b: Evas.Real; [[Blue component of the diffuse color between [0.0, 1.0].]]
- @out a: Evas.Real; [[Alpha component of the diffuse color between [0.0, 1.0].]]
- }
- }
-
- specular_set {
- [[Set the specular color of the given light.
-
- Default specular color is (1.0, 1.0, 1.0, 1.0).]]
- params {
- @in r: Evas.Real; [[Red component of the specular color between [0.0, 1.0].]]
- @in g: Evas.Real; [[Green component of the specular color between [0.0, 1.0].]]
- @in b: Evas.Real; [[Blue component of the specular color between [0.0, 1.0].]]
- @in a: Evas.Real; [[Alpha component of the specular color between [0.0, 1.0].]]
- }
- }
- specular_get @const {
- [[Get the specular color of the given light.
-
- See also @.specular_set]]
- params {
- @out r: Evas.Real; [[Red component of the specular color between [0.0, 1.0].]]
- @out g: Evas.Real; [[Green component of the specular color between [0.0, 1.0].]]
- @out b: Evas.Real; [[Blue component of the specular color between [0.0, 1.0].]]
- @out a: Evas.Real; [[Alpha component of the specular color between [0.0, 1.0].]]
- }
- }
-
- attenuation_set {
- [[Set the attenuation of the given light.
-
- Light attenuation has no effect with directional light. And the attenuation
- should be enabled first to take effect. The attenuation factor is calculated
- as follows.
-
- atten = 1.0 / constant + linear * distance + quadratic * distance * distance
-
- Default attenuation is constant = 1.0, linear = 0.0, quadratic = 0.0.
-
- See also @.attenuation_enable.set]]
- params {
- @in constant: Evas.Real; [[Constant attenuation term..]]
- @in linear: Evas.Real; [[Linear attenuation term..]]
- @in quadratic: Evas.Real; [[Quadratic attenuation term..]]
- }
- }
-
- attenuation_get @const {
- [[Get the attenuation of the given light.
-
- See also @.attenuation_set]]
- params {
- @out constant: Evas.Real; [[Constant attenuation term..]]
- @out linear: Evas.Real; [[Linear attenuation term..]]
- @out quadratic: Evas.Real; [[Quadratic attenuation term..]]
- }
- }
-
- projection_matrix_set {
- [[Set the projection matrix of the given light source.
-
- Default projection matrix is identity matrix.
-
- See also @.projection_perspective_set, @.projection_ortho_set and @.projection_frustum_set]]
- params {
- @in matrix: ptr(const(Evas.Real)); [[Projection Matrix. Pointer to the array of 16 Evas.Real values in column major order.]]
- }
- }
-
- projection_matrix_get @const {
- [[Get the projection matrix of the given light source.
-
- See also @.projection_matrix_set]]
- params {
- @out matrix: Evas.Real; [[Projection Matrix]]
- }
- }
-
- projection_perspective_set {
- [[Set the projection matrix of the given light source with perspective projection.
-
- See also @.projection_matrix_set]]
-
- params {
- fovy: Evas.Real; [[Field of view angle in Y direction.]]
- aspect: Evas.Real; [[Aspect ratio.]]
- dnear: Evas.Real; [[Distance to near clipping plane.]]
- dfar: Evas.Real; [[Distance to far clipping plane.]]
- }
- }
-
- projection_frustum_set {
- [[Set the projection matrix of the given light source with frustum projection.
-
- @Evas.Canvas3D.Light.projection_matrix_set]]
- params {
- left: Evas.Real; [[Left X coordinate of the near clipping plane.]]
- right: Evas.Real; [[Right X coordinate of the near clipping plane.]]
- bottom: Evas.Real; [[Bottom Y coordinate of the near clipping plane.]]
- top: Evas.Real; [[Top Y coordinate of the near clipping plane]]
- dnear: Evas.Real; [[Distance to near clipping plane.]]
- dfar: Evas.Real; [[Distance to far clipping plane.]]
- }
- }
- projection_ortho_set {
- [[Set the projection matrix of the given light source with orthogonal projection.
-
- See also @.projection_matrix_set]]
- params {
- left: Evas.Real; [[Left X coordinate of the near clipping plane.]]
- right: Evas.Real; [[Right X coordinate of the near clipping plane.]]
- bottom: Evas.Real; [[Bottom Y coordinate of the near clipping plane.]]
- top: Evas.Real; [[Top Y coordinate of the near clipping plane]]
- dnear: Evas.Real; [[Distance to near clipping plane.]]
- dfar: Evas.Real; [[Distance to far clipping plane.]]
- }
- }
- }
-
- implements {
- Efl.Object.constructor;
- Efl.Object.destructor;
- Evas.Canvas3D.Object.update_notify;
- Evas.Canvas3D.Object.change_notify;
- @empty Evas.Canvas3D.Object.callback_register;
- @empty Evas.Canvas3D.Object.callback_unregister;
- }
-
-}
diff --git a/src/lib/evas/canvas/evas_canvas3d_material.c b/src/lib/evas/canvas/evas_canvas3d_material.c
deleted file mode 100644
index 48f6ce1e5a..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_material.c
+++ /dev/null
@@ -1,206 +0,0 @@
-#include "evas_common_private.h"
-#include "evas_private.h"
-
-#define MY_CLASS EVAS_CANVAS3D_MATERIAL_CLASS
-
-static Eina_Bool
-_material_mesh_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
- void *data EINA_UNUSED, void *fdata)
-{
- Evas_Canvas3D_Mesh *m = *(Evas_Canvas3D_Mesh **)key;
- evas_canvas3d_object_change(m, EVAS_CANVAS3D_STATE_MESH_MATERIAL, (Evas_Canvas3D_Object *)fdata);
- return EINA_TRUE;
-}
-
-EOLIAN static void
-_evas_canvas3d_material_evas_canvas3d_object_change_notify(Eo *obj, Evas_Canvas3D_Material_Data *pd, Evas_Canvas3D_State state EINA_UNUSED, Evas_Canvas3D_Object *ref EINA_UNUSED)
-{
- if (pd->meshes)
- eina_hash_foreach(pd->meshes, _material_mesh_change_notify, obj);
-}
-
-EOLIAN static void
-_evas_canvas3d_material_evas_canvas3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_Canvas3D_Material_Data *pd)
-{
- int i;
- for (i = 0; i < EVAS_CANVAS3D_MATERIAL_ATTRIB_COUNT; i++)
- {
- if (pd->attribs[i].enable)
- {
- if (pd->attribs[i].texture)
- {
- evas_canvas3d_object_update(pd->attribs[i].texture);
- }
- }
- }
-}
-
-void
-evas_canvas3d_material_mesh_add(Evas_Canvas3D_Material *material, Evas_Canvas3D_Mesh *mesh)
-{
- int count = 0;
- Evas_Canvas3D_Material_Data *pd = efl_data_scope_get(material, MY_CLASS);
-
- if (pd->meshes == NULL)
- {
- pd->meshes = eina_hash_pointer_new(NULL);
-
- if (pd->meshes == NULL)
- {
- ERR("Failed to create hash table.");
- return;
- }
- }
- else
- count = (int)(uintptr_t)eina_hash_find(pd->meshes, &mesh);
-
- eina_hash_set(pd->meshes, &mesh, (const void *)(uintptr_t)(count + 1));
-}
-
-void
-evas_canvas3d_material_mesh_del(Evas_Canvas3D_Material *material, Evas_Canvas3D_Mesh *mesh)
-{
- int count = 0;
- Evas_Canvas3D_Material_Data *pd = efl_data_scope_get(material, MY_CLASS);
-
- if (pd->meshes == NULL)
- {
- ERR("No mesh to delete.");
- return;
- }
-
- count = (int)(uintptr_t)eina_hash_find(pd->meshes, &mesh);
-
- if (count == 1)
- eina_hash_del(pd->meshes, &mesh, NULL);
- else
- eina_hash_set(pd->meshes, &mesh, (const void *)(uintptr_t)(count - 1));
-}
-
-
-EAPI Evas_Canvas3D_Material *
-evas_canvas3d_material_add(Evas *e)
-{
- MAGIC_CHECK(e, Evas, MAGIC_EVAS);
- return NULL;
- MAGIC_CHECK_END();
- return efl_add(MY_CLASS, e);
-}
-
-EOLIAN static Eo *
-_evas_canvas3d_material_efl_object_constructor(Eo *obj EINA_UNUSED, Evas_Canvas3D_Material_Data *pd)
-{
- obj = efl_constructor(efl_super(obj, MY_CLASS));
- evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_MATERIAL);
-
- evas_color_set(&pd->attribs[EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT].color, 0.2, 0.2, 0.2, 1.0);
- evas_color_set(&pd->attribs[EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE].color, 0.8, 0.8, 0.8, 1.0);
- evas_color_set(&pd->attribs[EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR].color, 1.0, 1.0, 1.0, 1.0);
- evas_color_set(&pd->attribs[EVAS_CANVAS3D_MATERIAL_ATTRIB_EMISSION].color, 0.0, 0.0, 0.0, 1.0);
- pd->shininess = 150.0;
-
- return obj;
-}
-
-EOLIAN static void
-_evas_canvas3d_material_efl_object_destructor(Eo *obj, Evas_Canvas3D_Material_Data *pd)
-{
- int i = 0;
- Eina_Iterator *it = NULL;
- void *data = NULL;
- Evas_Canvas3D_Mesh_Data *mesh = NULL;
- Eina_List *l = NULL;
- Evas_Canvas3D_Mesh_Frame *f = NULL;
-
- if (pd->meshes)
- {
- it = eina_hash_iterator_key_new(pd->meshes);
- while (eina_iterator_next(it, &data))
- {
- mesh = efl_data_scope_get(data, EVAS_CANVAS3D_MESH_CLASS);
- if (mesh->frames)
- {
- EINA_LIST_FOREACH(mesh->frames, l, f)
- f->material = NULL;
- }
- }
- eina_iterator_free(it);
- eina_hash_free(pd->meshes);
- }
-
- for (i = 0; i < EVAS_CANVAS3D_MATERIAL_ATTRIB_COUNT; i++)
- {
- if (pd->attribs[i].texture)
- {
- evas_canvas3d_texture_material_del(pd->attribs[i].texture, obj);
- }
- }
- efl_destructor(efl_super(obj, MY_CLASS));
-}
-
-EOLIAN static void
-_evas_canvas3d_material_enable_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Material_Data *pd, Evas_Canvas3D_Material_Attrib attrib, Eina_Bool enable)
-{
- pd->attribs[attrib].enable = enable;
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_material_enable_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Material_Data *pd, Evas_Canvas3D_Material_Attrib attrib)
-{
- return pd->attribs[attrib].enable;
-}
-
-EOLIAN static void
-_evas_canvas3d_material_color_set(Eo *obj, Evas_Canvas3D_Material_Data *pd, Evas_Canvas3D_Material_Attrib attrib, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
-{
- evas_color_set(&pd->attribs[attrib].color, r, g, b, a);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MATERIAL_COLOR, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_material_color_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Material_Data *pd, Evas_Canvas3D_Material_Attrib attrib, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a)
-{
- if (r) *r = pd->attribs[attrib].color.r;
- if (g) *g = pd->attribs[attrib].color.g;
- if (b) *b = pd->attribs[attrib].color.b;
- if (a) *a = pd->attribs[attrib].color.a;
-}
-
-EOLIAN static void
-_evas_canvas3d_material_shininess_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Material_Data *pd, Evas_Real shininess)
-{
- pd->shininess = shininess;
-}
-
-EOLIAN static Evas_Real
-_evas_canvas3d_material_shininess_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Material_Data *pd)
-{
- return pd->shininess;
-}
-
-EOLIAN static void
-_evas_canvas3d_material_texture_set(Eo *obj, Evas_Canvas3D_Material_Data *pd, Evas_Canvas3D_Material_Attrib attrib, Evas_Canvas3D_Texture *texture)
-{
- if (pd->attribs[attrib].texture != texture)
- {
- if (pd->attribs[attrib].texture)
- {
- evas_canvas3d_texture_material_del(pd->attribs[attrib].texture, obj);
- efl_unref(pd->attribs[attrib].texture);
- }
-
- pd->attribs[attrib].texture = texture;
- evas_canvas3d_texture_material_add(texture, obj);
- efl_ref(texture);
- }
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MATERIAL_TEXTURE, NULL);
-}
-
-EOLIAN static Evas_Canvas3D_Texture *
-_evas_canvas3d_material_texture_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Material_Data *pd, Evas_Canvas3D_Material_Attrib attrib)
-{
- return pd->attribs[attrib].texture;
-}
-
-#include "canvas/evas_canvas3d_material.eo.c"
diff --git a/src/lib/evas/canvas/evas_canvas3d_material.eo b/src/lib/evas/canvas/evas_canvas3d_material.eo
deleted file mode 100644
index 3576de1dcc..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_material.eo
+++ /dev/null
@@ -1,116 +0,0 @@
-class @beta Evas.Canvas3D.Material extends Evas.Canvas3D.Object
-{
- [[Evas 3D canvas material class]]
- data: Evas_Canvas3D_Material_Data;
- methods {
- color_set {
- [[Set the material attribute color of the given material.
-
- Material color is used also when texture map is enabled. The colors
- will be modulated (multiplied). To control the color contribution
- of a material attribute, use gray color. Setting color value for
- normal attribute has no effect.
-
- Default color is as follows.
-
- Ambient : (0.2, 0.2, 0.2, 1.0)
- Diffuse : (0.8, 0.8, 0.8, 1.0)
- Specular : (1.0, 1.0, 1.0, 1.0)
- Emission : (0.0, 0.0, 0.0, 1.0)
- Normal : Not used
- ]]
-
- params {
- @in attrib: Evas.Canvas3D.Material_Attrib; [[Material attribute ID.]]
- @in r: Evas.Real; [[Red component of the color.]]
- @in g: Evas.Real; [[Green component of the color.]]
- @in b: Evas.Real; [[Blue component of the color.]]
- @in a: Evas.Real; [[Alpha component of the color.]]
- }
- }
-
- color_get @const {
- [[Get the material attribute color of the given material.
-
- See also @.color_set.
- ]]
- params {
- @in attrib: Evas.Canvas3D.Material_Attrib; [[Material attribute ID.]]
- @out r: Evas.Real; [[Pointer to receive red component of the color.]]
- @out g: Evas.Real; [[Pointer to receive green component of the color.]]
- @out b: Evas.Real; [[Pointer to receive blue component of the color.]]
- @out a: Evas.Real; [[Pointer to receive alpha component of the color.]]
- }
- }
-
- @property enable {
- [[The material attribute enable flag of the given material.
-
- You might want to disable some material reflection contribution.
- For example, Emission attribute is rarely used. Disabling unused
- attributes might help the shading less complex so that can get
- speed up.
-
- By default, diffuse and specular is enabled.
- ]]
- set {
- }
- get {
- }
- keys {
- attrib: Evas.Canvas3D.Material_Attrib; [[Material attribute ID.]]
- }
- values {
- enable: bool; [[Whether to enable the attribute or not.]]
- }
- }
-
- @property shininess {
- [[The shininess of the given material.
-
- Shininess is only used when specular attribute is enabled. Higher shininess
- value will make the object more shiny.
-
- Default shininess value is 150.0.
-
- See also @.enable.set.
- ]]
- set {
- }
- get {
- }
- values {
- shininess: Evas.Real; [[Shininess value.]]
- }
- }
-
- @property texture {
- [[The texture of the given material.
-
- You have to enable the desired attribute first.
-
- See also @.enable.set.
- ]]
- set {
- }
- get {
- }
-
- keys {
- attrib: Evas.Canvas3D.Material_Attrib; [[Material attribute ID.]]
- }
- values {
- texture: Evas.Canvas3D.Texture; [[The texture set to the attribute.]]
- }
- }
- }
- implements {
- Efl.Object.constructor;
- Efl.Object.destructor;
- Evas.Canvas3D.Object.update_notify;
- Evas.Canvas3D.Object.change_notify;
- @empty Evas.Canvas3D.Object.callback_register;
- @empty Evas.Canvas3D.Object.callback_unregister;
- }
-
-}
diff --git a/src/lib/evas/canvas/evas_canvas3d_mesh.c b/src/lib/evas/canvas/evas_canvas3d_mesh.c
deleted file mode 100644
index 0bea10eb21..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_mesh.c
+++ /dev/null
@@ -1,1172 +0,0 @@
-#include "evas_common_private.h"
-#include "evas_private.h"
-
-#define MY_CLASS EVAS_CANVAS3D_MESH_CLASS
-
-static Evas_Canvas3D_Mesh_Frame *
-evas_canvas3d_mesh_frame_new(Evas_Canvas3D_Mesh *mesh)
-{
- Evas_Canvas3D_Mesh_Frame *frame = NULL;
- frame = (Evas_Canvas3D_Mesh_Frame *)calloc(1, sizeof(Evas_Canvas3D_Mesh_Frame));
-
- if (frame == NULL)
- {
- ERR("Failed to allocate memory.");
- return NULL;
- }
-
- frame->mesh = mesh;
- evas_box3_empty_set(&frame->aabb);
-
- return frame;
-}
-
-static void
-evas_canvas3d_mesh_frame_free(Evas_Canvas3D_Mesh_Frame *frame)
-{
- int i;
-
- if (frame->material)
- evas_canvas3d_material_mesh_del(frame->material, frame->mesh);
-
- for (i = 0; i < EVAS_CANVAS3D_VERTEX_ATTRIB_COUNT; i++)
- {
- if (frame->vertices[i].owns_data)
- free(frame->vertices[i].data);
- }
-
- free(frame);
-}
-
-Evas_Canvas3D_Mesh_Frame *
-evas_canvas3d_mesh_frame_find(Evas_Canvas3D_Mesh_Data *pd, int frame)
-{
- Eina_List *l;
- Evas_Canvas3D_Mesh_Frame *f;
-
- EINA_LIST_FOREACH(pd->frames, l, f)
- {
- if (f->frame == frame)
- return f;
- }
-
- return NULL;
-}
-
-Eina_Bool
-evas_canvas3d_mesh_aabb_add_to_frame(Evas_Canvas3D_Mesh_Data *pd, int frame, int stride)
-{
- Evas_Canvas3D_Mesh_Frame *curframe = evas_canvas3d_mesh_frame_find(pd, frame);
- int i = 0, j = 0, step = 0, size = 0, max;
- float vxmin, vymin, vzmin, vxmax, vymax, vzmax;
- float *minmaxdata = NULL;
- Evas_Box3 box3;
-
- if (stride <= 0) return EINA_FALSE;
-
- if (!curframe)
- {
- ERR("Invalid frame %i.", frame);
- return EINA_FALSE;
- }
-
- step = curframe->vertices[EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION].element_count;
- size = curframe->vertices[EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION].size;
- minmaxdata = (float *)curframe->vertices[EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION].data;
-
- if (!minmaxdata)
- {
- ERR("Invalid vertex data.");
- return EINA_FALSE;
- }
-
- vxmax = vxmin = minmaxdata[0];
- vymax = vymin = minmaxdata[1];
- vzmax = vzmin = minmaxdata[2];
- j += step;
-
- max = size / stride;
- for (i = 1; i < max; ++i)
- {
- vxmin > minmaxdata[j] ? vxmin = minmaxdata[j] : 0;
- vxmax < minmaxdata[j] ? vxmax = minmaxdata[j] : 0;
- vymin > minmaxdata[j + 1] ? vymin = minmaxdata[j + 1] : 0;
- vymax < minmaxdata[j + 1] ? vymax = minmaxdata[j + 1] : 0;
- vzmin > minmaxdata[j + 2] ? vzmin = minmaxdata[j + 2] : 0;
- vzmax < minmaxdata[j + 2] ? vzmax = minmaxdata[j + 2] : 0;
- j += step;
- }
-
- evas_box3_empty_set(&box3);
- evas_box3_set(&box3, vxmin, vymin, vzmin, vxmax, vymax, vzmax);
- curframe->aabb = box3;
- return EINA_TRUE;
-}
-
-static inline void
-_mesh_init(Evas_Canvas3D_Mesh_Data *pd)
-{
- pd->vertex_count = 0;
- pd->frame_count = 0;
- pd->frames = NULL;
-
- pd->index_format = EVAS_CANVAS3D_INDEX_FORMAT_NONE;
- pd->index_count = 0;
- pd->indices = NULL;
- pd->owns_indices = EINA_FALSE;
- pd->assembly = EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES;
-
- pd->nodes = NULL;
- pd->blend_sfactor = EVAS_CANVAS3D_BLEND_FUNC_ONE;
- pd->blend_dfactor = EVAS_CANVAS3D_BLEND_FUNC_ZERO;
- pd->blending = EINA_FALSE;
-
- pd->alpha_comparison = EVAS_CANVAS3D_COMPARISON_ALWAYS;
- pd->alpha_ref_value = 0.0f;
- pd->alpha_test_enabled = EINA_FALSE;
-
- pd->color_pick_key.r = 0.0;
- pd->color_pick_key.g = 0.0;
- pd->color_pick_key.b = 0.0;
- pd->color_pick_enabled = EINA_FALSE;
-
- pd->shadows_edges_filtering_level = 4;
- pd->shadows_edges_size = 300.0;
- pd->shadows_constant_bias = 0.00015;
- pd->near_lod_boundary = 0.0;
- pd->far_lod_boundary = 0.0;
-}
-
-static inline void
-_mesh_fini(Evas_Canvas3D_Mesh_Data *pd)
-{
- Eina_List *l;
- Evas_Canvas3D_Mesh_Frame *f;
-
- if (pd->frames)
- {
- EINA_LIST_FOREACH(pd->frames, l, f)
- {
- evas_canvas3d_mesh_frame_free(f);
- }
-
- eina_list_free(pd->frames);
- }
-
- if (pd->indices && pd->owns_indices)
- {
- free(pd->indices);
- pd->indices = NULL;
- }
-
- if (pd->nodes)
- eina_hash_free(pd->nodes);
-}
-
-static Eina_Bool
-_mesh_node_geometry_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
- void *data EINA_UNUSED, void *fdata)
-{
- Evas_Canvas3D_Node *n = *(Evas_Canvas3D_Node **)key;
- evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_MESH_GEOMETRY, (Evas_Canvas3D_Object *)fdata);
- return EINA_TRUE;
-}
-
-static Eina_Bool
-_mesh_node_material_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
- void *data EINA_UNUSED, void *fdata)
-{
- Evas_Canvas3D_Node *n = *(Evas_Canvas3D_Node **)key;
- evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_MESH_MATERIAL, (Evas_Canvas3D_Object *)fdata);
- return EINA_TRUE;
-}
-
-static void
-_evas_canvas3d_mesh_evas_canvas3d_object_change_notify(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Evas_Canvas3D_State state, Evas_Canvas3D_Object *ref EINA_UNUSED)
-{
- if (state == EVAS_CANVAS3D_STATE_MESH_MATERIAL)
- {
- if (pd->nodes)
- eina_hash_foreach(pd->nodes, _mesh_node_material_change_notify, obj);
- }
- else
- {
- if (pd->nodes)
- eina_hash_foreach(pd->nodes, _mesh_node_geometry_change_notify, obj);
- }
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_evas_canvas3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd)
-{
- Eina_List *l;
- Evas_Canvas3D_Mesh_Frame *f;
-
- EINA_LIST_FOREACH(pd->frames, l, f)
- {
- if (f->material)
- {
- evas_canvas3d_object_update(f->material);
- }
- }
-}
-
-
-void
-evas_canvas3d_mesh_node_add(Evas_Canvas3D_Mesh *mesh, Evas_Canvas3D_Node *node)
-{
- int count = 0;
- Evas_Canvas3D_Mesh_Data *pd = efl_data_scope_get(mesh, MY_CLASS);
- if (pd->nodes == NULL)
- {
- pd->nodes = eina_hash_pointer_new(NULL);
-
- if (pd->nodes == NULL)
- {
- ERR("Failed to create hash table.");
- return;
- }
- }
- else
- count = (int)(uintptr_t)eina_hash_find(pd->nodes, &node);
-
- eina_hash_set(pd->nodes, &node, (const void *)(uintptr_t)(count + 1));
-}
-
-void
-evas_canvas3d_mesh_node_del(Evas_Canvas3D_Mesh *mesh, Evas_Canvas3D_Node *node)
-{
- int count = 0;
- Evas_Canvas3D_Mesh_Data *pd = efl_data_scope_get(mesh, MY_CLASS);
- if (pd->nodes == NULL)
- {
- ERR("No node to delete.");
- return;
- }
-
- count = (int)(uintptr_t)eina_hash_find(pd->nodes, &node);
-
- if (count == 1)
- eina_hash_del(pd->nodes, &node, NULL);
- else
- eina_hash_set(pd->nodes, &node, (const void *)(uintptr_t)(count - 1));
-}
-
-
-EAPI Evas_Canvas3D_Mesh *
-evas_canvas3d_mesh_add(Evas *e)
-{
- MAGIC_CHECK(e, Evas, MAGIC_EVAS);
- return NULL;
- MAGIC_CHECK_END();
- return efl_add(MY_CLASS, e);
-}
-
-EOLIAN static Eo *
-_evas_canvas3d_mesh_efl_object_constructor(Eo *obj, Evas_Canvas3D_Mesh_Data *pd)
-{
- obj = efl_constructor(efl_super(obj, MY_CLASS));
- evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_MESH);
- _mesh_init(pd);
-
- return obj;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_efl_object_destructor(Eo *obj, Evas_Canvas3D_Mesh_Data *pd)
-{
- _mesh_fini(pd);
- efl_destructor(efl_super(obj, MY_CLASS));
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_shader_mode_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd, Evas_Canvas3D_Shader_Mode mode)
-{
- if (pd->shader_mode != mode)
- {
- pd->shader_mode = mode;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_SHADER_MODE, NULL);
- }
-}
-
-EOLIAN static Evas_Canvas3D_Shader_Mode
-_evas_canvas3d_mesh_shader_mode_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd)
-{
- return pd->shader_mode;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_vertex_count_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, unsigned int count)
-{
- pd->vertex_count = count;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_VERTEX_COUNT, NULL);
-}
-
-EOLIAN static unsigned int
-_evas_canvas3d_mesh_vertex_count_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd)
-{
- return pd->vertex_count;
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_mesh_frame_exist(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd, int frame)
-{
- Evas_Canvas3D_Mesh_Frame *f = evas_canvas3d_mesh_frame_find(pd, frame);
-
- if (f)
- return EINA_TRUE;
-
- return EINA_FALSE;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_frame_add(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, int frame)
-{
- Evas_Canvas3D_Mesh_Frame *f = evas_canvas3d_mesh_frame_find(pd, frame);
-
- if (f != NULL)
- {
- ERR("Already existing frame.");
- return;
- }
-
- f = evas_canvas3d_mesh_frame_new(obj);
-
- if (f == NULL)
- return;
-
- f->frame = frame;
- pd->frames = eina_list_append(pd->frames, f);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_FRAME, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_frame_del(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, int frame)
-{
- Evas_Canvas3D_Mesh_Frame *f = evas_canvas3d_mesh_frame_find(pd, frame);
-
- if (f == NULL)
- {
- ERR("Not existing mesh frame.");
- return;
- }
-
- pd->frames = eina_list_remove(pd->frames, f);
- evas_canvas3d_mesh_frame_free(f);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_FRAME, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_frame_material_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, int frame, Evas_Canvas3D_Material *material)
-{
- Evas_Canvas3D_Mesh_Frame *f = evas_canvas3d_mesh_frame_find(pd, frame);
-
- if (f == NULL)
- {
- ERR("Not existing mesh frame.");
- return;
- }
-
- if (f->material == material)
- return;
-
- if (f->material)
- {
- evas_canvas3d_material_mesh_del(f->material, obj);
- efl_unref(f->material);
- }
-
- f->material = material;
- efl_ref(material);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_MATERIAL, NULL);
- evas_canvas3d_material_mesh_add(material, obj);
-}
-
-EOLIAN static Evas_Canvas3D_Material *
-_evas_canvas3d_mesh_frame_material_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd, int frame)
-{
- Evas_Canvas3D_Mesh_Frame *f = evas_canvas3d_mesh_frame_find(pd, frame);
-
- if (f == NULL)
- {
- ERR("Not existing mesh frame.");
- return NULL;
- }
-
- return f->material;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_frame_vertex_data_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, int frame, Evas_Canvas3D_Vertex_Attrib attrib, int stride, const void *data)
-{
- Evas_Canvas3D_Mesh_Frame *f = evas_canvas3d_mesh_frame_find(pd, frame);
- int element_count;
-
- if (f == NULL)
- {
- ERR("Not existing mesh frame.");
- return;
- }
-
- if (stride < (int)sizeof(float))
- {
- ERR("Stride too small");
- return;
- }
-
- if (attrib == EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION)
- {
- int i = 0, j = 0, size = stride/sizeof(float);
- float vxmin, vymin, vzmin, vxmax, vymax, vzmax;
- float *minmaxdata = (float *)data;
- Evas_Box3 box3;
-
- element_count = 3;
-
- if (minmaxdata)
- {
- vxmax = vxmin = minmaxdata[0];
- vymax = vymin = minmaxdata[1];
- vzmax = vzmin = minmaxdata[2];
- j += size;
-
- for (i = 1; i < size; ++i)
- {
- vxmin > minmaxdata[j] ? vxmin = minmaxdata[j] : 0;
- vxmax < minmaxdata[j] ? vxmax = minmaxdata[j] : 0;
- vymin > minmaxdata[j + 1] ? vymin = minmaxdata[j + 1] : 0;
- vymax < minmaxdata[j + 1] ? vymax = minmaxdata[j + 1] : 0;
- vzmin > minmaxdata[j + 2] ? vzmin = minmaxdata[j + 2] : 0;
- vzmax < minmaxdata[j + 2] ? vzmax = minmaxdata[j + 2] : 0;
- j += size;
- }
-
- evas_box3_empty_set(&box3);
- evas_box3_set(&box3, vxmin, vymin, vzmin, vxmax, vymax, vzmax);
- f->aabb = box3;
- }
- else
- {
- ERR("Axis-Aligned Bounding Box wasn't added in frame %d ", frame);
- }
- }
- else if (attrib == EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL)
- {
- element_count = 3;
- }
- else if (attrib == EVAS_CANVAS3D_VERTEX_ATTRIB_TANGENT)
- {
- element_count = 3;
- }
- else if (attrib == EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR)
- {
- element_count = 4;
- }
- else if (attrib == EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD)
- {
- element_count = 2;
- }
- else
- {
- ERR("Invalid vertex attrib.");
- return;
- }
-
- if (f->vertices[attrib].owns_data && f->vertices[attrib].data)
- free(f->vertices[attrib].data);
-
- f->vertices[attrib].size = 0;
- f->vertices[attrib].stride = stride;
- f->vertices[attrib].data = (void *)data;
- f->vertices[attrib].owns_data = EINA_FALSE;
- f->vertices[attrib].element_count = element_count;
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_VERTEX_DATA, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_frame_vertex_data_copy_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, int frame, Evas_Canvas3D_Vertex_Attrib attrib, int stride, const void *data)
-{
- Evas_Canvas3D_Mesh_Frame *f = evas_canvas3d_mesh_frame_find(pd, frame);
- Evas_Canvas3D_Vertex_Buffer *vb;
- int size, element_count;
-
- if (f == NULL)
- {
- ERR("Not existing mesh frame.");
- return;
- }
-
- if (attrib == EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION)
- {
- element_count = 3;
- }
- else if (attrib == EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL)
- {
- element_count = 3;
- }
- else if (attrib == EVAS_CANVAS3D_VERTEX_ATTRIB_TANGENT)
- {
- element_count = 3;
- }
- else if (attrib == EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR)
- {
- element_count = 4;
- }
- else if (attrib == EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD)
- {
- element_count = 2;
- }
- else
- {
- ERR("Invalid vertex attrib.");
- return;
- }
-
- vb = &f->vertices[attrib];
- size = element_count * sizeof(float) * pd->vertex_count;
-
- if (!vb->owns_data || vb->size < size)
- {
- if (vb->owns_data && vb->data)
- free(vb->data);
-
- vb->data = malloc(size);
-
- if (vb->data == NULL)
- {
- vb->element_count = 0;
- vb->size = 0;
- vb->stride = 0;
- vb->owns_data = EINA_FALSE;
-
- ERR("Failed to allocate memory.");
- return;
- }
-
- vb->size = size;
- vb->owns_data = EINA_TRUE;
- }
-
- vb->element_count = element_count;
- vb->stride = 0;
-
- if (data == NULL)
- return;
-
- if (stride == 0 || stride == (int)(element_count * sizeof(float)))
- {
- memcpy(vb->data, data, size);
- }
- else
- {
- int i;
- float *dst = (float *)vb->data;
- float *src = (float *)data;
-
- if (element_count == 2)
- {
- for (i = 0; i <pd->vertex_count; i++)
- {
- *dst++ = src[0];
- *dst++ = src[1];
-
- src = (float *)((char *)src + stride);
- }
- }
- else if (element_count == 3)
- {
- for (i = 0; i <pd->vertex_count; i++)
- {
- *dst++ = src[0];
- *dst++ = src[1];
- *dst++ = src[2];
-
- src = (float *)((char *)src + stride);
- }
- }
- else if (element_count == 4)
- {
- for (i = 0; i <pd->vertex_count; i++)
- {
- *dst++ = src[0];
- *dst++ = src[1];
- *dst++ = src[2];
- *dst++ = src[3];
-
- src = (float *)((char *)src + stride);
- }
- }
- }
-
- if (attrib == EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION &&
- !evas_canvas3d_mesh_aabb_add_to_frame(pd, frame, stride))
- {
- ERR("Axis-Aligned Bounding Box wasn't added in frame %d ", frame);
- }
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_VERTEX_DATA, NULL);
-}
-
-EOLIAN static void *
-_evas_canvas3d_mesh_frame_vertex_data_map(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd, int frame, Evas_Canvas3D_Vertex_Attrib attrib)
-{
- Evas_Canvas3D_Mesh_Frame *f = evas_canvas3d_mesh_frame_find(pd, frame);
-
- if (f == NULL)
- {
- ERR("Not existing mesh frame.");
- return NULL;
- }
-
- if (f->vertices[attrib].mapped)
- {
- ERR("Try to map already mapped data.");
- return NULL;
- }
-
- f->vertices[attrib].mapped = EINA_TRUE;
- return f->vertices[attrib].data;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_frame_vertex_data_unmap(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd, int frame, Evas_Canvas3D_Vertex_Attrib attrib)
-{
- Evas_Canvas3D_Mesh_Frame *f = evas_canvas3d_mesh_frame_find(pd, frame);
-
- if (f == NULL)
- {
- ERR("Not existing mesh frame.");
- return;
- }
-
- if (!f->vertices[attrib].mapped)
- {
- ERR("Try to unmap data which is not mapped yet.");
- return;
- }
-
- f->vertices[attrib].mapped = EINA_FALSE;
-}
-
-EOLIAN static int
-_evas_canvas3d_mesh_frame_vertex_stride_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd, int frame, Evas_Canvas3D_Vertex_Attrib attrib)
-{
- Evas_Canvas3D_Mesh_Frame *f = evas_canvas3d_mesh_frame_find(pd, frame);
-
- if (f == NULL)
- {
- ERR("Not existing mesh frame.");
- return 0;
- }
-
- return f->vertices[attrib].stride;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_index_data_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Evas_Canvas3D_Index_Format format, int count, const void *indices)
-{
- if (pd->owns_indices && pd->indices)
- free(pd->indices);
-
- pd->index_format = format;
- pd->index_count = count;
- pd->index_size = 0;
- pd->indices = (void *)indices;
- pd->owns_indices = EINA_FALSE;
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_INDEX_DATA, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_index_data_copy_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd, Evas_Canvas3D_Index_Format format, int count, const void *indices)
-{
- int size;
-
- if (format == EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_BYTE)
- {
- size = count * sizeof(unsigned char);
- }
- else if (format == EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT)
- {
- size = count * sizeof(unsigned short);
- }
- else
- {
- ERR("Invalid index format.");
- return;
- }
-
- if (!pd->owns_indices || pd->index_size < size)
- {
- if (pd->owns_indices && pd->indices)
- free(pd->indices);
-
- pd->indices = malloc(size);
-
- if (pd->indices == NULL)
- {
- ERR("Failed to allocate memory.");
- return;
- }
-
- pd->index_size = size;
- pd->owns_indices = EINA_TRUE;
- }
-
- pd->index_format = format;
- pd->index_count = count;
-
- if (indices)
- memcpy(pd->indices, indices, size);
-}
-
-EOLIAN static Evas_Canvas3D_Index_Format
-_evas_canvas3d_mesh_index_format_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd)
-{
- return pd->index_format;
-}
-
-EOLIAN static int
-_evas_canvas3d_mesh_index_count_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd)
-{
- return pd->index_count;
-}
-
-EOLIAN static void *
-_evas_canvas3d_mesh_index_data_map(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd)
-{
- if (pd->index_mapped)
- {
- ERR("Try to map already mapped data.");
- return NULL;
- }
-
- pd->index_mapped = EINA_TRUE;
- return pd->indices;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_index_data_unmap(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd)
-{
- if (!pd->index_mapped)
- {
- ERR("Try to unmap data which is not mapped yet.");
- return;
- }
-
- pd->index_mapped = EINA_FALSE;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_vertex_assembly_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Evas_Canvas3D_Vertex_Assembly assembly)
-{
- pd->assembly = assembly;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_VERTEX_ASSEMBLY, NULL);
-}
-
-EOLIAN static Evas_Canvas3D_Vertex_Assembly
-_evas_canvas3d_mesh_vertex_assembly_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd)
-{
- return pd->assembly;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_fog_color_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
-{
- evas_color_set(&pd->fog_color, r, g, b, a);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_FOG, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_fog_color_get(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd,
- Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a)
-{
- if (r) *r = pd->fog_color.r;
- if (g) *g = pd->fog_color.g;
- if (b) *b = pd->fog_color.b;
- if (a) *a = pd->fog_color.a;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_fog_enable_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Eina_Bool enabled)
-{
- pd->fog_enabled = enabled;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_FOG, NULL);
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_mesh_fog_enable_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd)
-{
- return pd->fog_enabled;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_blending_enable_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Eina_Bool blending)
-{
- pd->blending = blending;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_BLENDING, NULL);
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_mesh_blending_enable_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd)
-{
- return pd->blending;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_blending_func_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Evas_Canvas3D_Blend_Func sfactor, Evas_Canvas3D_Blend_Func dfactor)
-{
- pd->blend_sfactor = sfactor;
- pd->blend_dfactor = dfactor;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_BLENDING, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_blending_func_get(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd,
- Evas_Canvas3D_Blend_Func *sfactor, Evas_Canvas3D_Blend_Func *dfactor)
-{
- if (sfactor) *sfactor = pd->blend_sfactor;
- if (dfactor) *dfactor = pd->blend_dfactor;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_alpha_func_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Evas_Canvas3D_Comparison comparison,
- Evas_Real ref_value)
-{
- if (pd->alpha_comparison == comparison &&
- (EINA_DBL_EQ(pd->alpha_ref_value, ref_value)))
- return;
- pd->alpha_comparison = comparison;
- pd->alpha_ref_value = ref_value;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_ALPHA_TEST, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_alpha_func_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd,
- Evas_Canvas3D_Comparison *comparison,
- Evas_Real *ref_value)
-{
- if (comparison) *comparison = pd->alpha_comparison;
- if (ref_value) *ref_value = pd->alpha_ref_value;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_alpha_test_enable_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Eina_Bool enabled)
-{
- pd->alpha_test_enabled = enabled;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_ALPHA_TEST, NULL);
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_mesh_alpha_test_enable_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd)
-{
- return pd->alpha_test_enabled;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_efl_file_unload(Eo *obj, Evas_Canvas3D_Mesh_Data *pd)
-{
- efl_file_unload(efl_super(obj, MY_CLASS));
- _mesh_fini(pd);
-}
-
-EOLIAN static Eina_Error
-_evas_canvas3d_mesh_efl_file_load(Eo *obj, Evas_Canvas3D_Mesh_Data *pd)
-{
- const Eina_File *f;
- Eina_Error err;
-
- if (efl_file_loaded_get(obj)) return 0;
-
- err = efl_file_load(efl_super(obj, MY_CLASS));
- if (err) return err;
-
- _mesh_fini(pd);
- _mesh_init(pd);
-
- f = efl_file_mmap_get(obj);
- if (f == NULL) return EFL_GFX_IMAGE_LOAD_ERROR_DOES_NOT_EXIST;
-
- evas_common_load_model_from_eina_file(obj, f);
-
- return 0;
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_mesh_efl_file_save_save(const Eo *obj, Evas_Canvas3D_Mesh_Data *pd,
- const char *file,
- const char *key EINA_UNUSED,
- const Efl_File_Save_Info *info EINA_UNUSED)
-{
- if ((file == NULL) || (obj == NULL) || (pd == NULL)) return EINA_FALSE;
-
- Evas_Canvas3D_Mesh_Frame *f = evas_canvas3d_mesh_frame_find(pd, 0);
-
- if (f == NULL)
- {
- ERR("Not existing mesh frame.");
- return EINA_FALSE;
- }
-
- evas_common_save_model_to_file(obj, file, f);
- return EINA_TRUE;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_from_primitive_set(Eo *obj,
- Evas_Canvas3D_Mesh_Data *pd EINA_UNUSED,
- int frame,
- Eo *primitive)
-{
- if ((primitive == NULL) || (obj == NULL)) return;
-
- Evas_Canvas3D_Primitive_Data *ppd = efl_data_scope_get(primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS);
-
- evas_common_set_model_from_primitive(obj, frame, ppd);
-}
-
-void
-evas_canvas3d_mesh_interpolate_position_get(Eina_Vector3 *out, const Evas_Canvas3D_Vertex_Buffer *pos0, const Evas_Canvas3D_Vertex_Buffer *pos1,
- Evas_Real weight, int index)
-{
- if (pos1->data == NULL)
- {
- float *ptr;
-
- if (pos0->stride != 0)
- ptr = (float *)((char *)pos0->data + pos0->stride * index);
- else
- ptr = (float *)pos0->data + 3 * index;
-
- out->x = ptr[0];
- out->y = ptr[1];
- out->z = ptr[2];
- }
- else
- {
- float *ptr0, *ptr1;
-
- if (pos0->stride != 0)
- ptr0 = (float *)((char *)pos0->data + pos0->stride * index);
- else
- ptr0 = (float *)pos0->data + 3 * index;
-
- if (pos1->stride != 0)
- ptr1 = (float *)((char *)pos1->data + pos1->stride * index);
- else
- ptr1 = (float *)pos1->data + 3 * index;
-
- out->x = ptr0[0] * weight + ptr1[0] * (1.0 - weight);
- out->y = ptr0[1] * weight + ptr1[1] * (1.0 - weight);
- out->z = ptr0[2] * weight + ptr1[2] * (1.0 - weight);
- }
-}
-
-static inline void
-_mesh_frame_find(Evas_Canvas3D_Mesh *mesh, int frame,
- Eina_List **l, Eina_List **r)
-{
- Eina_List *left, *right;
- Evas_Canvas3D_Mesh_Frame *f0 = NULL, *f1;
- Evas_Canvas3D_Mesh_Data *pdmesh = efl_data_scope_get(mesh, EVAS_CANVAS3D_MESH_CLASS);
-
- left = pdmesh->frames;
- right = eina_list_next(left);
-
- while (right)
- {
- f0 = (Evas_Canvas3D_Mesh_Frame *)eina_list_data_get(left);
- f1 = (Evas_Canvas3D_Mesh_Frame *)eina_list_data_get(right);
-
- if (frame >= f0->frame && frame <= f1->frame)
- break;
-
- left = right;
- right = eina_list_next(left);
- }
-
- if (right == NULL)
- {
- if (f0 && frame <= f0->frame)
- {
- *l = NULL;
- *r = left;
- }
- else
- {
- *l = left;
- *r = NULL;
- }
- return;
- }
-
- *l = left;
- *r = right;
-}
-
-void
-evas_canvas3d_mesh_interpolate_vertex_buffer_get(Evas_Canvas3D_Mesh *mesh, int frame,
- Evas_Canvas3D_Vertex_Attrib attrib,
- Evas_Canvas3D_Vertex_Buffer *buf0,
- Evas_Canvas3D_Vertex_Buffer *buf1,
- Evas_Real *weight)
-{
- Eina_List *l, *r;
- const Evas_Canvas3D_Mesh_Frame *f0 = NULL, *f1 = NULL;
- _mesh_frame_find(mesh, frame, &l, &r);
-
- while (l)
- {
- f0 = (const Evas_Canvas3D_Mesh_Frame *)eina_list_data_get(l);
-
- if (f0->vertices[attrib].data != NULL)
- break;
-
- l = eina_list_prev(l);
- f0 = NULL;
- }
-
- while (r)
- {
- f1 = (const Evas_Canvas3D_Mesh_Frame *)eina_list_data_get(r);
-
- if (f1->vertices[attrib].data != NULL)
- break;
-
- r = eina_list_next(r);
- f1 = NULL;
- }
-
- if (f0 == NULL && f1 == NULL)
- return;
-
- if (f0 == NULL)
- {
- f0 = f1;
- }
- else if (f1 != NULL)
- {
- if (frame == f0->frame)
- {
- f1 = NULL;
- }
- else if (frame == f1->frame)
- {
- f0 = f1;
- f1 = NULL;
- }
- }
-
- buf0->data = f0->vertices[attrib].data;
- buf0->stride = f0->vertices[attrib].stride;
- buf0->size = f0->vertices[attrib].size;
-
- if (f1)
- {
- buf1->data = f1->vertices[attrib].data;
- buf1->stride = f1->vertices[attrib].stride;
- buf1->size = f1->vertices[attrib].size;
-
- *weight = (f1->frame - frame) / (Evas_Real)(f1->frame - f0->frame);
- }
- else
- {
- buf1->data = NULL;
- buf1->stride = 0;
- buf1->size = 0;
-
- *weight = 1.0;
- }
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_mesh_color_pick_enable_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd)
-{
- return pd->color_pick_enabled;
-}
-EOLIAN static void
-_evas_canvas3d_mesh_color_pick_enable_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Eina_Bool enabled)
-{
- if (pd->color_pick_enabled != enabled)
- pd->color_pick_enabled = enabled;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_COLOR_PICK, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_shadows_edges_filtering_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd,
- int blur_level, Evas_Real edges_size)
-{
- if (blur_level > 0)
- pd->shadows_edges_filtering_level = blur_level;
- if (edges_size >= 0)
- pd->shadows_edges_size = edges_size;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_SHADOWS_EDGES_FILTERING, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_shadows_edges_filtering_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd,
- int *blur_level, Evas_Real *edges_size)
-{
- if (blur_level) *blur_level = pd->shadows_edges_filtering_level;
- if (edges_size) *edges_size = pd->shadows_edges_size;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_shadows_constant_bias_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd,
- Evas_Real bias)
-{
- if (!EINA_DBL_EQ(pd->shadows_constant_bias, bias))
- {
- pd->shadows_constant_bias = bias;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_SHADOWS_CONSTANT_BIAS, NULL);
- }
-}
-
-EOLIAN static Evas_Real
-_evas_canvas3d_mesh_shadows_constant_bias_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd)
-{
- return pd->shadows_constant_bias;
-}
-EOLIAN static void
-_evas_canvas3d_mesh_convex_hull_data_get(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd,
- int frame, Eina_Inarray *vertex, Eina_Inarray *index)
-{
- int stride;
-
- Evas_Canvas3D_Mesh_Frame *f = evas_canvas3d_mesh_frame_find(pd, frame);
-
- if (!f)
- {
- ERR("Not existing mesh frame %d %s", __LINE__, __FILE__);
- return;
- }
-
- if (f->vertices[EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION].stride != 0)
- stride = f->vertices[EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION].stride / sizeof(float);
- else
- stride = 3;
-
- float *data = (float *)f->vertices[EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION].data;
-
- evas_convex_hull_get(data, pd->vertex_count, stride, vertex, index);
-
- return;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_lod_boundary_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd,
- Evas_Real near_lod, Evas_Real far_lod)
-{
- pd->near_lod_boundary = near_lod;
- pd->far_lod_boundary = far_lod;
-}
-
-EOLIAN static void
-_evas_canvas3d_mesh_lod_boundary_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd,
- Evas_Real *near_lod, Evas_Real *far_lod)
-{
- *near_lod = pd->near_lod_boundary;
- *far_lod = pd->far_lod_boundary;
-}
-#include "canvas/evas_canvas3d_mesh.eo.c"
diff --git a/src/lib/evas/canvas/evas_canvas3d_mesh.eo b/src/lib/evas/canvas/evas_canvas3d_mesh.eo
deleted file mode 100644
index 364390d18f..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_mesh.eo
+++ /dev/null
@@ -1,421 +0,0 @@
-import evas_canvas3d_types;
-
-struct @beta @extern Eina.Inarray; [[Eina inarray data structure]]
-
-class @beta Evas.Canvas3D.Mesh extends Evas.Canvas3D.Object implements Efl.File, Efl.File_Save
-{
- [[Evas 3D canvas mesh class]]
- data: Evas_Canvas3D_Mesh_Data;
-
- methods {
- frame_vertex_data_set {
- [[Set the vertex data of the key frame of the given mesh.
-
- This function make evas read from the given buffer whenever it
- requires. If you want to release the buffer after calling this
- function, use @.frame_vertex_data_copy_set instead.
-
- After setting the vertex data, further modifications should be
- protected by map/unmap pair.
-
- See also @.frame_vertex_data_map, @.frame_vertex_data_unmap.
- ]]
- params {
- @in frame: int; [[The number of the key frame.]]
- @in attrib: Evas.Canvas3D.Vertex_Attrib; [[Vertex attribute ID.]]
- @in stride: int; [[Stride to go to the next vertex (in bytes).]]
- @in data: const(void_ptr); [[Pointer to the vertex data buffer.]]
- }
- }
-
- frame_vertex_data_copy_set {
- [[Set the vertex data of the key frame of the given mesh by copying
- from a buffer. This function allocates internal vertex buffer and
- copy from the given buffer. So you can release the buffer. If you
- want to modify the vertex data use @.frame_vertex_data_map. After
- finishing the modifications, you should call @.frame_vertex_data_unmap.
-
- See also @.frame_vertex_data_set.
- ]]
- params {
- @in frame: int; [[The number of the key frame.]]
- @in attrib: Evas.Canvas3D.Vertex_Attrib; [[Vertex attribute ID.]]
- @in stride: int; [[Stride to go to the next vertex (in bytes).]]
- @in data: const(void_ptr); [[Pointer to the vertex data buffer.]]
- }
- }
-
- frame_vertex_data_map {
- [[Map the vertex buffer of the key frame of the given mesh.
-
- After manipulating the mapped buffer, @.frame_vertex_data_unmap
- should be called to properly download the data to the engine. If
- the data was set using @.frame_vertex_data_set, pointer to the
- original buffer will be returned. Otherwise, the returned pointer
- can differ every time calling this function.
- ]]
- return: void_ptr; [[Starting address of the mapped vertex buffer.]]
- params {
- @in frame: int; [[The number of the key frame.]]
- @in attrib: Evas.Canvas3D.Vertex_Attrib; [[Vertex attribute ID.]]
- }
- }
-
- frame_vertex_data_unmap {
- [[Unmap the vertex buffer of the key frame of the given mesh.
-
- See also @.frame_vertex_data_map.
- ]]
- params {
- @in frame: int; [[The number of the key frame.]]
- @in attrib: Evas.Canvas3D.Vertex_Attrib; [[Vertex attribute ID.]]
- }
- }
-
- frame_vertex_stride_get @const {
- [[Get the vertex buffer stride of the key frame of the given mesh.
-
- This function returns valid stride only when the vertex buffer
- is mapped. If the data was set with @.frame_vertex_data_set, the
- original stride will be returned unchanged.
- ]]
- return: int; [[Stride to go to the next vertex (in bytes).]]
- params {
- @in frame: int; [[The number of the key frame.]]
- @in attrib: Evas.Canvas3D.Vertex_Attrib; [[Vertex attribute ID.]]
- }
- }
-
- index_data_set {
- [[Set the vertex index data of the given mesh.
-
- When the index data is set, Evas 3D assembles vertices using the
- index data. If you want to free the data buffer, use
- @.index_data_copy_set. Further modifications should be made
- within map/unmap pair.
- ]]
- params {
- @in format: Evas.Canvas3D.Index_Format; [[Vertex index data format.]]
- @in count: int; [[Vertex index count.]]
- @in indices: const(void_ptr); [[Pointer to the index data.]]
- }
- }
-
- convex_hull_data_get {
- [[Get the vertex and index data of convex hull around the given mesh.
- ]]
- params {
- @in frame: int; [[ The number of the key frame.]]
- @in vertex: ptr(Eina.Inarray); [[Vertex data pointer]]
- @in index: ptr(Eina.Inarray); [[Index data pointer]]
- }
- }
-
- index_data_copy_set {
- [[Set the vertex index data of the given mesh by copying from a
- buffer.
-
- This function allocates internal index buffer any copy data from
- the given buffer. Further modifications can be made within
- map/unmap pair.
-
- See also @.index_data_set.
- ]]
- params {
- @in format: Evas.Canvas3D.Index_Format; [[Vertex index data format.]]
- @in count: int; [[Vertex index count.]]
- @in indices: const(void_ptr); [[Pointer to the index data.]]
- }
- }
-
- index_format_get @const {
- [[Get the format of the index data of the given mesh.
-
- Returns valid format only when the index buffer is mapped. First
- map the index buffer and then query the properties of the mapped
- buffer. If the index data was set by @.index_data_set, the
- original format will be returned. Otherwise the format can differ
- every time you call the @.index_data_map function.
- ]]
- return: Evas.Canvas3D.Index_Format; [[Format of the index data.]]
- }
-
- index_count_get @const {
- [[Get the count of the index data of the given mesh.
-
- This function returns the index count of the last called data_set
- function.
- ]]
- return: int; [[Index data count.]]
- }
-
- index_data_map {
- [[Map the index buffer of the given mesh.
-
- @.index_data_unmap should be called after modifications. If the
- data was set using @.index_data_set, the original pointer will
- be returned, otherwise, the returned pointer may differ every
- time you call this function.
- ]]
- return: void_ptr; [[Pointer to the mapped buffer.]]
- }
-
- index_data_unmap {
- [[Unmap the index buffer of the given mesh.
-
- See also @.index_data_map.
- ]]
- }
-
- frame_exist {
- [[Returns $true if frame was added and $false in other case.]]
- params {
- @in frame: int; [[Frame number.]]
- }
- return: bool; [[$true ifr frame was added, $false otherwise]]
- }
-
- frame_add {
- [[Add a key frame to the given mesh.
-
- If specified frame is already exist, error message will be generated.
- ]]
- params {
- @in frame: int; [[The number of the key frame to be added.]]
- }
- }
-
- frame_del {
- [[Delete a key frame from the given mesh.]]
- params {
- @in frame: int; [[The number of the key frame to be added.]]
- }
- }
-
- fog_color_set {
- [[Set the fog color and density for the given mesh.]]
- params {
- @in r: Evas.Real; [[The red component of the fog color.]]
- @in g: Evas.Real; [[The green component of the fog color.]]
- @in b: Evas.Real; [[The blue component of the fog color.]]
- @in a: Evas.Real; [[The transparency of fog.]]
- }
- }
- fog_color_get {
- [[Set the fog color and density for the given mesh.]]
- params {
- @out r: Evas.Real; [[Pointer to receive red component of the fog color.]]
- @out g: Evas.Real; [[Pointer to receive green component of the fog color.]]
- @out b: Evas.Real; [[Pointer to receive blue component of the fog color.]]
- @out a: Evas.Real; [[Pointer to receive transparency of fog.]]
- }
- }
- blending_func_set {
- [[Set the blending function for given mesh.]]
- params {
- @in sfactor: Evas.Canvas3D.Blend_Func; [[Specifies how the red, green, blue,
- and alpha source blending factors
- are computed.
- ]]
- @in dfactor: Evas.Canvas3D.Blend_Func; [[Specifies how the red, green, blue,
- and alpha destination blending
- factors are computed.
- ]]
- }
- }
- blending_func_get {
- [[Get blending function for given mesh.]]
- params {
- @out sfactor: Evas.Canvas3D.Blend_Func; [[Pointer to receive source blending factors key.]]
- @out dfactor: Evas.Canvas3D.Blend_Func; [[Pointer to receive destination blending factors key.]]
- }
- }
- from_primitive_set {
- [[Set the data of given mesh frame from the given primitive.]]
- params {
- @in frame: int; [[Specifies data of which frame of given mesh will be set.]]
- @in primitive: Evas.Canvas3D.Primitive; [[Specifies which data will be set.]]
- }
- }
- @property shader_mode {
- [[Set the shader mode of the given mesh.
-
- Default shader mode is EVAS_CANVAS3D_SHADER_MODE_VERTEX_COLOR.
- ]]
- set {
- }
- get {
- }
- values {
- mode: Evas.Canvas3D.Shader_Mode; [[The shader mode.]]
- }
- }
- @property color_pick_enable {
- [[Set possibility color picking.]]
- set {
- }
- get {
- }
- values {
- enabled: bool; [[Possibility flag.]]
- }
- }
- @property vertex_count {
- [[The vertex count of the given mesh.
-
- Each key frame should have same vertex count to be properly
- interpolated. Key frames have their own vertex data and the
- data should have more vertices than the mesh's vertex count.
-
- Default vertex count is 0.
- ]]
- set {
- }
- get {
- }
- values {
- count: uint; [[Vertex count.]]
- }
- }
- @property fog_enable {
- [[Enable or disable fog effect for given mesh.
-
- Default fog is disabled.
- ]]
- set {
- }
- get {
- }
- values {
- enabled: bool; [[Fog enabled status.]]
- }
- }
-
- @property alpha_test_enable {
- [[The enable status of alpha test for given mesh.
-
- Default alpha test disabled.
- ]]
- set {
- }
- get {
- [[Get the enable status of alpha test for given mesh.]]
- }
- values {
- enabled: bool; [[The alpha test status.]]
- }
- }
-
- @property alpha_func {
- [[The alpha function.
-
- The alpha test discards fragments depending on the outcome of
- a comparison between an incoming fragment's alpha value and a
- constant reference value. This function specifies the reference
- value and the comparison function.
- ]]
- set {
- }
- get {
- }
- values {
- comparison_func: Evas.Canvas3D.Comparison; [[The alpha comparison function.]]
- ref_value: Evas.Real; [[The reference value that incoming alpha values are compared to.]]
- }
- }
-
- @property blending_enable {
- [[Enable or disable blending for given mesh.]]
- set {
- }
- get {
- }
- values {
- blending: bool; [[The blending state.]]
- }
- }
-
- @property frame_material {
- [[The material of the key frame of the given mesh.
-
- Setting different materials for each key frame is useful for
- doing animations like GIF images or color changing animations.
- ]]
- set {
- }
- get {
- }
- keys {
- frame: int; [[The number of the key frame.]]
- }
- values {
- material: Evas.Canvas3D.Material; [[The material to be set to the key frame.]]
- }
- }
-
- @property vertex_assembly {
- [[The vertex assembly of the given mesh.
-
- Vertex assembly defines how the engine organizes vertices into
- geometric primitives.
-
- Default vertex assembly is EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES.
- ]]
- set {
- }
- get {
- }
- values {
- assembly: Evas.Canvas3D.Vertex_Assembly; [[The vertex assembly.]]
- }
- }
- @property shadows_edges_filtering {
- [[The shadow edges blur parameters.
-
- The averaging values in window is used for blurring.
- User can set the size of window and num of points in window.
- ]]
- set {
- }
- get {
- }
- values {
- blur_level: int; [[Number of points within a bluring radius.]]
- edges_size: Evas.Real; [[The bluring radius.]]
- }
- }
- @property shadows_constant_bias {
- [[The offset shadow toward object.]]
- set {
- }
- get {
- }
- values {
- bias: Evas.Real; [[Offset.]]
- }
- }
- @property lod_boundary {
- [[The LOD boundary distances.]]
- set {
- }
- get {
- }
- values {
- near_lod: Evas.Real; [[Up boundary]]
- far_lod: Evas.Real; [[Down boundary]]
- }
- }
- }
- implements {
- Efl.Object.constructor;
- Efl.Object.destructor;
- Evas.Canvas3D.Object.update_notify;
- Evas.Canvas3D.Object.change_notify;
- Efl.File.load;
- Efl.File.unload;
- Efl.File_Save.save;
- @empty Evas.Canvas3D.Object.callback_register;
- @empty Evas.Canvas3D.Object.callback_unregister;
- }
-
-}
diff --git a/src/lib/evas/canvas/evas_canvas3d_node.c b/src/lib/evas/canvas/evas_canvas3d_node.c
deleted file mode 100644
index 98492fa502..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_node.c
+++ /dev/null
@@ -1,1695 +0,0 @@
-#include "eo_internal.h"
-#include "evas_common_private.h"
-#include "evas_private.h"
-#include "evas_canvas3d_node_callback.h"
-
-#define MY_CLASS EVAS_CANVAS3D_NODE_CLASS
-#define MY_CLASS_NAME "Evas_Canvas3D_Node"
-
-Evas_Canvas3D_Mesh_Frame *evas_canvas3d_mesh_frame_find(Evas_Canvas3D_Mesh_Data *pd, int frame);
-
-static void
-_look_at_set(Evas_Canvas3D_Node_Data *pd, Eina_Vector3 *target, Eina_Vector3 *up);
-
-static Eina_Stringshare *
-_generate_unic_color_key(Evas_Color *color, Evas_Color *bg_color, Evas_Canvas3D_Node *node, Evas_Canvas3D_Mesh *mesh,
- Eina_Bool init)
-{
- static unsigned char red = 0;
- static unsigned char green = 0;
- static unsigned char blue = 0;
- if (init) red = green = blue = 0;
-
-#define GET_NEXT_COLOR \
- red++; \
- if (red == 255) \
- { \
- red = 0; \
- green++; \
- if (green == 255) \
- { \
- green = 0; \
- blue++; \
- } \
- }
-
- GET_NEXT_COLOR
- /*Get another color if color equal with background color*/
- if ((EINA_DBL_EQ(bg_color->r, (double)red)) &&
- (EINA_DBL_EQ(bg_color->g, (double)green)) &&
- (EINA_DBL_EQ(bg_color->b, (double)blue)))
- {
- GET_NEXT_COLOR
- }
-
- color->r = (double)red / 255;
- color->g = (double)green / 255;
- color->b = (double)blue / 255;
-
-#undef GET_NEXT_COLOR
-
- return eina_stringshare_printf("%p %p", node, mesh);
-}
-
-static void
-_evas_canvas3d_node_private_callback_collision(void *data, const Efl_Event *event)
-{
- Eina_List *collision_list = NULL, *l = NULL;
- Evas_Canvas3D_Node *target_node = NULL, *n = NULL;
- Evas_Canvas3D_Node_Data *pd_target = NULL, *pd = NULL;
- const Efl_Event_Description *eo_desc = NULL;
- Eina_Bool ret = EINA_FALSE;
-
- target_node = (Evas_Canvas3D_Node *)event->info;
- pd_target = efl_data_scope_get(target_node, EVAS_CANVAS3D_NODE_CLASS);
- collision_list = (Eina_List *)data;
- eo_desc = efl_object_legacy_only_event_description_get("collision");
-
- if (collision_list)
- {
- EINA_LIST_FOREACH(collision_list, l, n)
- {
- pd = efl_data_scope_get(n, EVAS_CANVAS3D_NODE_CLASS);
- if (box_intersection_box(&pd_target->aabb, &pd->aabb))
- ret = efl_event_callback_legacy_call(target_node, eo_desc, n);
- }
- if (!ret)
- {
- /* XXX: Putting it like this because that's how the logic was,
- * but it seems absolutely wrong that it only checks the last
- * and decides based on that. */
- efl_event_callback_stop(event->object);
- }
- }
-}
-static void
-_evas_canvas3d_node_private_callback_clicked(void *data EINA_UNUSED, const Efl_Event *event)
-{
- Eina_Bool ret = EINA_FALSE;
- const Efl_Event_Description *eo_desc = efl_object_legacy_only_event_description_get("clicked");
- ret = efl_event_callback_legacy_call((Eo *)event->info, eo_desc, event->info);
-
- if (!ret)
- efl_event_callback_stop(event->object);
-}
-
-static inline Evas_Canvas3D_Node_Mesh *
-_node_mesh_new(Evas_Canvas3D_Node *node, Evas_Canvas3D_Mesh *mesh)
-{
- Evas_Canvas3D_Node_Mesh *nm = (Evas_Canvas3D_Node_Mesh *)malloc(sizeof(Evas_Canvas3D_Node_Mesh));
-
- if (nm == NULL)
- {
- ERR("Failed to allocate memory.");
- return NULL;
- }
-
- nm->node = node;
- nm->mesh = mesh;
- nm->frame = 0;
-
- return nm;
-}
-
-static inline void
-_node_mesh_free(Evas_Canvas3D_Node_Mesh *nm)
-{
- free(nm);
-}
-
-static void
-_node_mesh_free_func(void *data)
-{
- _node_mesh_free((Evas_Canvas3D_Node_Mesh *)data);
-}
-
-static Eina_Bool
-_node_scene_root_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
- void *data EINA_UNUSED, void *fdata)
-{
- Evas_Canvas3D_Scene *s = *(Evas_Canvas3D_Scene **)key;
- evas_canvas3d_object_change(s, EVAS_CANVAS3D_STATE_SCENE_ROOT_NODE, (Evas_Canvas3D_Object *)fdata);
- return EINA_TRUE;
-}
-
-static Eina_Bool
-_node_scene_camera_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
- void *data EINA_UNUSED, void *fdata)
-{
- Evas_Canvas3D_Scene *s = *(Evas_Canvas3D_Scene **)key;
- evas_canvas3d_object_change(s, EVAS_CANVAS3D_STATE_SCENE_CAMERA_NODE, (Evas_Canvas3D_Object *)fdata);
- return EINA_TRUE;
-}
-
-EOLIAN static void
-_evas_canvas3d_node_evas_canvas3d_object_change_notify(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Canvas3D_State state EINA_UNUSED , Evas_Canvas3D_Object *ref EINA_UNUSED)
-{
- Eina_List *l;
- Evas_Canvas3D_Node *n;
- Eina_Bool orientation;
- Eina_Bool position;
- Eina_Bool scale;
- Eina_Bool parent_change;
-
- /* Notify all scenes using this node that it has changed. */
- if (pd->scenes_root)
- eina_hash_foreach(pd->scenes_root, _node_scene_root_change_notify, obj);
-
- if (pd->scenes_camera)
- eina_hash_foreach(pd->scenes_camera, _node_scene_camera_change_notify, obj);
-
- parent_change = (state == EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION)
- || (state == EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION)
- || (state == EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE);
-
- /* Notify parent that a member has changed. */
- if (pd->parent && !parent_change)
- {
- evas_canvas3d_object_change(pd->parent, EVAS_CANVAS3D_STATE_NODE_MEMBER, obj);
- }
-
- orientation = (state == EVAS_CANVAS3D_STATE_NODE_TRANSFORM_ORIENTATION)
- || (state == EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION);
- position = (state == EVAS_CANVAS3D_STATE_NODE_TRANSFORM_POSITION)
- || (state == EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION);
- scale = (state == EVAS_CANVAS3D_STATE_NODE_TRANSFORM_SCALE)
- || (state == EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE);
-
- /* Notify members that the parent has changed. */
- if (scale)
- EINA_LIST_FOREACH(pd->members, l, n)
- {
- evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE, obj);
- }
- if (orientation && !(pd->billboard_target))
- EINA_LIST_FOREACH(pd->members, l, n)
- {
- /*Skip change orientation if node is billboard*/
- Evas_Canvas3D_Node_Data *pdm = efl_data_scope_get(n, EVAS_CANVAS3D_NODE_CLASS);
- if (pdm->billboard_target)
- continue;
- evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION, obj);
- }
- if (position)
- EINA_LIST_FOREACH(pd->members, l, n)
- {
- evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION, obj);
- }
-}
-
-EOLIAN static void
-_evas_canvas3d_node_evas_canvas3d_object_callback_register(Eo *obj, Evas_Canvas3D_Node_Data *pd EINA_UNUSED,
- const char *event, const void *data)
-{
- Evas_Canvas3D_Node_Private_Callback_Type tcb;
-
- GET_CALLBACK_TYPE(tcb, event)
-
- if (tcb != PRIVATE_CALLBACK_NONE)
- efl_event_callback_add(obj, &evas_canvas3d_node_private_event_desc[tcb], evas_canvas3d_node_private_callback_functions[tcb], data);
-
-}
-
-EOLIAN static void
-_evas_canvas3d_node_evas_canvas3d_object_callback_unregister(Eo *obj, Evas_Canvas3D_Node_Data *pd EINA_UNUSED,
- const char *event)
-{
- Evas_Canvas3D_Node_Private_Callback_Type tcb;
-
- GET_CALLBACK_TYPE(tcb, event)
-
- if (tcb != PRIVATE_CALLBACK_NONE)
- efl_event_callback_del(obj, &evas_canvas3d_node_private_event_desc[tcb], evas_canvas3d_node_private_callback_functions[tcb], NULL);
-}
-
-static Eina_Bool
-_node_transform_update(Evas_Canvas3D_Node *node, void *data EINA_UNUSED)
-{
- Evas_Canvas3D_Node_Data *pd = efl_data_scope_get(node, MY_CLASS);
- Eina_Bool transform_dirty = EINA_FALSE, parent_dirty = EINA_FALSE;
-
- transform_dirty = evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_ORIENTATION);
- transform_dirty|= evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_POSITION);
- transform_dirty|= evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_SCALE);
- parent_dirty = evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION);
- parent_dirty |= evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION);
- parent_dirty |= evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE);
-
- if (transform_dirty || parent_dirty)
- {
- if (pd->parent)
- {
- Evas_Canvas3D_Node_Data *pdparent = efl_data_scope_get(pd->parent, MY_CLASS);
- const Eina_Vector3 *scale_parent = &pdparent->scale_world;
- const Eina_Quaternion *orientation_parent = &pdparent->orientation_world;
-
- /* Orienatation */
- if (pd->orientation_inherit)
- {
- eina_quaternion_mul(&pd->orientation_world,
- orientation_parent, &pd->orientation);
- }
- else
- {
- pd->orientation_world = pd->orientation;
- }
-
- /* Scale */
- if (pd->scale_inherit)
- eina_vector3_multiply(&pd->scale_world, scale_parent, &pd->scale);
- else
- pd->scale_world = pd->scale;
-
- /* Position */
- if (pd->position_inherit)
- {
- eina_vector3_multiply(&pd->position_world, &pd->position, scale_parent);
- eina_vector3_quaternion_rotate(&pd->position_world, &pd->position_world,
- orientation_parent);
- eina_vector3_add(&pd->position_world, &pd->position_world,
- &pdparent->position_world);
- }
- else
- {
- pd->position_world = pd->position;
- }
- }
- else
- {
- pd->position_world = pd->position;
- pd->orientation_world = pd->orientation;
- pd->scale_world = pd->scale;
- }
-
- if (pd->type == EVAS_CANVAS3D_NODE_TYPE_CAMERA)
- {
- evas_mat4_inverse_build(&pd->data.camera.matrix_world_to_eye,
- &pd->position_world, &pd->orientation_world,
- &pd->scale_world);
- }
- else if (pd->type == EVAS_CANVAS3D_NODE_TYPE_LIGHT)
- {
- }
- else if (pd->type == EVAS_CANVAS3D_NODE_TYPE_MESH)
- {
- evas_mat4_build(&pd->data.mesh.matrix_local_to_world,
- &pd->position_world, &pd->orientation_world, &pd->scale_world);
- }
-/*
- if (pd->parent)
- {
- evas_mat4_nocheck_multiply(&pd->matrix_local_to_world,
- &pd->parent->matrix_local_to_world,
- &pd->matrix_local_to_parent);
- }
- else
- {
- evas_mat4_copy(&pd->matrix_local_to_world, &pd->matrix_local_to_parent);
- }*/
- }
-
- return EINA_TRUE;
-}
-
-static Eina_Bool
-_node_billboard_update(Evas_Canvas3D_Node *node, void *data EINA_UNUSED)
-{
- Eina_Vector3 target;
- Eina_Vector3 up;
- Evas_Canvas3D_Node_Data *pd_node = efl_data_scope_get(node, MY_CLASS);
- if (pd_node->billboard_target)
- {
- Evas_Canvas3D_Node_Data *pd_target = efl_data_scope_get(pd_node->billboard_target,
- MY_CLASS);
- eina_vector3_set(&target, pd_target->position.x, pd_target->position.y,
- pd_target->position.z);
- eina_vector3_set(&up, 0, 1, 0);
-
- _look_at_set(pd_node, &target, &up);
-
- if (pd_node->type == EVAS_CANVAS3D_NODE_TYPE_MESH)
- {
- evas_mat4_build(&pd_node->data.mesh.matrix_local_to_world,
- &pd_node->position, &pd_node->orientation,
- &pd_node->scale);
- }
- else if (pd_node->type == EVAS_CANVAS3D_NODE_TYPE_LIGHT)
- {
- evas_mat4_build(&pd_node->data.light.matrix_local_to_world,
- &pd_node->position, &pd_node->orientation,
- &pd_node->scale);
- }
- else if (pd_node->type == EVAS_CANVAS3D_NODE_TYPE_CAMERA)
- {
- evas_mat4_inverse_build(&pd_node->data.light.matrix_local_to_world,
- &pd_node->position, &pd_node->orientation,
- &pd_node->scale);
- }
- else
- ERR("Not supported type of node: line %d in file %s", __LINE__ , __FILE__);
- }
- return EINA_TRUE;
-}
-
-static Eina_Bool
-_node_item_update(Evas_Canvas3D_Node *node, void *data EINA_UNUSED)
-{
- Evas_Canvas3D_Node_Data *pd = efl_data_scope_get(node, EVAS_CANVAS3D_NODE_CLASS);
- if (pd->type == EVAS_CANVAS3D_NODE_TYPE_CAMERA)
- {
- if (pd->data.camera.camera)
- {
- evas_canvas3d_object_update(pd->data.camera.camera);
- }
- }
- else if (pd->type == EVAS_CANVAS3D_NODE_TYPE_LIGHT)
- {
- if (pd->data.light.light)
- {
- evas_canvas3d_object_update(pd->data.light.light);
- }
- }
- else if (pd->type == EVAS_CANVAS3D_NODE_TYPE_MESH)
- {
- Eina_List *l;
- Evas_Canvas3D_Mesh *m;
- EINA_LIST_FOREACH(pd->data.mesh.meshes, l, m)
- {
- evas_canvas3d_object_update(m);
- }
- }
-
- return EINA_TRUE;
-}
-
-static void
-_pack_meshes_vertex_data(Evas_Canvas3D_Node *node, Eina_Vector3 **vertices, int *count)
-{
- const Eina_List *m, *l;
- Evas_Canvas3D_Mesh *mesh;
- int j;
- int frame;
- Eina_Vector3 *it;
- Evas_Canvas3D_Vertex_Buffer pos0, pos1;
- Evas_Real pos_weight;
-
- *count = 0;
- m = (Eina_List *)evas_canvas3d_node_mesh_list_get(node);
- EINA_LIST_FOREACH(m, l, mesh)
- {
- frame = evas_canvas3d_node_mesh_frame_get(node, mesh);
- evas_canvas3d_mesh_interpolate_vertex_buffer_get(mesh, frame, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION,
- &pos0, &pos1, &pos_weight);
- if(!pos0.data) continue;
- if(!pos0.stride)
- {
- *count += pos0.size / (sizeof(float) * 3);
- }
- else
- {
- *count += pos0.size / pos0.stride;
- }
- }
- *vertices = (Eina_Vector3*)malloc(*count * sizeof(Eina_Vector3));
- it = *vertices;
- if(!*vertices)
- {
- ERR("Not enough memory.");
- return;
- }
-
- EINA_LIST_FOREACH(m, l, mesh)
- {
- frame = evas_canvas3d_node_mesh_frame_get(node, mesh);
- evas_canvas3d_mesh_interpolate_vertex_buffer_get(mesh, frame, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION,
- &pos0, &pos1, &pos_weight);
- if(!pos0.data) continue;
- int stride = 0;
- if(!pos0.stride)
- {
- stride = sizeof(float) * 3;
- }
- else
- {
- stride = pos0.stride;
- }
- for (j = 0; j < pos0.size / stride; j++)
- {
- evas_canvas3d_mesh_interpolate_position_get(it, &pos0, &pos1, pos_weight, j);
- it++;
- }
- }
-}
-
-static void
-_update_node_shapes(Evas_Canvas3D_Node *node)
-{
- int i;
- int count;
- Eina_Vector3 *vertices = NULL;
- Evas_Canvas3D_Node_Data *pd = efl_data_scope_get(node, EVAS_CANVAS3D_NODE_CLASS);
- Eina_Bool transform_orientation_dirty;
- Eina_Bool transform_position_dirty;
- Eina_Bool transform_scale_dirty;
- Eina_Bool mesh_geom_dirty;
- Eina_Vector3 position = pd->position_world;
-
- if (pd->type != EVAS_CANVAS3D_NODE_TYPE_MESH)
- {
- pd->aabb.p0 = position;
- pd->aabb.p1 = position;
- pd->obb.p0 = position;
- pd->obb.p1 = position;
- pd->bsphere.radius = 0;
- pd->bsphere.center = position;
- return;
- }
-
- transform_orientation_dirty = evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_ORIENTATION);
- transform_orientation_dirty |= evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION);
- transform_position_dirty = evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_POSITION);
- transform_position_dirty |= evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION);
- transform_scale_dirty = evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_SCALE);
- transform_scale_dirty |= evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE);
- mesh_geom_dirty = evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_MESH_GEOMETRY);
- mesh_geom_dirty |= evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_MESH_FRAME);
-
-
- _pack_meshes_vertex_data(node, &vertices, &count);
- if (count > 0)
- {
- calculate_box(&pd->obb, count, vertices);
- for (i = 0; i < count; i++)
- {
- eina_vector3_homogeneous_position_transform(&vertices[i], &pd->data.mesh.matrix_local_to_world, &vertices[i]);
- }
- calculate_box(&pd->aabb, count, vertices);
- if (transform_position_dirty || transform_scale_dirty || mesh_geom_dirty)
- {
- calculate_sphere(&pd->bsphere, count, vertices);
- }
- eina_vector3_homogeneous_position_transform(&pd->obb.p0, &pd->data.mesh.matrix_local_to_world, &pd->obb.p0);
- eina_vector3_homogeneous_position_transform(&pd->obb.p0, &pd->data.mesh.matrix_local_to_world, &pd->obb.p0);
- }
- free(vertices);
-
-}
-
-Eina_Bool
-node_aabb_update(Evas_Canvas3D_Node *node, void *data EINA_UNUSED)
-{
- Evas_Canvas3D_Node_Data *pd = efl_data_scope_get(node, EVAS_CANVAS3D_NODE_CLASS);
- Eina_List *current;
- Evas_Canvas3D_Node *datanode;
- const Efl_Event_Description *eo_desc = NULL;
- if (pd->type != EVAS_CANVAS3D_NODE_TYPE_MESH &&
- pd->type != EVAS_CANVAS3D_NODE_TYPE_NODE)
- return EINA_TRUE;
- _update_node_shapes(node);
- EINA_LIST_FOREACH(pd->members, current, datanode)
- {
- Evas_Canvas3D_Node_Data *datapd = efl_data_scope_get(datanode, EVAS_CANVAS3D_NODE_CLASS);
- evas_box3_union(&pd->obb, &pd->obb, &datapd->obb);
- evas_box3_union(&pd->aabb, &pd->aabb, &datapd->aabb);
- }
-
- evas_build_sphere(&pd->aabb, &pd->bsphere);
- eo_desc = efl_object_legacy_only_event_description_get("collision,private");
- efl_event_callback_legacy_call(node, eo_desc, (void *)node);
-
- return EINA_TRUE;
-}
-
-static Eina_Bool
-_node_update_done(Evas_Canvas3D_Node *obj, void *data EINA_UNUSED)
-{
- //@FIXME
- Evas_Canvas3D_Object_Data *pdobject = efl_data_scope_get(obj, EVAS_CANVAS3D_OBJECT_CLASS);
- memset(&pdobject->dirty[0], 0x00, sizeof(Eina_Bool) * EVAS_CANVAS3D_STATE_MAX);
- return EINA_TRUE;
-}
-
-EOLIAN static void
-_evas_canvas3d_node_evas_canvas3d_object_update_notify(Eo *obj, Evas_Canvas3D_Node_Data *pd EINA_UNUSED)
-{
- /* Update transform. */
- evas_canvas3d_node_tree_traverse(obj, EVAS_CANVAS3D_TREE_TRAVERSE_LEVEL_ORDER, EINA_FALSE,
- _node_transform_update, NULL);
- /*Update billboard*/
- evas_canvas3d_node_tree_traverse(obj, EVAS_CANVAS3D_TREE_TRAVERSE_ANY_ORDER, EINA_FALSE,
- _node_billboard_update, NULL);
- /* Update AABB. */
- if(efl_object_legacy_only_event_description_get("collision,private"))
- {
- evas_canvas3d_node_tree_traverse(obj, EVAS_CANVAS3D_TREE_TRAVERSE_POST_ORDER, EINA_FALSE,
- node_aabb_update, NULL);
- }
-
- /* Update node item. */
- evas_canvas3d_node_tree_traverse(obj, EVAS_CANVAS3D_TREE_TRAVERSE_ANY_ORDER, EINA_FALSE,
- _node_item_update, NULL);
-
- /* Mark all nodes in the tree as up-to-date. */
- evas_canvas3d_node_tree_traverse(obj, EVAS_CANVAS3D_TREE_TRAVERSE_ANY_ORDER, EINA_FALSE,
- _node_update_done, NULL);
-}
-
-static void
-_node_free(Evas_Canvas3D_Object *obj)
-{
- Evas_Canvas3D_Node_Data *pd = efl_data_scope_get(obj, MY_CLASS);
-
- if (pd->members)
- {
- Eina_List *l;
- Evas_Canvas3D_Node *n;
-
- EINA_LIST_FOREACH(pd->members, l, n)
- {
- efl_unref(n);
- }
-
- eina_list_free(pd->members);
- }
-
- if (pd->parent)
- {
- evas_canvas3d_node_member_del(pd->parent, obj);
- }
-
- if (pd->type == EVAS_CANVAS3D_NODE_TYPE_MESH && pd->data.mesh.meshes)
- {
- Eina_List *l;
- Evas_Canvas3D_Mesh *m;
-
- EINA_LIST_FOREACH(pd->data.mesh.meshes, l, m)
- {
- efl_unref(m);
- }
-
- eina_list_free(pd->data.mesh.meshes);
-
- if (pd->data.mesh.node_meshes)
- eina_hash_free(pd->data.mesh.node_meshes);
- }
-
- if (pd->scenes_root)
- eina_hash_free(pd->scenes_root);
-
- if (pd->scenes_camera)
- eina_hash_free(pd->scenes_camera);
-}
-
-void
-evas_canvas3d_node_scene_root_add(Evas_Canvas3D_Node *node, Evas_Canvas3D_Scene *scene)
-{
- int count = 0;
- Evas_Canvas3D_Node_Data *pd = efl_data_scope_get(node, MY_CLASS);
- if (pd->scenes_root == NULL)
- {
- pd->scenes_root = eina_hash_pointer_new(NULL);
-
- if (pd->scenes_root == NULL)
- {
- ERR("Failed to create hash table.");
- return;
- }
- }
- else
- count = (int)(uintptr_t)eina_hash_find(pd->scenes_root, &scene);
-
- eina_hash_set(pd->scenes_root, &scene, (const void *)(uintptr_t)(count + 1));
-}
-
-void
-evas_canvas3d_node_scene_root_del(Evas_Canvas3D_Node *node, Evas_Canvas3D_Scene *scene)
-{
- int count = 0;
- Evas_Canvas3D_Node_Data *pd = efl_data_scope_get(node, MY_CLASS);
- if (pd->scenes_root == NULL)
- {
- ERR("No scene to delete.");
- return;
- }
-
- count = (int)(uintptr_t)eina_hash_find(pd->scenes_root, &scene);
-
- if (count == 1)
- eina_hash_del(pd->scenes_root, &scene, NULL);
- else
- eina_hash_set(pd->scenes_root, &scene, (const void *)(uintptr_t)(count - 1));
-}
-
-EOLIAN static Eina_Hash*
-_evas_canvas3d_node_scene_root_get(Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd)
-{
- return pd->scenes_root;
-}
-
-void
-evas_canvas3d_node_scene_camera_add(Evas_Canvas3D_Node *node, Evas_Canvas3D_Scene *scene)
-{
- int count = 0;
- Evas_Canvas3D_Node_Data *pd = efl_data_scope_get(node, MY_CLASS);
- if (pd->scenes_camera == NULL)
- {
- pd->scenes_camera = eina_hash_pointer_new(NULL);
-
- if (pd->scenes_camera == NULL)
- {
- ERR("Failed to create hash table.");
- return;
- }
- }
- else
- count = (int)(uintptr_t)eina_hash_find(pd->scenes_camera, &scene);
-
- eina_hash_set(pd->scenes_camera, &scene, (const void *)(uintptr_t)(count + 1));
-}
-
-void
-evas_canvas3d_node_scene_camera_del(Evas_Canvas3D_Node *node, Evas_Canvas3D_Scene *scene)
-{
- int count = 0;
- Evas_Canvas3D_Node_Data *pd = efl_data_scope_get(node, MY_CLASS);
- if (pd->scenes_camera == NULL)
- {
- ERR("No scene to delete.");
- return;
- }
-
- count = (int)(uintptr_t)eina_hash_find(pd->scenes_camera, &scene);
-
- if (count == 1)
- eina_hash_del(pd->scenes_camera, &scene, NULL);
- else
- eina_hash_set(pd->scenes_camera, &scene, (const void *)(uintptr_t)(count - 1));
-}
-
-void
-evas_canvas3d_node_traverse(Evas_Canvas3D_Node *from, Evas_Canvas3D_Node *to, Evas_Canvas3D_Node_Traverse_Type type,
- Eina_Bool skip, Evas_Canvas3D_Node_Func func, void *data)
-{
- Eina_List *nodes = NULL, *n;
- Evas_Canvas3D_Node *node = NULL;
-
- if (from == NULL || func == NULL)
- goto error;
-
- if (type == EVAS_CANVAS3D_NODE_TRAVERSE_DOWNWARD)
- {
- if (to == NULL)
- goto error;
-
- node = to;
-
- do {
- nodes = eina_list_prepend(nodes, (const void *)node);
-
- if (node == from)
- break;
- Evas_Canvas3D_Node_Data *pdnode = efl_data_scope_get(node, MY_CLASS);
- node = pdnode->parent;
-
- if (node == NULL)
- goto error;
- } while (1);
- }
- else if (type == EVAS_CANVAS3D_NODE_TRAVERSE_UPWARD)
- {
- node = from;
-
- do {
- nodes = eina_list_append(nodes, (const void *)node);
-
- if (node == to)
- break;
- Evas_Canvas3D_Node_Data *pdnode = efl_data_scope_get(node, MY_CLASS);
- node = pdnode->parent;
-
- if (node == NULL)
- {
- if (to == NULL)
- break;
-
- goto error;
- }
- } while (1);
- }
-
- EINA_LIST_FOREACH(nodes, n, node)
- {
- if (!func(node, data) && skip)
- break;
- }
-
- eina_list_free(nodes);
- return;
-
-error:
- ERR("Node traverse error.");
-
- if (nodes)
- eina_list_free(nodes);
-}
-
-void
-evas_canvas3d_node_tree_traverse(Evas_Canvas3D_Node *root, Evas_Canvas3D_Tree_Traverse_Type type,
- Eina_Bool skip, Evas_Canvas3D_Node_Func func, void *data)
-{
- Eina_List *nodes = NULL, *l;
- Evas_Canvas3D_Node *node = NULL, *n, *last;
-
- if (root == NULL || func == NULL)
- return;
-
- if (type == EVAS_CANVAS3D_TREE_TRAVERSE_LEVEL_ORDER)
- {
- /* Put the root node in the queue. */
- nodes = eina_list_append(nodes, root);
-
- while (eina_list_count(nodes) > 0)
- {
- /* Dequeue a node. */
- node = eina_list_data_get(nodes);
- Evas_Canvas3D_Node_Data *pdnode = efl_data_scope_get(node, MY_CLASS);
-
- nodes = eina_list_remove_list(nodes, nodes);
-
- /* Call node function on the node. */
- if (func(node, data) || !skip)
- {
- /* Enqueue member nodes. */
- EINA_LIST_FOREACH(pdnode->members, l, n)
- {
- nodes = eina_list_append(nodes, n);
- }
- }
- }
- }
- else if (type == EVAS_CANVAS3D_TREE_TRAVERSE_PRE_ORDER)
- {
- /* Put the root node in the stack. */
- nodes = eina_list_append(nodes, root);
-
- while (eina_list_count(nodes) > 0)
- {
- /* Pop a node from the stack. */
- node = eina_list_data_get(nodes);
- Evas_Canvas3D_Node_Data *pdnode = efl_data_scope_get(node, MY_CLASS);
- nodes = eina_list_remove_list(nodes, nodes);
-
- /* Call node function on the node. */
- if (func(node, data) || !skip)
- {
- /* Push member nodes into the stack. */
- EINA_LIST_REVERSE_FOREACH(pdnode->members, l, n)
- {
- nodes = eina_list_prepend(nodes, n);
- }
- }
- }
- }
- else if (type == EVAS_CANVAS3D_TREE_TRAVERSE_POST_ORDER)
- {
- if (skip)
- {
- ERR("Using skip with post order traversal has no effect.");
- return;
- }
-
- /* Put the root node in the stack. */
- nodes = eina_list_append(nodes, root);
- last = NULL;
-
- while (eina_list_count(nodes) > 0)
- {
- /* Peek a node from the stack. */
- node = eina_list_data_get(nodes);
- Evas_Canvas3D_Node_Data *pdnode = efl_data_scope_get(node, MY_CLASS);
- if (eina_list_count(pdnode->members) == 0)
- {
- /* The peeked node is a leaf node,
- * so visit it and pop from the stack. */
- func(node, data);
- nodes = eina_list_remove_list(nodes, nodes);
-
- /* Save the last visited node. */
- last = node;
- }
- else
- {
- /* If the peeked node is not a leaf node,
- * there can be only two possible cases.
- *
- * 1. the parent of the last visited node.
- * 2. a sibling of the last visited node.
- *
- * If the last visited node is a direct child of the peeked node,
- * we have no unvisted child nodes for the peeked node, so we have to visit
- * the peeked node and pop from the stack.
- *
- * Otherwise it should be a sibling of the peeked node, so we have to push
- * its childs into the stack. */
- Evas_Canvas3D_Node_Data *pdlast;
- if (last )
- pdlast= efl_data_scope_get(last, MY_CLASS);
- if (last && pdlast->parent == node)
- {
- /* Visit the node as it doesn't have any unvisited child node. */
- func(node, data);
- nodes = eina_list_remove_list(nodes, nodes);
-
- /* Save the last visited node. */
- last = node;
- }
- else
- {
- /* Push child nodes into the stack. */
- EINA_LIST_REVERSE_FOREACH(pdnode->members, l, n)
- {
- nodes = eina_list_prepend(nodes, n);
- }
- }
- }
- }
- }
-
- if (nodes != NULL)
- eina_list_free(nodes);
-}
-
-Eina_Bool
-_node_is_visible(Evas_Canvas3D_Node *node EINA_UNUSED, Evas_Canvas3D_Node *camera_node EINA_UNUSED)
-{
- /* TODO: */
- return EINA_TRUE;
-}
-
-Eina_Bool
-evas_canvas3d_node_mesh_collect(Evas_Canvas3D_Node *node, void *data)
-{
- Eina_List *list_meshes, *l;
- Evas_Canvas3D_Mesh *mesh = NULL;
- Evas_Canvas3D_Mesh_Data *mesh_pd;
- Evas_Canvas3D_Mesh_Frame *f;
- Evas_Canvas3D_Scene_Public_Data *scene_data = (Evas_Canvas3D_Scene_Public_Data *)data;
- Evas_Canvas3D_Node_Data *pd = efl_data_scope_get(node, MY_CLASS);
- unsigned short int *index;
- int stride, tex_stride, normal_stride;
-
- if (pd->type == EVAS_CANVAS3D_NODE_TYPE_MESH)
- {
- scene_data->mesh_nodes = eina_list_append(scene_data->mesh_nodes, node);
- /*In case LOD calculate distance to the camera node*/
- if (pd->lod)
- {
- Evas_Canvas3D_Node_Data *pd_camera = efl_data_scope_get(scene_data->camera_node, MY_CLASS);
- scene_data->lod_distance = eina_vector3_distance_get(&pd_camera->position, &pd->position_world);
- }
- /* calculation of tangent space for all meshes */
- list_meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get(node);
- EINA_LIST_FOREACH(list_meshes, l, mesh)
- {
- mesh_pd = efl_data_scope_get(mesh, MY_CLASS);
- f = evas_canvas3d_mesh_frame_find(mesh_pd, 0);
- if (!f)
- {
- ERR("Not existing mesh frame.");
- continue;
- }
-
- float *tangent_data = (float *)f->vertices[EVAS_CANVAS3D_VERTEX_ATTRIB_TANGENT].data;
- if (!tangent_data && ((mesh_pd->shader_mode == EVAS_CANVAS3D_SHADER_MODE_NORMAL_MAP) ||
- (mesh_pd->shader_mode == EVAS_CANVAS3D_SHADER_MODE_PARALLAX_OCCLUSION)))
- {
- index = (unsigned short int *)mesh_pd->indices;
- tangent_data = (float*) malloc((3 * mesh_pd->vertex_count) * sizeof(float));
-
- float *vertex_data = (float *)f->vertices[EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION].data;
- if (f->vertices[EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION].stride != 0)
- stride = f->vertices[EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION].stride / sizeof(float);
- else
- stride = 3;
-
- float *tex_data = (float *)f->vertices[EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD].data;
- if (f->vertices[EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD].stride != 0)
- tex_stride = f->vertices[EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD].stride / sizeof(float);
- else
- tex_stride = 2;
-
- float *normal_data = (float *)f->vertices[EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL].data;
- if (f->vertices[EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL].stride != 0)
- normal_stride = f->vertices[EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL].stride / sizeof(float);
- else
- normal_stride = 2;
-
- evas_tangent_space_get(vertex_data, tex_data, normal_data, index, mesh_pd->vertex_count,
- mesh_pd->index_count, stride, tex_stride, normal_stride, &tangent_data);
-
- evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TANGENT, 3 * sizeof(float), tangent_data);
- free(tangent_data);
- }
- }
- }
- if (!_node_is_visible(node, scene_data->camera_node))
- {
- /* Skip entire sub-tree of this node. */
- return EINA_FALSE;
- }
-
- return EINA_TRUE;
-}
-
-Eina_Bool
-evas_canvas3d_node_color_node_mesh_collect(Evas_Canvas3D_Node *node, void *data)
-{
- Evas_Canvas3D_Scene_Public_Data *scene_data = (Evas_Canvas3D_Scene_Public_Data *)data;
- Evas_Canvas3D_Node_Data *pd = efl_data_scope_get(node, MY_CLASS);
- Evas_Canvas3D_Node_Data *pd_camera = efl_data_scope_get(scene_data->camera_node, MY_CLASS);
- Evas_Canvas3D_Camera *camera = (Evas_Canvas3D_Camera*)pd_camera->data.camera.camera;
-
- Eina_List *list_meshes, *l;
- Evas_Canvas3D_Mesh *mesh;
- Eina_Stringshare *key, *datakey;
- Evas_Color *color;
- Eina_Bool visible = EINA_FALSE;
- Eina_Array *arr;
- if (pd->type == EVAS_CANVAS3D_NODE_TYPE_MESH)
- {
- visible = evas_canvas3d_camera_node_visible_get(camera, scene_data->camera_node, node, EVAS_CANVAS3D_FRUSTUM_MODE_BSPHERE);
- if (visible)
- {
- list_meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get(node);
- EINA_LIST_FOREACH(list_meshes, l, mesh)
- {
- if (evas_canvas3d_mesh_color_pick_enable_get(mesh))
- {
- color = calloc(1, sizeof(Evas_Color));
-
- if (!eina_hash_population(scene_data->node_mesh_colors))
- key = _generate_unic_color_key(color, &scene_data->bg_color,
- node, mesh, EINA_TRUE);
- else
- key = _generate_unic_color_key(color, &scene_data->bg_color,
- node, mesh, EINA_FALSE);
-
- datakey = eina_stringshare_printf("%f %f %f", color->r, color->g, color->b);
- eina_hash_add(scene_data->node_mesh_colors, key, color);
- arr = eina_array_new(2);
- eina_array_push(arr, (void *)node);
- eina_array_push(arr, (void *)mesh);
- eina_hash_add(scene_data->colors_node_mesh, datakey, arr);
- }
- }
- }
- else
- return EINA_FALSE;
- }
- return EINA_TRUE;
-}
-
-Eina_Bool
-evas_canvas3d_node_light_collect(Evas_Canvas3D_Node *node, void *data)
-{
- Evas_Canvas3D_Scene_Public_Data *scene_data = (Evas_Canvas3D_Scene_Public_Data *)data;
- Evas_Canvas3D_Node_Data *pd = efl_data_scope_get(node, MY_CLASS);
- if (pd->type == EVAS_CANVAS3D_NODE_TYPE_LIGHT)
- scene_data->light_nodes = eina_list_append(scene_data->light_nodes, node);
-
- return EINA_TRUE;
-}
-
-EAPI Evas_Canvas3D_Node *
-evas_canvas3d_node_add(Evas *e, Evas_Canvas3D_Node_Type type)
-{
- MAGIC_CHECK(e, Evas, MAGIC_EVAS);
- return NULL;
- MAGIC_CHECK_END();
- return efl_add(MY_CLASS, e, evas_canvas3d_node_type_set(efl_added, type));
-}
-
-EOLIAN static Efl_Object *
-_evas_canvas3d_node_efl_object_finalize(Eo *obj, Evas_Canvas3D_Node_Data *pd)
-{
- if (pd->type == EVAS_CANVAS3D_NODE_TYPE_MESH)
- {
- pd->data.mesh.node_meshes = eina_hash_pointer_new(_node_mesh_free_func);
- if (pd->data.mesh.node_meshes == NULL)
- {
- ERR("Failed to create node mesh table.");
- _node_free(obj);
- return NULL;
- }
- }
- return obj;
-}
-
-EOLIAN static Efl_Object *
-_evas_canvas3d_node_efl_object_constructor(Eo *obj, Evas_Canvas3D_Node_Data *pd)
-{
- efl_constructor(efl_super(obj, MY_CLASS));
- evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_NODE);
-
- eina_vector3_set(&pd->position, 0.0, 0.0, 0.0);
- eina_quaternion_set(&pd->orientation, 0.0, 0.0, 0.0, 1.0);
- eina_vector3_set(&pd->scale, 1.0, 1.0, 1.0);
-
- eina_vector3_set(&pd->position_world, 0.0, 0.0, 0.0);
- eina_quaternion_set(&pd->orientation_world, 0.0, 0.0, 0.0, 1.0);
- eina_vector3_set(&pd->scale_world, 1.0, 1.0, 1.0);
-
- pd->position_inherit = EINA_TRUE;
- pd->orientation_inherit = EINA_TRUE;
- pd->scale_inherit = EINA_TRUE;
- pd->data.mesh.node_meshes = 0;
- pd->billboard_target = NULL;
- pd->lod = EINA_FALSE;
-
- evas_box3_set(&pd->aabb, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
- return obj;
-}
-
-EOLIAN static void
-_evas_canvas3d_node_efl_object_destructor(Eo *obj, Evas_Canvas3D_Node_Data *pd EINA_UNUSED)
-{
- _node_free(obj);
-
- efl_destructor(efl_super(obj, MY_CLASS));
-}
-
-EOLIAN static Evas_Canvas3D_Node_Type
-_evas_canvas3d_node_node_type_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd)
-{
- return pd->type;
-}
-
-EOLIAN static void
-_evas_canvas3d_node_node_type_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd, Evas_Canvas3D_Node_Type type)
-{
- pd->type = type;
-}
-
-EOLIAN static void
-_evas_canvas3d_node_member_add(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Canvas3D_Node *member)
-{
- if (obj == member)
- {
- ERR("Failed to add a member node (adding to itself).");
- return;
- }
- Evas_Canvas3D_Node_Data *pdmember = efl_data_scope_get(member, MY_CLASS);
- if (!pdmember || pdmember->parent == obj)
- return;
-
- if (pdmember->parent)
- {
- /* Detaching from previous parent. */
- Evas_Canvas3D_Node_Data *pdmemberparent = efl_data_scope_get(pdmember->parent, MY_CLASS);
- pdmemberparent->members = eina_list_remove(pdmemberparent->members, member);
-
- /* Mark changed. */
- evas_canvas3d_object_change(pdmember->parent, EVAS_CANVAS3D_STATE_NODE_MEMBER, NULL);
- }
- else
- {
- /* Should get a new reference. */
- efl_ref(member);
- }
-
- /* Add the member node. */
- pd->members = eina_list_append(pd->members, (const void *)member);
- pdmember->parent = obj;
-
- /* Mark changed. */
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_MEMBER, NULL);
- evas_canvas3d_object_change(member, EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION, NULL);
- evas_canvas3d_object_change(member, EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION, NULL);
- evas_canvas3d_object_change(member, EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_node_member_del(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Canvas3D_Node *member)
-{
- Evas_Canvas3D_Node_Data *pdmember = efl_data_scope_get(member, MY_CLASS);
- if (!pdmember || pdmember->parent != obj)
- {
- ERR("Failed to delete a member node (not a member of the given node)");
- return;
- }
-
- /* Delete the member node. */
- pd->members = eina_list_remove(pd->members, member);
- pdmember->parent = NULL;
-
- /* Mark modified object as changed. */
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_MEMBER, NULL);
- evas_canvas3d_object_change(member, EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION, NULL);
- evas_canvas3d_object_change(member, EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION, NULL);
- evas_canvas3d_object_change(member, EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE, NULL);
-
- /* Decrease reference count. */
- efl_unref(member);
-}
-
-EOLIAN static Evas_Canvas3D_Node *
-_evas_canvas3d_node_parent_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd)
-{
- return pd->parent;
-}
-
-EOLIAN static const Eina_List *
-_evas_canvas3d_node_member_list_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd)
-{
- return pd->members;
-}
-
-EOLIAN static void
-_evas_canvas3d_node_position_set(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Real x, Evas_Real y, Evas_Real z)
-{
- pd->position.x = x;
- pd->position.y = y;
- pd->position.z = z;
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_POSITION, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_node_orientation_set(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Real x, Evas_Real y, Evas_Real z, Evas_Real w)
-{
- pd->orientation.x = x;
- pd->orientation.y = y;
- pd->orientation.z = z;
- pd->orientation.w = w;
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_ORIENTATION, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_node_orientation_angle_axis_set(Eo *obj, Evas_Canvas3D_Node_Data *pd,
- Evas_Real angle, Evas_Real x, Evas_Real y, Evas_Real z)
-{
- Evas_Real half_angle = 0.5 * DEGREE_TO_RADIAN(angle);
- Evas_Real s = sin(half_angle);
- Eina_Vector3 axis;
-
- eina_vector3_set(&axis, x, y, z);
- eina_vector3_normalize(&axis, &axis);
-
- pd->orientation.w = cos(half_angle);
- pd->orientation.x = s * axis.x;
- pd->orientation.y = s * axis.y;
- pd->orientation.z = s * axis.z;
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_ORIENTATION, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_node_scale_set(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Real x, Evas_Real y, Evas_Real z)
-{
- pd->scale.x = x;
- pd->scale.y = y;
- pd->scale.z = z;
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_SCALE, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_node_position_get(const Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Canvas3D_Space space,
- Evas_Real *x, Evas_Real *y, Evas_Real *z)
-{
- if (space == EVAS_CANVAS3D_SPACE_LOCAL)
- {
- if (x) *x = 0.0;
- if (y) *y = 0.0;
- if (z) *z = 0.0;
- }
- else if (space == EVAS_CANVAS3D_SPACE_PARENT)
- {
- if (x) *x = pd->position.x;
- if (y) *y = pd->position.y;
- if (z) *z = pd->position.z;
- }
- else if (space == EVAS_CANVAS3D_SPACE_WORLD)
- {
- evas_canvas3d_object_update((Eo *) obj);
-
- if (x) *x = pd->position_world.x;
- if (y) *y = pd->position_world.y;
- if (z) *z = pd->position_world.z;
- }
-}
-
-EOLIAN static void
-_evas_canvas3d_node_orientation_get(const Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Canvas3D_Space space,
- Evas_Real *x, Evas_Real *y, Evas_Real *z, Evas_Real *w)
-{
- if (space == EVAS_CANVAS3D_SPACE_LOCAL)
- {
- if (x) *x = 0.0;
- if (y) *y = 0.0;
- if (z) *z = 0.0;
- if (w) *w = 0.0;
- }
- else if (space == EVAS_CANVAS3D_SPACE_PARENT)
- {
- if (x) *x = pd->orientation.x;
- if (y) *y = pd->orientation.y;
- if (z) *z = pd->orientation.z;
- if (w) *w = pd->orientation.w;
- }
- else if (space == EVAS_CANVAS3D_SPACE_WORLD)
- {
- evas_canvas3d_object_update((Eo *) obj);
-
- if (x) *x = pd->orientation_world.x;
- if (y) *y = pd->orientation_world.y;
- if (z) *z = pd->orientation_world.z;
- if (w) *w = pd->orientation_world.w;
- }
-
-}
-
-EOLIAN static void
-_evas_canvas3d_node_scale_get(const Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Canvas3D_Space space,
- Evas_Real *x, Evas_Real *y, Evas_Real *z)
-{
- if (space == EVAS_CANVAS3D_SPACE_LOCAL)
- {
- if (x) *x = 0.0;
- if (y) *y = 0.0;
- if (z) *z = 0.0;
- }
- else if (space == EVAS_CANVAS3D_SPACE_PARENT)
- {
- if (x) *x = pd->scale.x;
- if (y) *y = pd->scale.y;
- if (z) *z = pd->scale.z;
- }
- else if (space == EVAS_CANVAS3D_SPACE_WORLD)
- {
- evas_canvas3d_object_update((Eo *) obj);
-
- if (x) *x = pd->scale_world.x;
- if (y) *y = pd->scale_world.y;
- if (z) *z = pd->scale_world.z;
- }
-}
-
-EOLIAN static void
-_evas_canvas3d_node_position_inherit_set(Eo *obj, Evas_Canvas3D_Node_Data *pd, Eina_Bool inherit)
-{
- pd->position_inherit = inherit;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_POSITION, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_node_orientation_inherit_set(Eo *obj, Evas_Canvas3D_Node_Data *pd, Eina_Bool inherit)
-{
- pd->orientation_inherit = inherit;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_ORIENTATION, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_node_scale_inherit_set(Eo *obj, Evas_Canvas3D_Node_Data *pd, Eina_Bool inherit)
-{
- pd->scale_inherit = inherit;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_SCALE, NULL);
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_node_position_inherit_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd)
-{
- return pd->position_inherit;
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_node_orientation_inherit_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd)
-{
- return pd->orientation_inherit;
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_node_scale_inherit_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd)
-{
- return pd->scale_inherit;
-}
-
-static void
-_look_at_set(Evas_Canvas3D_Node_Data *pd, Eina_Vector3 *target, Eina_Vector3 *up)
-{
- Eina_Vector3 x, y, z;
-
- eina_vector3_subtract(&z, &pd->position, target);
- eina_vector3_normalize(&z, &z);
-
- eina_vector3_cross_product(&x, up, &z);
- eina_vector3_normalize(&x, &x);
-
- eina_vector3_cross_product(&y, &z, &x);
- eina_vector3_normalize(&y, &y);
-
- /* Below matrix to quaternion conversion code taken from
- * http://fabiensanglard.net/doom3_documentation/37726-293748.pdf
- * When any license issue occurs, use ken shoemake's algorithm instead.
- */
-
- if (x.x + y.y + z.z > 0.0)
- {
- Evas_Real t = x.x + y.y + z.z + 1.0;
- Evas_Real s = evas_reciprocal_sqrt(t) * 0.5;
-
- pd->orientation.w = s * t;
- pd->orientation.z = (x.y - y.x) * s;
- pd->orientation.y = (z.x - x.z) * s;
- pd->orientation.x = (y.z - z.y) * s;
- }
- else if (x.x > y.y && x.x > z.z)
- {
- Evas_Real t = x.x - y.y - z.z + 1.0;
- Evas_Real s = evas_reciprocal_sqrt(t) * 0.5;
-
- pd->orientation.x = s * t;
- pd->orientation.y = (x.y + y.x) * s;
- pd->orientation.z = (z.x + x.z) * s;
- pd->orientation.w = (y.z - z.y) * s;
- }
- else if (y.y > z.z)
- {
- Evas_Real t = -x.x + y.y - z.z + 1.0;
- Evas_Real s = evas_reciprocal_sqrt(t) * 0.5;
-
- pd->orientation.y = s * t;
- pd->orientation.x = (x.y + y.x) * s;
- pd->orientation.w = (z.x - x.z) * s;
- pd->orientation.z = (y.z + z.y) * s;
- }
- else
- {
- Evas_Real t = -x.x - y.y + z.z + 1.0;
- Evas_Real s = evas_reciprocal_sqrt(t) * 0.5;
-
- pd->orientation.z = s * t;
- pd->orientation.w = (x.y - y.x) * s;
- pd->orientation.x = (z.x + x.z) * s;
- pd->orientation.y = (y.z + z.y) * s;
- }
-}
-
-EOLIAN static void
-_evas_canvas3d_node_look_at_set(Eo *obj, Evas_Canvas3D_Node_Data *pd,
- Evas_Canvas3D_Space target_space, Evas_Real tx, Evas_Real ty, Evas_Real tz,
- Evas_Canvas3D_Space up_space, Evas_Real ux, Evas_Real uy, Evas_Real uz)
-{
- Eina_Vector3 target;
- Eina_Vector3 up;
-
- /* Target position in parent space. */
- if (target_space == EVAS_CANVAS3D_SPACE_LOCAL)
- {
- ERR("TODO:");
- return;
- }
- else if (target_space == EVAS_CANVAS3D_SPACE_PARENT)
- {
- eina_vector3_set(&target, tx, ty, tz);
- }
- else if (target_space == EVAS_CANVAS3D_SPACE_WORLD)
- {
- ERR("TODO:");
- return;
-
- }
- else
- {
- ERR("Invalid coordinate space.");
- return;
- }
-
- if (up_space == EVAS_CANVAS3D_SPACE_LOCAL)
- {
- eina_vector3_set(&up, ux, uy, uz);
- //ERR("TODO:");
- //return;
- }
- else if (up_space == EVAS_CANVAS3D_SPACE_PARENT)
- {
- eina_vector3_set(&up, ux, uy, uz);
- }
- else if (up_space == EVAS_CANVAS3D_SPACE_WORLD)
- {
- ERR("TODO:");
- return;
- }
- else
- {
- ERR("Invalid coordinate space.");
- return;
- }
-
- _look_at_set(pd, &target, &up);
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_ORIENTATION, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_node_camera_set(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Canvas3D_Camera *camera)
-{
- if (pd->type != EVAS_CANVAS3D_NODE_TYPE_CAMERA)
- {
- ERR("Node type mismatch.");
- return;
- }
-
- if (pd->data.camera.camera == camera)
- return;
-
- if (pd->data.camera.camera)
- {
- /* Detach previous camera object. */
- evas_canvas3d_camera_node_del(pd->data.camera.camera, obj);
- efl_unref(pd->data.camera.camera);
- }
-
- pd->data.camera.camera = camera;
- efl_ref(camera);
-
- /* Register change notification on the camera for this node. */
- evas_canvas3d_camera_node_add(camera, obj);
-
- /* Mark changed. */
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_CAMERA, NULL);
-}
-
-EOLIAN static Evas_Canvas3D_Camera *
-_evas_canvas3d_node_camera_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd)
-{
- return pd->data.camera.camera;
-}
-
-EOLIAN static void
-_evas_canvas3d_node_light_set(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Canvas3D_Light *light)
-{
- if (pd->type != EVAS_CANVAS3D_NODE_TYPE_LIGHT)
- {
- ERR("Node type mismatch.");
- return;
- }
-
- if (pd->data.light.light == light)
- return;
-
- if (pd->data.light.light)
- {
- /* Detach previous light object. */
- evas_canvas3d_light_node_del(pd->data.light.light, obj);
- efl_unref(pd->data.light.light);
- }
-
- pd->data.light.light = light;
- efl_ref(light);
-
- /* Register change notification on the light for this node. */
- evas_canvas3d_light_node_add(light, obj);
-
- /* Mark changed. */
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_LIGHT, NULL);
-}
-
-EOLIAN static Evas_Canvas3D_Light *
-_evas_canvas3d_node_light_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd)
-{
- return pd->data.light.light;
-}
-
-EOLIAN static void
-_evas_canvas3d_node_mesh_add(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Canvas3D_Mesh *mesh)
-{
- Evas_Canvas3D_Node_Mesh *nm = NULL;
-
- if (pd->type != EVAS_CANVAS3D_NODE_TYPE_MESH)
- {
- ERR("Node type mismatch.");
- return;
- }
-
- if (eina_hash_find(pd->data.mesh.node_meshes, &mesh) != NULL)
- {
- ERR("The mesh is already added to the node.");
- return;
- }
-
- if ((nm = _node_mesh_new(obj, mesh)) == NULL)
- {
- ERR("Failed to create node mesh.");
- return;
- }
-
- /* TODO: Find node mesh and add if it does not exist. */
- if (!eina_hash_add(pd->data.mesh.node_meshes, &mesh, nm))
- {
- ERR("Failed to add a mesh to mesh table.");
- _node_mesh_free(nm);
- return;
- }
-
- pd->data.mesh.meshes = eina_list_append(pd->data.mesh.meshes, mesh);
- efl_ref(mesh);
-
- /* Register change notification. */
- evas_canvas3d_mesh_node_add(mesh, obj);
-
- /* Mark changed. */
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_MESH_GEOMETRY, NULL);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_MESH_MATERIAL, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_node_mesh_del(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Canvas3D_Mesh *mesh)
-{
- if (pd->type != EVAS_CANVAS3D_NODE_TYPE_MESH)
- {
- ERR("Node type mismatch.");
- return;
- }
-
- if (!eina_hash_del(pd->data.mesh.node_meshes, &mesh, NULL))
- {
- ERR("The given mesh doesn't belong to this node.");
- return;
- }
-
- pd->data.mesh.meshes = eina_list_remove(pd->data.mesh.meshes, mesh);
- evas_canvas3d_mesh_node_del(mesh, obj);
- efl_unref(mesh);
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_MESH_GEOMETRY, NULL);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_MESH_MATERIAL, NULL);
-}
-
-EOLIAN static const Eina_List *
-_evas_canvas3d_node_mesh_list_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd)
-{
- return pd->data.mesh.meshes;
-}
-
-EOLIAN static void
-_evas_canvas3d_node_mesh_frame_set(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Canvas3D_Mesh *mesh, int frame)
-{
- Evas_Canvas3D_Node_Mesh *nm = NULL;
-
- if (pd->type != EVAS_CANVAS3D_NODE_TYPE_MESH)
- {
- ERR("Node type mismatch.");
- return;
- }
-
- if ((nm = eina_hash_find(pd->data.mesh.node_meshes, &mesh)) == NULL)
- {
- ERR("The given mesh doesn't belongs to this node.");
- return;
- }
-
- nm->frame = frame;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_MESH_FRAME, NULL);
-}
-
-EOLIAN static int
-_evas_canvas3d_node_mesh_frame_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd, Evas_Canvas3D_Mesh *mesh)
-{
- Evas_Canvas3D_Node_Mesh *nm = NULL;
-
- if (pd->type != EVAS_CANVAS3D_NODE_TYPE_MESH)
- {
- ERR("Node type mismatch.");
- return 0;
- }
-
- if ((nm = eina_hash_find(pd->data.mesh.node_meshes, &mesh)) == NULL)
- {
- ERR("The given mesh doesn't belongs to this node.");
- return 0;
- }
-
- return nm->frame;
-}
-
-EOLIAN static void
-_evas_canvas3d_node_bounding_box_get(Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd, Evas_Real *x, Evas_Real *y, Evas_Real *z, Evas_Real *x2, Evas_Real *y2, Evas_Real *z2)
-{
- evas_canvas3d_object_update(obj);
- evas_canvas3d_node_tree_traverse(obj, EVAS_CANVAS3D_TREE_TRAVERSE_LEVEL_ORDER, EINA_FALSE,
- node_aabb_update, NULL);
-
- if (x) *x = pd->aabb.p0.x;
- if (y) *y = pd->aabb.p0.y;
- if (z) *z = pd->aabb.p0.z;
- if (x2) *x2 = pd->aabb.p1.x;
- if (y2) *y2 = pd->aabb.p1.y;
- if (z2) *z2 = pd->aabb.p1.z;
-}
-
-EOLIAN static void
-_evas_canvas3d_node_bounding_sphere_get(Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd, Evas_Real *x, Evas_Real *y, Evas_Real *z, Evas_Real *r)
-{
- evas_canvas3d_object_update(obj);
- evas_canvas3d_node_tree_traverse(obj, EVAS_CANVAS3D_TREE_TRAVERSE_LEVEL_ORDER, EINA_FALSE,
- node_aabb_update, NULL);
-
- if (x) *x = pd->bsphere.center.x;
- if (y) *y = pd->bsphere.center.y;
- if (z) *z = pd->bsphere.center.z;
- if (r) *r = pd->bsphere.radius;
-}
-
-EOLIAN static void
-_evas_canvas3d_node_billboard_target_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd,
- Eo *target)
-{
- if (pd->billboard_target != target)
- {
- pd->billboard_target = target;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_PARENT_BILLBOARD, NULL);
- }
-}
-
-EOLIAN static Evas_Canvas3D_Node *
-_evas_canvas3d_node_billboard_target_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd)
-{
- return pd->billboard_target;
-}
-
-EOLIAN static void
-_evas_canvas3d_node_lod_enable_set(Eo *obj, Evas_Canvas3D_Node_Data *pd,
- Eina_Bool enable)
-{
- pd->lod = enable;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_LOD, NULL);
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_node_lod_enable_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Node_Data *pd)
-{
- return pd->lod;
-}
-#include "canvas/evas_canvas3d_node.eo.c"
diff --git a/src/lib/evas/canvas/evas_canvas3d_node.eo b/src/lib/evas/canvas/evas_canvas3d_node.eo
deleted file mode 100644
index 900bbd6b53..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_node.eo
+++ /dev/null
@@ -1,368 +0,0 @@
-import evas_canvas3d_types;
-
-class @beta Evas.Canvas3D.Node extends Evas.Canvas3D.Object
-{
- [[Evas 3D canvas node class]]
- data: Evas_Canvas3D_Node_Data;
- methods {
- @property node_type {
- [[Get the type of the given node.
-
- See also @Evas.Canvas3D.Node.member_add.]]
- set {
- [[Type can only be set before finalize.]]
- }
- get {
- [[If the object is not node object, returns $unknown.]]
- }
- values {
- type: Evas.Canvas3D.Node_Type(Evas.Canvas3D.Node_Type.unknown); [[Node type]]
- }
- }
- member_add {
- [[Add a member node to the given node.
-
- Nodes can be constructed into N-ary tree structure like other ordinary scene
- graphs. A node inherit transforms from its parent.
-
- See also @Evas.Canvas3D.Node.parent_get.]]
-
- params {
- @in member: Evas.Canvas3D.Node; [[Node object to be added.]]
- }
- }
- member_del {
- [[Delete a member node from the given node.
-
- See also @Evas.Canvas3D.Node.member_add.]]
- params {
- @in member: Evas.Canvas3D.Node; [[Member node to be deleted from the given node.]]
- }
- }
-
- parent_get @const {
- [[Get the parent node of the given node.
-
- See also @Evas.Canvas3D.Node.member_add.]]
- return: Evas.Canvas3D.Node; [[The parent node of the given node.]]
- }
-
- member_list_get @const {
- [[Get the list of member nodes of the given node.
-
- See also @Evas.Canvas3D.Node.member_add.]]
- return: const(list<Evas.Canvas3D.Node>); [[The list of member nodes if any or $null if there are none.]]
- }
- scene_root_get {
- [[Get hash table of scenes using this node as root.]]
- /* FIXME: void_ptr is actually uintptr and that is also wrong */
- return: hash<Evas.Canvas3D.Object, void_ptr>; [[ scenes using this node as root. FIXME: Actually a scene, not object.]]
- }
- position_set {
- [[Set the position of the given node.
-
- According to the inheritance flag, (x, y, z) can be a world space position or
- parent space position.
-
- Default position is (0.0, 0.0, 0.0).
-
- See also @Evas.Canvas3D.Node.position_inherit.set.]]
- params {
- @in x: Evas.Real; [[X coordinate of the position.]]
- @in y: Evas.Real; [[Y coordinate of the position.]]
- @in z: Evas.Real; [[Z coordinate of the position.]]
- }
- }
- orientation_set {
- [[Set the orientation of the given node using quaternion.
-
- According the the inheritance flag, (w, x, y, z) can be a world space
- orientation or parent space orientation.
-
- Default orientation is (1.0, 0.0, 0.0, 0.0) (identity quaternion).
-
- See also @Evas.Canvas3D.Node.orientation_inherit.set.]]
- params {
- @in x: Evas.Real; [[X term of the orientation quaternion (w, x, y, z.]]
- @in y: Evas.Real; [[Y term of the orientation quaternion (w, x, y, z.]]
- @in z: Evas.Real; [[Z term of the orientation quaternion (w, x, y, z.]]
- @in w: Evas.Real; [[W term of the orientation quaternion (w, x, y, z.]]
- }
- }
-
- orientation_angle_axis_set {
- [[Set the orientation of the given node using axis-angle.
-
- See also @Evas.Canvas3D.Node.orientation_set.]]
- params {
- @in angle: Evas.Real; [[Rotation angle.]]
- @in x: Evas.Real; [[X term of the rotation axis.]]
- @in y: Evas.Real; [[Y term of the rotation axis.]]
- @in z: Evas.Real; [[Z term of the rotation axis.]]
- }
- }
-
- scale_set {
- [[Set the scale of the given node.
-
- According to the inheritance flag, (x, y, z) can be a world space scale or
- parent space scale. Be careful when using non-uniform scale factor with
- inheritance, each transform attributes are not affected by other attributes.
-
- Default scale is (1.0, 1.0, 1.0).
-
- See also @Evas.Canvas3D.Node.scale_inherit.set.]]
- params {
- @in x: Evas.Real; [[Scale factor along X-axis.]]
- @in y: Evas.Real; [[Scale factor along Y-axis.]]
- @in z: Evas.Real; [[Scale factor along Z-axis.]]
- }
- }
-
- position_get @const {
- [[Get the position of the given node.
-
- See also @Evas.Canvas3D.Node.position_set.]]
- params {
- @in space: Evas.Canvas3D.Space; [[The given node.]]
- @out x: Evas.Real; [[Pointer to receive X coordinate of the position.]]
- @out y: Evas.Real; [[Pointer to receive Y coordinate of the position.]]
- @out z: Evas.Real; [[Pointer to receive Z coordinate of the position.]]
- }
- }
-
- orientation_get @const {
- [[Get the orientation of the given node as quaternion.
-
- See also @Evas.Canvas3D.Node.orientation_set.]]
- params {
- @in space: Evas.Canvas3D.Space; [[The given node.]]
- @out x: Evas.Real; [[Pointer to receive X term of the orientation quaternion.]]
- @out y: Evas.Real; [[Pointer to receive Y term of the orientation quaternion.]]
- @out z: Evas.Real; [[Pointer to receive Z term of the orientation quaternion.]]
- @out w: Evas.Real; [[Pointer to receive W term of the orientation quaternion.]]
- }
- }
-
- scale_get @const {
- [[Get the scale of the given node.
-
- See also @Evas.Canvas3D.Node.scale_get.]]
- params {
- @in space: Evas.Canvas3D.Space; [[The given node.]]
- @out x: Evas.Real; [[Pointer to receive Scale factor along X-axis.]]
- @out y: Evas.Real; [[Pointer to receive Scale factor along X-axis.]]
- @out z: Evas.Real; [[Pointer to receive Scale factor along X-axis.]]
- }
- }
-
- look_at_set {
- [[Rotate the given node to look at desired position.
-
- This function rotate the given node so that its forward vector (negative
- Z-axis) points to the desired position and the up vector coincide with the
- given up vector.
-
- See also @Evas.Canvas3D.Node.orientation_set.]]
- params {
- @in target_space: Evas.Canvas3D.Space; [[Space where the target position belongs to.]]
- @in x: Evas.Real; [[X coordinate of the target position.]]
- @in y: Evas.Real; [[Y coordinate of the target position.]]
- @in z: Evas.Real; [[Z coordinate of the target position.]]
- @in up_space: Evas.Canvas3D.Space; [[Space where the up vector belongs to.]]
- @in ux: Evas.Real; [[X term of the up vector.]]
- @in uy: Evas.Real; [[Y term of the up vector.]]
- @in uz: Evas.Real; [[Z term of the up vector.]]
- }
- }
-
- mesh_add {
- [[Add a mesh to the given node.
-
- If the node is not of type EVAS_CANVAS3D_NODE_TYPE_MESH, error message will be
- generated and nothing happens.
-
- See also @Evas.Canvas3D.Node.member_add.]]
- params {
- @in mesh: Evas.Canvas3D.Mesh; [[The mesh to be added.]]
- }
- }
-
- mesh_del {
- [[Delete a mesh from the given node.
-
- If the node is not of type EVAS_CANVAS3D_NODE_TYPE_MESH or the given mesh does not
- belong to the given node, error message will be gnerated and nothing happens.
-
- See also @Evas.Canvas3D.Node.mesh_add.]]
- params {
- @in mesh: Evas.Canvas3D.Mesh; [[The mesh to be deleted.]]
- }
- }
-
- mesh_list_get @const {
- [[Get the list of meshes of the given node.
-
- If the node is not of type EVAS_CANVAS3D_NODE_TYPE_MESH, error message will be
- generated and $null will be returned. If there're no meshes in the given
- node, $null will be returned.
-
- See also @Evas.Canvas3D.Node.mesh_add.]]
- return: const(list<Evas.Canvas3D.Mesh>); [[The list of meshes if any, or $null if there're none.]]
- }
-
- bounding_box_get{
- [[Get axis-aligned bounding box (AABB) of the given node.]]
- params {
- @in x: ptr(Evas.Real); [[Pointer to receive X coordinate of the first point of AABB.]]
- @in y: ptr(Evas.Real); [[Pointer to receive Y coordinate of the first point of AABB.]]
- @in z: ptr(Evas.Real); [[Pointer to receive Z coordinate of the first point of AABB.]]
- @in x2: ptr(Evas.Real); [[Pointer to receive X coordinate of the second point of AABB.]]
- @in y2: ptr(Evas.Real); [[Pointer to receive Y coordinate of the second point of AABB.]]
- @in z2: ptr(Evas.Real); [[Pointer to receive Z coordinate of the second point of AABB.]]
- }
- }
-
- bounding_sphere_get {
- [[Get bounding sphere of the given node.]]
- params {
-
- @in x: ptr(Evas.Real); [[Pointer to receive X coordinate of the center of sphere.]]
- @in y: ptr(Evas.Real); [[Pointer to receive Y coordinate of the center of sphere.]]
- @in z: ptr(Evas.Real); [[Pointer to receive Z coordinate of center of sphere.]]
- @in r: ptr(Evas.Real); [[Pointer to receive radius of center of sphere.]]
- }
- }
-
- @property position_inherit {
- [[The position inheritance flag of the given node.
-
- When inheritance is enabled, a node's world space position is determined by
- adding the parent node's world position and the node's position. Otherwise
- the node's position will be the world space position.]]
- set {
- }
- get {
- }
- values {
- inherit: bool; [[Whether to inherit parent position.]]
- }
- }
-
- @property orientation_inherit {
- [[The orientation inheritance flag of the given node.
-
- When inheritance is enabled, a node's world space orientation is determined
- by multiplying the parent node's world orientation and the node's
- orientation. Otherwise the node's orientation will be the world space
- orientation.]]
- set {
- }
- get {
- }
- values {
- inherit: bool; [[Whether to inherit parent orientation.]]
- }
- }
-
- @property scale_inherit {
- [[The scale inheritance flag of the given node.
-
- When inheritance is enabled, a node's world space scale is determined by
- multiplying the parent node's world scale and the node's scale. Otherwise
- the node's scale will be the world space scale.]]
- set {
- }
- get {
- }
- values {
- inherit: bool; [[Whether to inherit parent scale.]]
- }
- }
-
- @property camera {
- [[A camera attached to the given node.
-
- If the node is not of type EVAS_CANVAS3D_NODE_TYPE_CAMERA, error message will be
- generated and nothing happens.
-
- See also @Evas.Canvas3D.Node.member_add.]]
- set {
- }
- get {
- }
- values {
- // FIXME: Evas_Canvas3D_Camera is necessary, but that introduces a cycle
- camera: Evas.Canvas3D.Object; [[The camera of the given node if any, or $null if there're none.]]
- }
- }
-
- @property light {
- [[A light attached to the given node.
-
- If the node is not of type EVAS_CANVAS3D_NODE_TYPE_LIGHT, error message will be
- generated and nothing happens.
-
- See also @Evas.Canvas3D.Node.member_add.]]
- set {
- }
- get {
- }
- values {
- light: Evas.Canvas3D.Light; [[The light of the given node if any, or $null if there're none.]]
- }
- }
-
- @property mesh_frame {
- [[The animation frame number of the given node for the given mesh.
-
- If the node is not of type EVAS_CANVAS3D_NODE_TYPE_MESH or the given mesh does not
- belong to the given mesh error mesh will be generated and nothing happens.
-
- Default mesh frame is 0.
-
- See also @Evas.Canvas3D.Node.mesh_add.]]
- set {
- }
- get {
- }
- keys {
- mesh: Evas.Canvas3D.Mesh; [[The given mesh.]]
- }
- values {
- frame: int; [[The animation frame number.]]
- }
- }
-
- @property billboard_target {
- [[Set behavior of node like billboard object.]]
- set {
- }
- get {
- }
- values {
- target: Evas.Canvas3D.Node; [[The pointer to target node for billboard object,
- or $null if there're none.]]
- }
- }
- @property lod_enable {
- [[Enable behavior of node like LOD object.]]
- set {
- }
- get {
- }
- values {
- enable: bool; [[status property (true/false)]]
- }
- }
- }
- implements {
- Efl.Object.constructor;
- Efl.Object.destructor;
- Efl.Object.finalize;
- Evas.Canvas3D.Object.update_notify;
- Evas.Canvas3D.Object.change_notify;
- Evas.Canvas3D.Object.callback_register;
- Evas.Canvas3D.Object.callback_unregister;
- }
-}
diff --git a/src/lib/evas/canvas/evas_canvas3d_node_callback.h b/src/lib/evas/canvas/evas_canvas3d_node_callback.h
deleted file mode 100644
index d310ade12a..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_node_callback.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*Type of events and callbacks for object Evas_Canvas3D_Node*/
-
-#define GET_CALLBACK_TYPE(check, type) \
- if (!(strcmp(type, "clicked"))) \
- check = PRIVATE_CALLBACK_CLICKED; \
- else if (!(strcmp(type, "collision"))) \
- check = PRIVATE_CALLBACK_COLLISION; \
- else \
- check = PRIVATE_CALLBACK_NONE;
-
-typedef enum _Evas_Canvas3D_Node_Private_Callback_Type
-{
- PRIVATE_CALLBACK_CLICKED = 0,
- PRIVATE_CALLBACK_COLLISION,
- /*Insert here new type of callback*/
- PRIVATE_CALLBACK_NONE
-} Evas_Canvas3D_Node_Private_Callback_Type;
-
-const Efl_Event_Description evas_canvas3d_node_private_event_desc[] =
-{
- EFL_EVENT_DESCRIPTION("clicked,private"),
- EFL_EVENT_DESCRIPTION("collision,private")
-};
-
-/*Private callbacks */
-static void
-_evas_canvas3d_node_private_callback_clicked(void *data, const Efl_Event *event);
-static void
-_evas_canvas3d_node_private_callback_collision(void *data, const Efl_Event *event);
-
-Efl_Event_Cb evas_canvas3d_node_private_callback_functions[] =
-{
- _evas_canvas3d_node_private_callback_clicked,
- _evas_canvas3d_node_private_callback_collision,
-};
-
diff --git a/src/lib/evas/canvas/evas_canvas3d_object.c b/src/lib/evas/canvas/evas_canvas3d_object.c
deleted file mode 100644
index aca9839e51..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_object.c
+++ /dev/null
@@ -1,101 +0,0 @@
-#include "evas_common_private.h"
-#include "evas_private.h"
-
-#define MY_CLASS EVAS_CANVAS3D_OBJECT_CLASS
-
-EOLIAN static Eo *
-_evas_canvas3d_object_efl_object_constructor(Eo *obj, Evas_Canvas3D_Object_Data *pd)
-{
- Eo *e = NULL;
- obj = efl_constructor(efl_super(obj, MY_CLASS));
- e = efl_parent_get(obj);
- pd->evas = e;
- pd->type = EVAS_CANVAS3D_OBJECT_TYPE_INVALID;
- memset(&pd->dirty[0], 0x00, sizeof(Eina_Bool) * EVAS_CANVAS3D_STATE_MAX);
-
- return obj;
-}
-
-EOLIAN static Evas *
- _evas_canvas3d_object_efl_object_provider_find(const Eo *obj, Evas_Canvas3D_Object_Data *pd, const Efl_Class *klass)
-{
- if (klass == EVAS_CANVAS_CLASS)
- return pd->evas;
- return efl_provider_find(efl_super(obj, MY_CLASS), klass);
-}
-
-EOLIAN static void
-_evas_canvas3d_object_type_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Object_Data *pd, Evas_Canvas3D_Object_Type type)
-{
- pd->type = type;
-}
-
-EOLIAN static Evas_Canvas3D_Object_Type
-_evas_canvas3d_object_type_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Object_Data *pd)
-{
- return pd->type;
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_object_dirty_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Object_Data *pd, Evas_Canvas3D_State state)
-{
- return pd->dirty[state];
-}
-
-EOLIAN static void
-_evas_canvas3d_object_change(Eo *obj, Evas_Canvas3D_Object_Data *pd, Evas_Canvas3D_State state, Evas_Canvas3D_Object *ref)
-{
- /* Skip already dirty properties. */
- if (pd->dirty[state])
- return;
-
- pd->dirty[state] = EINA_TRUE;
- pd->dirty[EVAS_CANVAS3D_STATE_ANY] = EINA_TRUE;
-
- evas_canvas3d_object_change_notify(obj, state, ref);
-}
-
-EOLIAN static void
-_evas_canvas3d_object_update(Eo *obj, Evas_Canvas3D_Object_Data *pd)
-{
- if (!pd->dirty[EVAS_CANVAS3D_STATE_ANY])
- return;
-
- evas_canvas3d_object_update_notify(obj);
-
- memset(&pd->dirty[0], 0x00, sizeof(Eina_Bool) * EVAS_CANVAS3D_STATE_MAX);
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_object_efl_object_event_callback_priority_add(Eo *obj,
- Evas_Canvas3D_Object_Data *pd EINA_UNUSED,
- const Efl_Event_Description *desc,
- Efl_Callback_Priority priority,
- Efl_Event_Cb func,
- const void *user_data)
-{
- Eina_Bool r = EINA_FALSE;
-
- r = efl_event_callback_priority_add(efl_super(obj, MY_CLASS), desc, priority, func, user_data);
- evas_canvas3d_object_callback_register(obj, desc->name, user_data);
-
- return r;
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_object_efl_object_event_callback_del(Eo *obj, Evas_Canvas3D_Object_Data *pd EINA_UNUSED,
- const Efl_Event_Description *desc,
- Efl_Event_Cb func,
- const void *user_data)
-{
- Eina_Bool r = EINA_FALSE;
- r = efl_event_callback_del(efl_super(obj, MY_CLASS), desc, func, user_data);
- if (r) evas_canvas3d_object_callback_unregister(obj, desc->name);
- return r;
-}
-
-#define EVAS_CANVAS3D_OBJECT_EXTRA_OPS \
- EFL_OBJECT_OP_FUNC(efl_event_callback_priority_add, _evas_canvas3d_object_efl_object_event_callback_priority_add), \
- EFL_OBJECT_OP_FUNC(efl_event_callback_del, _evas_canvas3d_object_efl_object_event_callback_del)
-
-#include "canvas/evas_canvas3d_object.eo.c"
diff --git a/src/lib/evas/canvas/evas_canvas3d_object.eo b/src/lib/evas/canvas/evas_canvas3d_object.eo
deleted file mode 100644
index c058cda77f..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_object.eo
+++ /dev/null
@@ -1,77 +0,0 @@
-import evas_canvas3d_types;
-
-abstract @beta Evas.Canvas3D.Object extends Efl.Object
-{
- [[Evas 3D canvas object class]]
- data: Evas_Canvas3D_Object_Data;
- methods {
- change {
- [[Notify the object regarding its state change.]]
- params {
- @in state: Evas.Canvas3D.State; [[State that is changed.]]
- @in ref: Evas.Canvas3D.Object; [[The Object that caused the change.]]
- }
- }
- type_get @const {
- [[Returns the type of the object.]]
- return: Evas.Canvas3D.Object_Type; [[Object type]]
- }
-
- type_set {
- [[Sets the type of the object.]]
- params{
- @in type: Evas.Canvas3D.Object_Type; [[Object type]]
- }
- }
-
- dirty_get @const {
- [[Returns the status of a particular state of the object.]]
- return: bool; [[$true if the status is dirty, $false otherwise]]
- params {
- @in state: Evas.Canvas3D.State; [[State whose status is being asked.]]
- }
- }
-
- update {
- [[Update request for the object.]]
- }
- update_notify @pure_virtual {
- [[Pure virtual update_notify function.
-
- Update request for the object.]]
- }
-
- change_notify @pure_virtual {
- [[Pure virtual change_notify function.
-
- Update request for the object.]]
- params {
- @in state: Evas.Canvas3D.State; [[State that is changed.]]
- @in ref: Evas.Canvas3D.Object; [[The Object that caused the change.]]
- }
- }
- callback_register @pure_virtual {
- [[Pure virtual register samrt callback function.]]
- params {
- @in event: string; [[Event type.]]
- @in data: const(void_ptr); [[User data.]]
- }
- }
- callback_unregister @pure_virtual {
- [[Pure virtual unregister smart callback function.]]
- params {
- @in event: string; [[Event type.]]
- }
- }
- }
-
- implements {
- Efl.Object.constructor;
- Efl.Object.provider_find;
- }
- events {
- /* FIXME: Make sure that these two events are actually being emitted */
- clicked: Evas.Canvas3D.Node; [[Clicked Event.]]
- collision: Evas.Canvas3D.Node; [[Collision Event.]]
- }
-}
diff --git a/src/lib/evas/canvas/evas_canvas3d_primitive.c b/src/lib/evas/canvas/evas_canvas3d_primitive.c
deleted file mode 100644
index 45625df424..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_primitive.c
+++ /dev/null
@@ -1,152 +0,0 @@
-#include "evas_common_private.h"
-#include "evas_private.h"
-
-#define MY_CLASS EVAS_CANVAS3D_PRIMITIVE_CLASS
-
-static inline void
-_primitive_init(Evas_Canvas3D_Primitive_Data *pd)
-{
- pd->form = EVAS_CANVAS3D_MESH_PRIMITIVE_NONE;
- pd->ratio = 3.0;
- pd->precision = 10;
- pd->surface = NULL;
- pd->tex_scale.x = 1.0;
- pd->tex_scale.y = 1.0;
-}
-
-EAPI Evas_Canvas3D_Primitive *
-evas_canvas3d_primitive_add(Evas *e)
-{
- MAGIC_CHECK(e, Evas, MAGIC_EVAS);
- return NULL;
- MAGIC_CHECK_END();
- return efl_add(MY_CLASS, e);
-}
-
-EOLIAN static Eo *
-_evas_canvas3d_primitive_efl_object_constructor(Eo *obj, Evas_Canvas3D_Primitive_Data *pd)
-{
- obj = efl_constructor(efl_super(obj, MY_CLASS));
- evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_PRIMITIVE);
- _primitive_init(pd);
-
- return obj;
-}
-
-EOLIAN static void
-_evas_canvas3d_primitive_efl_object_destructor(Eo *obj, Evas_Canvas3D_Primitive_Data *pd EINA_UNUSED)
-{
- efl_destructor(efl_super(obj, MY_CLASS));
-}
-
-EOLIAN static void
-_evas_canvas3d_primitive_form_set(Eo *obj EINA_UNUSED,
- Evas_Canvas3D_Primitive_Data *pd,
- Evas_Canvas3D_Mesh_Primitive form)
-{
- if (form >= EVAS_CANVAS3D_MESH_PRIMITIVE_COUNT)
- {
- ERR("Wrong form of primitive.");
- return;
- }
-
- if (pd->form != form)
- pd->form = form;
-}
-
-EOLIAN static Evas_Canvas3D_Mesh_Primitive
-_evas_canvas3d_primitive_form_get(const Eo *obj EINA_UNUSED,
- Evas_Canvas3D_Primitive_Data *pd)
-{
- return pd->form;
-}
-
-EOLIAN static void
-_evas_canvas3d_primitive_mode_set(Eo *obj EINA_UNUSED,
- Evas_Canvas3D_Primitive_Data *pd,
- Evas_Canvas3D_Primitive_Mode mode)
-{
- if (pd->mode != mode)
- pd->mode = mode;
-}
-
-EOLIAN static Evas_Canvas3D_Primitive_Mode
-_evas_canvas3d_primitive_mode_get(const Eo *obj EINA_UNUSED,
- Evas_Canvas3D_Primitive_Data *pd)
-{
- return pd->mode;
-}
-
-EOLIAN static void
-_evas_canvas3d_primitive_ratio_set(Eo *obj EINA_UNUSED,
- Evas_Canvas3D_Primitive_Data *pd,
- Evas_Real ratio)
-{
- pd->ratio = ratio;
-}
-
-EOLIAN static Evas_Real
-_evas_canvas3d_primitive_ratio_get(const Eo *obj EINA_UNUSED,
- Evas_Canvas3D_Primitive_Data *pd)
-{
- return pd->ratio;
-}
-
-EOLIAN static void
-_evas_canvas3d_primitive_precision_set(Eo *obj EINA_UNUSED,
- Evas_Canvas3D_Primitive_Data *pd,
- int precision)
-{
- if ((precision < 3))
- {
- ERR("Precision of Evas_Canvas3D_Primitive cannot be less than 3.");
- return;
- }
-
- if ((precision >= 100))
- {
- ERR("%s\n%s",
- "Be careful with precision of Evas_Canvas3D_Primitive more than 100.",
- "It can give unacceptable result.");
- }
-
- if (pd->precision != precision)
- pd->precision = precision;
-}
-
-EOLIAN static int
-_evas_canvas3d_primitive_precision_get(const Eo *obj EINA_UNUSED,
- Evas_Canvas3D_Primitive_Data *pd)
-{
- return pd->precision;
-}
-
-EOLIAN static void
-_evas_canvas3d_primitive_surface_set(Eo *obj EINA_UNUSED,
- Evas_Canvas3D_Primitive_Data *pd,
- Evas_Canvas3D_Surface_Func surface_func)
-{
- pd->surface = surface_func;
-}
-
-EOLIAN static void
-_evas_canvas3d_primitive_tex_scale_set(Eo *obj EINA_UNUSED,
- Evas_Canvas3D_Primitive_Data *pd,
- Evas_Real x,
- Evas_Real y)
-{
- if (!EINA_DBL_EQ(x, 0.0)) pd->tex_scale.x = x;
- if (!EINA_DBL_EQ(y, 0.0)) pd->tex_scale.y = y;
-}
-
-EOLIAN static void
-_evas_canvas3d_primitive_tex_scale_get(const Eo *obj EINA_UNUSED,
- Evas_Canvas3D_Primitive_Data *pd,
- Evas_Real *x,
- Evas_Real *y)
-{
- if (x) *x = pd->tex_scale.x;
- if (y) *y = pd->tex_scale.y;
-}
-
-#include "canvas/evas_canvas3d_primitive.eo.c"
diff --git a/src/lib/evas/canvas/evas_canvas3d_primitive.eo b/src/lib/evas/canvas/evas_canvas3d_primitive.eo
deleted file mode 100644
index 3e21f0e4d5..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_primitive.eo
+++ /dev/null
@@ -1,130 +0,0 @@
-import evas_canvas3d_types;
-
-class @beta Evas.Canvas3D.Primitive extends Evas.Canvas3D.Object
-{
- [[Evas 3D canvas primitive class]]
- data: Evas_Canvas3D_Primitive_Data;
-
- methods {
- @property form {
- [[The form of the given primitive.
-
- Form defines which function will be chosen to set data to mesh
- on call of evas_canvas3d_mesh_primitive_set.
-
- Now available next forms of primitives are tabulated primitives (SQUARE and CUBE),
- solids of revolution (CYLINDER, CONE, SPHERE and TORUS) and surfaces (SURFACE and TERRAIN).
-
- Default form is EVAS_CANVAS3D_MESH_PRIMITIVE_NONE.]]
- set {
- }
- get {
- }
- values {
- form: Evas.Canvas3D.Mesh_Primitive; [[Form of primitive.]]
- }
- }
- @property mode {
- [[The mode of the given primitive.
-
- Mode defines which function will be chosen to set data to mesh
- on call of evas_canvas3d_mesh_primitive_set. It helps to choose
- an alternative algorithm for primitives with a given form,
- such as a cone without a base or sphere textured in alternative way.
-
- Mods of primitives are now available
- without base (bases) (supported for cylinder and cone) and
- with alternative UV (supported by sphere).
-
- Default form is EVAS_CANVAS3D_PRIMITIVE_MODE_DEFAULT.]]
- set {
- }
- get {
- }
- values {
- mode: Evas.Canvas3D.Primitive_Mode; [[Mode of primitive.]]
- }
- }
- @property ratio {
- [[The ratio of the given primitive.
-
- Ratio is used only in torus as the ratio of the
- major radius and minor radius. For this usage
- Available values is from 1.0 to infinity.
- If ratio for torus has a bad value,
- 3.0 will be used as the ratio.
-
- Default ratio is 3.0.]]
- set {
- }
- get {
- }
- values {
- ratio: Evas.Real; [[Ratio of primitive.]]
- }
- }
- @property precision {
- [[The precision of the given primitive.
-
- Precision is used in all non tabulated primitives and defines
- the precision of created primitives.
- Available values range from 3 to infinity.
- If the value is more than 100, you may see a warning
- about possibility of incorrect values or slow processing.
-
- Default ratio is 10.]]
- set {
- }
- get {
- }
- values {
- precision: int; [[Precision of primitive.]]
- }
- }
- @property surface {
- [[The surface of the given primitive.
-
- Surface is used only in surface primitives and defines
- the equation of filling mesh data on call of
- evas_canvas3d_mesh_primitive_set.
-
- This allows you to create customers primitives like
- shell, heart, hyperbolic paraboloid etc. See _shell_func in
- examples/evas/evas-3d-visual-test.c or _perlin_terrain in
- modules/evas/primitives/surfaces/terrain.c for usage examples.
-
- Default surface is $null]]
- set {
- }
- values {
- surface: ptr(Evas.Canvas3D.Surface_Func); [[Pointer to customers surface function.]]
- }
- }
- @property tex_scale {
- [[The texture scale of the given primitive.
-
- Texture scale uses in all non tabulated primitives
- and defines scale of texture coordinates or primitives.
-
- It uses to create periodical textured meshes.
-
- Default tex_scale is {1.0, 1.0}]]
- set {
- }
- get {
- }
- values {
- tex_scale_x: Evas.Real; [[Texture scale X coordinate]]
- tex_scale_y: Evas.Real; [[Texture scale Y coordinate]]
- }
- }
- }
- implements {
- Efl.Object.constructor;
- Efl.Object.destructor;
- @empty Evas.Canvas3D.Object.update_notify;
- @empty Evas.Canvas3D.Object.change_notify;
- @empty Evas.Canvas3D.Object.callback_register;
- @empty Evas.Canvas3D.Object.callback_unregister;
- }
-}
diff --git a/src/lib/evas/canvas/evas_canvas3d_scene.c b/src/lib/evas/canvas/evas_canvas3d_scene.c
deleted file mode 100644
index 725996ee96..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_scene.c
+++ /dev/null
@@ -1,839 +0,0 @@
-#include "eo_internal.h"
-#include "evas_common_private.h"
-#include "evas_private.h"
-
-#define MY_CLASS EVAS_CANVAS3D_SCENE_CLASS
-
-void
-evas_canvas3d_scene_data_init(Evas_Canvas3D_Scene_Public_Data *data)
-{
- data->camera_node = NULL;
- data->light_nodes = NULL;
- data->mesh_nodes = NULL;
- data->node_mesh_colors = NULL;
- data->colors_node_mesh = NULL;
- data->render_to_texture = EINA_FALSE;
- data->lod_distance = 0;
- data->post_processing = EINA_FALSE;
- data->post_processing_type = EVAS_CANVAS3D_SHADER_MODE_POST_PROCESSING_FXAA;
-}
-
-void
-evas_canvas3d_scene_data_fini(Evas_Canvas3D_Scene_Public_Data *data)
-{
- if (data->light_nodes)
- eina_list_free(data->light_nodes);
-
- if (data->mesh_nodes)
- eina_list_free(data->mesh_nodes);
-}
-
-EOLIAN static void
-_evas_canvas3d_scene_evas_canvas3d_object_change_notify(Eo *eo_obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd,
- Evas_Canvas3D_State state EINA_UNUSED,
- Evas_Canvas3D_Object *ref EINA_UNUSED)
-{
- Eina_List *l;
- Evas_Object *eo;
-
- EINA_LIST_FOREACH(pd->images, l, eo)
- {
- Evas_Object_Protected_Data *obj = efl_data_scope_get(eo, EFL_CANVAS_OBJECT_CLASS);
- evas_object_change(eo, obj);
- }
-}
-
-EOLIAN static void
-_evas_canvas3d_scene_evas_canvas3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd)
-{
- if (pd->root_node)
- {
- evas_canvas3d_object_update(pd->root_node);
- }
-
- if (pd->camera_node)
- {
- evas_canvas3d_object_update(pd->camera_node);
- }
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_SCENE_UPDATED, NULL);
-}
-
-EAPI Evas_Canvas3D_Scene *
-evas_canvas3d_scene_add(Evas *e)
-{
- MAGIC_CHECK(e, Evas, MAGIC_EVAS);
- return NULL;
- MAGIC_CHECK_END();
- return efl_add(MY_CLASS, e);
-}
-
-EOLIAN static Eo *
-_evas_canvas3d_scene_efl_object_constructor(Eo *obj, Evas_Canvas3D_Scene_Data *pd)
-{
- obj = efl_constructor(efl_super(obj, MY_CLASS));
- evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_SCENE);
- evas_color_set(&pd->bg_color, 0.0, 0.0, 0.0, 0.0);
- pd->shadows_enabled = EINA_FALSE;
- pd->color_pick_enabled = EINA_FALSE;
- pd->node_mesh_colors = NULL;
- pd->colors_node_mesh = NULL;
- pd->depth_offset = 4.0;
- pd->depth_constant = 100.0;
- return obj;
-}
-
-EOLIAN static void
-_evas_canvas3d_scene_root_node_set(Eo *obj, Evas_Canvas3D_Scene_Data *pd, Evas_Canvas3D_Node *node)
-{
- if (pd->root_node == node)
- return;
-
- if (pd->root_node)
- {
- evas_canvas3d_node_scene_root_del(pd->root_node, obj);
- efl_unref(pd->root_node);
- }
-
- pd->root_node = node;
-
- if (node)
- {
- efl_ref(node);
- evas_canvas3d_node_scene_root_add(node, obj);
- }
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_SCENE_ROOT_NODE, NULL);
-}
-
-EOLIAN static Evas_Canvas3D_Node *
-_evas_canvas3d_scene_root_node_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd)
-{
- return pd->root_node;
-}
-
-EOLIAN static void
-_evas_canvas3d_scene_camera_node_set(Eo *obj, Evas_Canvas3D_Scene_Data *pd, Evas_Canvas3D_Node *node)
-{
- if (pd->camera_node == node)
- return;
-
- if (pd->camera_node)
- {
- evas_canvas3d_node_scene_camera_del(pd->camera_node, obj);
- }
-
- pd->camera_node = node;
-
- if (node)
- {
- evas_canvas3d_node_scene_camera_add(node, obj);
- }
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_SCENE_CAMERA_NODE, NULL);
-}
-
-EOLIAN static Evas_Canvas3D_Node *
-_evas_canvas3d_scene_camera_node_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd)
-{
- return pd->camera_node;
-}
-
-EOLIAN static void
-_evas_canvas3d_scene_size_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd, int w, int h)
-{
- pd->w = w;
- pd->h = h;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_SCENE_SIZE, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_scene_size_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd, int *w, int *h)
-{
- if (w) *w = pd->w;
- if (h) *h = pd->h;
-}
-
-EOLIAN static void
-_evas_canvas3d_scene_background_color_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd,
- Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
-{
- evas_color_set(&pd->bg_color, r, g, b, a);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_SCENE_BACKGROUND_COLOR, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_scene_background_color_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd,
- Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a)
-{
- if (r) *r = pd->bg_color.r;
- if (g) *g = pd->bg_color.g;
- if (b) *b = pd->bg_color.b;
- if (a) *a = pd->bg_color.a;
-}
-
-static inline Eina_Bool
-_pick_data_triangle_add(Evas_Canvas3D_Pick_Data *data, const Evas_Ray3 *ray,
- const Evas_Triangle3 *tri)
-{
- Eina_Vector3 e1, e2, tvec, pvec, qvec;
- Evas_Real det, inv_det, u, v, t;
-
- eina_vector3_subtract(&e1, &tri->p1, &tri->p0);
- eina_vector3_subtract(&e2, &tri->p2, &tri->p0);
-
- eina_vector3_cross_product(&pvec, &ray->dir, &e2);
- det = eina_vector3_dot_product(&e1, &pvec);
-
- /* If determinant is near zero, ray lies in plane of triangle. */
- if (det > -0.0000001 && det < 0.0000001)
- return EINA_FALSE;
-
- inv_det = 1.0 / det;
-
- /* Calculate distance from p0 to ray origin. */
- eina_vector3_subtract(&tvec, &ray->org, &tri->p0);
-
- /* Calculate U parameter and test bounds. */
- u = eina_vector3_dot_product(&tvec, &pvec) * inv_det;
-
- if (u < 0.0 || u > 1.0)
- return EINA_FALSE;
-
- /* Prepare to tst V parameter. */
- eina_vector3_cross_product(&qvec, &tvec, &e1);
-
- /* Calculate V parameter and test bounds. */
- v = eina_vector3_dot_product(&ray->dir, &qvec) * inv_det;
-
- if (v < 0.0 || u + v > 1.0)
- return EINA_FALSE;
-
- /* Calculate T parameter and test bounds. */
- t = eina_vector3_dot_product(&e2, &qvec) * inv_det;
-
- if (t >= 0.0 && t <= 1.0)
- {
- if (!data->picked || t < data->z)
- {
- data->picked = EINA_TRUE;
- data->z = t;
- data->u = u;
- data->v = v;
- return EINA_TRUE;
- }
- }
-
- return EINA_FALSE;
-}
-
-static inline void
-_pick_data_texcoord_update(Evas_Canvas3D_Pick_Data *data,
- const Evas_Canvas3D_Vertex_Buffer *tex0, const Evas_Canvas3D_Vertex_Buffer *tex1,
- Evas_Real weight, unsigned int i0, unsigned int i1, unsigned int i2)
-{
- Evas_Real s0, s1, s2;
- Evas_Real t0, t1, t2;
-
- if (tex1->data == NULL)
- {
- float *ptr;
-
- ptr = (float *)((char *)tex0->data + tex0->stride * i0);
-
- s0 = ptr[0];
- t0 = ptr[1];
-
- ptr = (float *)((char *)tex0->data + tex0->stride * i1);
-
- s1 = ptr[0];
- t1 = ptr[1];
-
- ptr = (float *)((char *)tex0->data + tex0->stride * i2);
-
- s2 = ptr[0];
- t2 = ptr[1];
- }
- else
- {
- float *ptr0, *ptr1;
-
- ptr0 = (float *)((char *)tex0->data + tex0->stride * i0);
- ptr1 = (float *)((char *)tex1->data + tex1->stride * i0);
-
- s0 = ptr0[0] * weight + ptr1[0] * (1.0 - weight);
- t0 = ptr0[1] * weight + ptr1[1] * (1.0 - weight);
-
- ptr0 = (float *)((char *)tex0->data + tex0->stride * i1);
- ptr1 = (float *)((char *)tex1->data + tex1->stride * i1);
-
- s1 = ptr0[0] * weight + ptr1[0] * (1.0 - weight);
- t1 = ptr0[1] * weight + ptr1[1] * (1.0 - weight);
-
- ptr0 = (float *)((char *)tex0->data + tex0->stride * i2);
- ptr1 = (float *)((char *)tex1->data + tex1->stride * i2);
-
- s2 = ptr0[0] * weight + ptr1[0] * (1.0 - weight);
- t2 = ptr0[1] * weight + ptr1[1] * (1.0 - weight);
- }
-
- data->s = s0 * (1 - data->u - data->v) + s1 * data->u + s2 * data->v;
- data->t = t0 * (1 - data->u - data->v) + t1 * data->u + t2 * data->v;
-}
-
-
-static inline Eina_Bool
-_pick_data_mesh_add(Evas_Canvas3D_Pick_Data *data, const Evas_Ray3 *ray,
- Evas_Canvas3D_Mesh *mesh, int frame, Evas_Canvas3D_Node *node)
-{
- Evas_Canvas3D_Vertex_Buffer pos0, pos1, tex0, tex1;
- Evas_Real pos_weight, tex_weight;
- Evas_Triangle3 tri;
- int i;
-
- memset(&pos0, 0x00, sizeof(Evas_Canvas3D_Vertex_Buffer));
- memset(&pos1, 0x00, sizeof(Evas_Canvas3D_Vertex_Buffer));
- memset(&tex0, 0x00, sizeof(Evas_Canvas3D_Vertex_Buffer));
- memset(&tex1, 0x00, sizeof(Evas_Canvas3D_Vertex_Buffer));
-
- evas_canvas3d_mesh_interpolate_vertex_buffer_get(mesh, frame, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION,
- &pos0, &pos1, &pos_weight);
-
- evas_canvas3d_mesh_interpolate_vertex_buffer_get(mesh, frame, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD,
- &tex0, &tex1, &tex_weight);
- Evas_Canvas3D_Mesh_Data *pdmesh = efl_data_scope_get(mesh, EVAS_CANVAS3D_MESH_CLASS);
- if (pdmesh->indices)
- {
- unsigned int i0, i1, i2;
-
- if (pdmesh->assembly == EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES)
- {
- for (i = 0; i < pdmesh->index_count; i += 3)
- {
- if (pdmesh->index_format == EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT)
- {
- i0 = ((unsigned short *)pdmesh->indices)[i];
- i1 = ((unsigned short *)pdmesh->indices)[i + 1];
- i2 = ((unsigned short *)pdmesh->indices)[i + 2];
- }
- else
- {
- i0 = ((unsigned char *)pdmesh->indices)[i];
- i1 = ((unsigned char *)pdmesh->indices)[i + 1];
- i2 = ((unsigned char *)pdmesh->indices)[i + 2];
- }
-
- evas_canvas3d_mesh_interpolate_position_get(&tri.p0, &pos0, &pos1, pos_weight, i0);
- evas_canvas3d_mesh_interpolate_position_get(&tri.p1, &pos0, &pos1, pos_weight, i1);
- evas_canvas3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i2);
-
- if (_pick_data_triangle_add(data, ray, &tri))
- {
- if (tex0.data)
- _pick_data_texcoord_update(data, &tex0, &tex1, tex_weight, i0, i1, i2);
- data->mesh = mesh;
- data->node = node;
- return EINA_TRUE;
- }
- }
- }
- else if (pdmesh->assembly == EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLE_STRIP)
- {
- if (pdmesh->index_format == EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT)
- {
- i1 = ((unsigned short *)pdmesh->indices)[0];
- i2 = ((unsigned short *)pdmesh->indices)[1];
- }
- else
- {
- i1 = ((unsigned char *)pdmesh->indices)[0];
- i2 = ((unsigned char *)pdmesh->indices)[1];
- }
-
- evas_canvas3d_mesh_interpolate_position_get(&tri.p1, &pos0, &pos1, pos_weight, i1);
- evas_canvas3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i2);
-
- for (i = 0; i < pdmesh->index_count - 2; i++)
- {
- tri.p0 = tri.p1;
- tri.p1 = tri.p2;
-
- if (pdmesh->index_format == EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT)
- i2 = ((unsigned short *)pdmesh->indices)[i + 2];
- else
- i2 = ((unsigned char *)pdmesh->indices)[i + 2];
-
- evas_canvas3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i2);
-
- if (_pick_data_triangle_add(data, ray, &tri))
- {
- if (pdmesh->index_format == EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT)
- {
- i0 = ((unsigned short *)pdmesh->indices)[i];
- i1 = ((unsigned short *)pdmesh->indices)[i + 1];
- }
- else
- {
- i0 = ((unsigned char *)pdmesh->indices)[i];
- i1 = ((unsigned char *)pdmesh->indices)[i + 1];
- }
-
- if (tex0.data)
- _pick_data_texcoord_update(data, &tex0, &tex1, tex_weight, i0, i1, i2);
- data->mesh = mesh;
- data->node = node;
- return EINA_TRUE;
- }
- }
- }
- else if (pdmesh->assembly == EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLE_FAN)
- {
- if (pdmesh->index_format == EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT)
- {
- i0 = ((unsigned short *)pdmesh->indices)[0];
- i2 = ((unsigned short *)pdmesh->indices)[1];
- }
- else
- {
- i0 = ((unsigned char *)pdmesh->indices)[0];
- i2 = ((unsigned char *)pdmesh->indices)[1];
- }
-
- evas_canvas3d_mesh_interpolate_position_get(&tri.p0, &pos0, &pos1, pos_weight, i0);
- evas_canvas3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i2);
-
- for (i = 1; i < pdmesh->index_count - 1; i++)
- {
- tri.p1 = tri.p2;
-
- if (pdmesh->index_format == EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT)
- i2 = ((unsigned short *)pdmesh->indices)[i + 1];
- else
- i2 = ((unsigned char *)pdmesh->indices)[i + 1];
-
- evas_canvas3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i2);
-
- if (_pick_data_triangle_add(data, ray, &tri))
- {
- if (pdmesh->index_format == EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT)
- i1 = ((unsigned short *)pdmesh->indices)[i];
- else
- i1 = ((unsigned char *)pdmesh->indices)[i];
-
- if (tex0.data)
- _pick_data_texcoord_update(data, &tex0, &tex1, tex_weight, i0, i1, i2);
- data->mesh = mesh;
- data->node = node;
- }
- }
- }
- }
- else if (pdmesh->index_format == EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_BYTE)
- {
- if (pdmesh->assembly == EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES)
- {
- for (i = 0; i < pdmesh->index_count; i += 3)
- {
- evas_canvas3d_mesh_interpolate_position_get(&tri.p0, &pos0, &pos1, pos_weight, i);
- evas_canvas3d_mesh_interpolate_position_get(&tri.p1, &pos0, &pos1, pos_weight, i + 1);
- evas_canvas3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 2);
-
- if (_pick_data_triangle_add(data, ray, &tri))
- {
- if (tex0.data)
- _pick_data_texcoord_update(data, &tex0, &tex1, tex_weight, i, i + 1, i + 2);
- data->mesh = mesh;
- data->node = node;
- }
- }
- }
- else if (pdmesh->assembly == EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLE_STRIP)
- {
- evas_canvas3d_mesh_interpolate_position_get(&tri.p1, &pos0, &pos1, pos_weight, 0);
- evas_canvas3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, 1);
-
- for (i = 0; i < pdmesh->index_count - 2; i++)
- {
- tri.p0 = tri.p1;
- tri.p1 = tri.p2;
-
- evas_canvas3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 2);
-
- if (_pick_data_triangle_add(data, ray, &tri))
- {
- if (tex0.data)
- _pick_data_texcoord_update(data, &tex0, &tex1, tex_weight, i, i + 1, i + 2);
- data->mesh = mesh;
- data->node = node;
- }
- }
- }
- else if (pdmesh->assembly == EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLE_FAN)
- {
- evas_canvas3d_mesh_interpolate_position_get(&tri.p0, &pos0, &pos1, pos_weight, 0);
- evas_canvas3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, 1);
-
- for (i = 1; i < pdmesh->index_count - 1; i++)
- {
- tri.p1 = tri.p2;
-
- evas_canvas3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 1);
-
- if (_pick_data_triangle_add(data, ray, &tri))
- {
- if (tex0.data)
- _pick_data_texcoord_update(data, &tex0, &tex1, tex_weight, 0, i, i + 1);
- data->mesh = mesh;
- data->node = node;
- }
- }
- }
- }
- else if ((EINA_DBL_EQ(pdmesh->index_count, 0.0)) &&
- pdmesh->vertex_count != 0)
- {
- if (pdmesh->assembly == EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES)
- {
- for (i = 0; i < pdmesh->vertex_count; i += 3)
- {
- evas_canvas3d_mesh_interpolate_position_get(&tri.p0, &pos0, &pos1, pos_weight, i);
- evas_canvas3d_mesh_interpolate_position_get(&tri.p1, &pos0, &pos1, pos_weight, i + 1);
- evas_canvas3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 2);
-
- if (_pick_data_triangle_add(data, ray, &tri))
- {
- if (tex0.data)
- _pick_data_texcoord_update(data, &tex0, &tex1, tex_weight, i, i + 1, i + 2);
- data->mesh = mesh;
- data->node = node;
- }
- }
- }
- else if (pdmesh->assembly == EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLE_STRIP)
- {
- evas_canvas3d_mesh_interpolate_position_get(&tri.p1, &pos0, &pos1, pos_weight, 0);
- evas_canvas3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, 1);
-
- for (i = 0; i < pdmesh->vertex_count - 2; i++)
- {
- tri.p0 = tri.p1;
- tri.p1 = tri.p2;
-
- evas_canvas3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 2);
-
- if (_pick_data_triangle_add(data, ray, &tri))
- {
- if (tex0.data)
- _pick_data_texcoord_update(data, &tex0, &tex1, tex_weight, i, i + 1, i + 2);
- data->mesh = mesh;
- data->node = node;
- return EINA_TRUE;
- }
- }
- }
- else if (pdmesh->assembly == EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLE_FAN)
- {
- evas_canvas3d_mesh_interpolate_position_get(&tri.p0, &pos0, &pos1, pos_weight, 0);
- evas_canvas3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, 1);
-
- for (i = 1; i < pdmesh->vertex_count - 1; i++)
- {
- tri.p1 = tri.p2;
-
- evas_canvas3d_mesh_interpolate_position_get(&tri.p2, &pos0, &pos1, pos_weight, i + 1);
-
- if (_pick_data_triangle_add(data, ray, &tri))
- {
- if (tex0.data)
- _pick_data_texcoord_update(data, &tex0, &tex1, tex_weight, 0, i, i + 1);
- data->mesh = mesh;
- data->node = node;
- return EINA_TRUE;
- }
- }
- }
- }
- return EINA_FALSE;
-}
-
-Eina_Bool
-_node_pick(Evas_Canvas3D_Node *node, void *data)
-{
- Evas_Ray3 ray;
- Evas_Canvas3D_Pick_Data *pick = (Evas_Canvas3D_Pick_Data *)data;
- Eina_Matrix4 mvp;
- Evas_Canvas3D_Node_Data *pd_node = efl_data_scope_get(node, EVAS_CANVAS3D_NODE_CLASS);
-
- evas_canvas3d_node_tree_traverse(node, EVAS_CANVAS3D_TREE_TRAVERSE_POST_ORDER, EINA_FALSE,
- node_aabb_update, NULL);
-
- if (! evas_box3_ray3_intersect(&pd_node->aabb, &pick->ray_world))
- {
- /* Skip entire subtree. */
- return EINA_FALSE;
- }
-
- if (pd_node->type == EVAS_CANVAS3D_NODE_TYPE_MESH)
- {
- Eina_Iterator *itr;
- void *ptr;
-
- /* Transform ray into local coordinate space. */
- eina_matrix4_multiply(&mvp, &pick->matrix_vp, &pd_node->data.mesh.matrix_local_to_world);
- evas_ray3_init(&ray, pick->x, pick->y, &mvp);
-
- itr = eina_hash_iterator_data_new(pd_node->data.mesh.node_meshes);
-
- while (eina_iterator_next(itr, &ptr))
- {
- Evas_Canvas3D_Node_Mesh *nm = (Evas_Canvas3D_Node_Mesh *)ptr;
- if(_pick_data_mesh_add(pick, &ray, nm->mesh, nm->frame, node))
- break;
- }
- }
-
- return EINA_TRUE;
-}
-
-static void _node_mesh_colors_free_cb(void *data)
-{
- if (data) free(data);
-}
-
-static inline void
-_pick_data_init(Evas_Canvas3D_Pick_Data *data, Evas_Public_Data *e, Evas_Real x, Evas_Real y)
-{
- data->x = ((x * 2.0) / ((Evas_Real)e->viewport.w)) - 1.0;
- data->y = ((((Evas_Real)e->viewport.h - y - 1) * 2.0) / ((Evas_Real)e->viewport.h)) - 1.0;
- data->picked = EINA_FALSE;
- data->z = 1.0;
- data->node = NULL;
- data->mesh = NULL;
- data->s = 0.0;
- data->t = 0.0;
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_scene_pick(const Eo *obj, Evas_Canvas3D_Scene_Data *pd, Evas_Real x, Evas_Real y,
- Evas_Canvas3D_Node **node, Evas_Canvas3D_Mesh **mesh,
- Evas_Real *s, Evas_Real *t)
-{
- Evas_Canvas3D_Pick_Data data;
- Evas_Canvas3D_Node_Data *pd_camera_node;
- Evas_Canvas3D_Camera_Data *pd_camera;
- Evas_Canvas3D_Object_Data *pd_parent;
- Evas_Public_Data *e;
- int tex = 0, px, py;;
- Evas_Color color = {0.0, 0.0, 0.0, 0.0};
- Eina_Stringshare *tmp;
- Eina_Array *arr = NULL;
- Eina_Bool update_scene = EINA_FALSE;
- Evas_Canvas3D_Node *picked_node = NULL;
- const Efl_Event_Description *eo_desc = NULL;
-
- pd_parent = efl_data_scope_get(obj, EVAS_CANVAS3D_OBJECT_CLASS);
- e = efl_data_scope_get(pd_parent->evas, EVAS_CANVAS_CLASS);
-
- _pick_data_init(&data, e, x, y);
- px = round(x * pd->w / e->viewport.w);
- py = round((pd->h - (y * pd->h / e->viewport.h) - 1));
-
- /*Use color pick mechanism finding node and mesh*/
- if (pd->color_pick_enabled)
- {
- Evas_Canvas3D_Scene_Public_Data scene_data;
-
- scene_data.bg_color = pd->bg_color;
- scene_data.shadows_enabled = pd->shadows_enabled;
- scene_data.camera_node = pd->camera_node;
- scene_data.color_pick_enabled = pd->color_pick_enabled;
- update_scene = evas_canvas3d_object_dirty_get(obj, EVAS_CANVAS3D_STATE_SCENE_UPDATED);
- scene_data.post_processing = EINA_FALSE;
- if (update_scene)
- {
- if (pd->node_mesh_colors)
- {
- eina_hash_free(pd->node_mesh_colors);
- eina_hash_free(pd->colors_node_mesh);
- pd->node_mesh_colors = NULL;
- pd->colors_node_mesh = NULL;
- }
- pd->node_mesh_colors = eina_hash_stringshared_new(_node_mesh_colors_free_cb);
- pd->colors_node_mesh = eina_hash_stringshared_new(_node_mesh_colors_free_cb);
- }
- scene_data.node_mesh_colors = pd->node_mesh_colors;
- scene_data.colors_node_mesh = pd->colors_node_mesh;
- evas_canvas3d_node_tree_traverse(pd->root_node,
- EVAS_CANVAS3D_TREE_TRAVERSE_LEVEL_ORDER, EINA_TRUE,
- evas_canvas3d_node_color_node_mesh_collect, &scene_data);
-
- if (e->engine.func->drawable_scene_render_to_texture)
- {
- if (e->engine.func->drawable_scene_render_to_texture(_evas_engine_context(e),
- pd->surface, &scene_data))
- {
- if (e->engine.func->drawable_texture_color_pick_id_get)
- tex = e->engine.func->drawable_texture_color_pick_id_get(pd->surface);
- if (e->engine.func->drawable_texture_pixel_color_get)
- {
- e->engine.func->drawable_texture_pixel_color_get(tex, px, py, &color, pd->surface);
- tmp = eina_stringshare_printf("%f %f %f", color.r, color.g, color.b);
- arr = (Eina_Array *)eina_hash_find(pd->colors_node_mesh, tmp);
- if (arr)
- {
- picked_node = (Evas_Canvas3D_Node *)eina_array_data_get(arr, 0);
- if (mesh) *mesh = (Evas_Canvas3D_Mesh *)eina_array_data_get(arr, 1);
- if (node) *node = picked_node;
- eina_stringshare_del(tmp);
-
- /*Calling callback clicked*/
- eo_desc = efl_object_legacy_only_event_description_get("clicked,private");
- efl_event_callback_legacy_call(picked_node, eo_desc, picked_node);
-
- return EINA_TRUE;
- }
- else
- {
- eina_stringshare_del(tmp);
- if (mesh) *mesh = NULL;
- if (node) *node = NULL;
- }
- }
- }
- }
- return EINA_FALSE;
- }
- /* Update the scene graph. */
- evas_canvas3d_object_update((Eo *) obj);
- pd_camera_node = efl_data_scope_get(pd->camera_node, EVAS_CANVAS3D_NODE_CLASS);
- pd_camera = efl_data_scope_get(pd_camera_node->data.camera.camera, EVAS_CANVAS3D_CAMERA_CLASS);
- eina_matrix4_multiply(&data.matrix_vp,
- &pd_camera->projection,
- &pd_camera_node->data.camera.matrix_world_to_eye);
-
- evas_ray3_init(&data.ray_world, data.x, data.y, &data.matrix_vp);
-
- /* Traverse tree while adding meshes into pick data structure. */
- evas_canvas3d_node_tree_traverse(pd->root_node, EVAS_CANVAS3D_TREE_TRAVERSE_LEVEL_ORDER, EINA_TRUE,
- _node_pick, &data);
-
- if (!data.picked)
- return EINA_FALSE;
-
- if (s) *s = data.s;
- if (t) *t = data.t;
- if (node) *node = data.node;
- if (mesh) *mesh = data.mesh;
-
- /*Calling callback clicked*/
- eo_desc = efl_object_legacy_only_event_description_get("clicked,private");
- efl_event_callback_legacy_call(data.node, eo_desc, data.node);
-
- return EINA_TRUE;
-}
-
-EOLIAN static Evas_Canvas3D_Node *
-_evas_canvas3d_scene_exist(const Eo *obj, Evas_Canvas3D_Scene_Data *pd, Evas_Real x, Evas_Real y, Evas_Canvas3D_Node *node)
-{
- Evas_Canvas3D_Pick_Data data;
- Evas_Canvas3D_Node_Data *pd_camera_node;
- Evas_Canvas3D_Camera_Data *pd_camera;
- Evas_Canvas3D_Object_Data *pd_parent;
- Evas_Public_Data *e;
-
- pd_parent = efl_data_scope_get(obj, EVAS_CANVAS3D_OBJECT_CLASS);
- e = efl_data_scope_get(pd_parent->evas, EVAS_CANVAS_CLASS);
-
- _pick_data_init(&data, e, x, y);
-
- /* Update the scene graph. */
- evas_canvas3d_object_update((Eo *) obj);
- pd_camera_node = efl_data_scope_get(pd->camera_node, EVAS_CANVAS3D_NODE_CLASS);
- pd_camera = efl_data_scope_get(pd_camera_node->data.camera.camera, EVAS_CANVAS3D_CAMERA_CLASS);
- eina_matrix4_multiply(&data.matrix_vp,
- &pd_camera->projection,
- &pd_camera_node->data.camera.matrix_world_to_eye);
-
- evas_ray3_init(&data.ray_world, data.x, data.y, &data.matrix_vp);
-
- /* Check pick for given node. */
- _node_pick(node, &data);
-
- if (!data.picked || data.node != node) node = NULL;
-
- return node;
-}
-
-EOLIAN static Eina_List *
-_evas_canvas3d_scene_pick_member_list_get(const Eo *obj, Evas_Canvas3D_Scene_Data *pd, Evas_Real x, Evas_Real y)
-{
- const Eina_List *list = NULL, *l = NULL;
- Eina_List *picked_nodes = NULL;
- void *node;
- Eina_Bool pick = EINA_FALSE;
-
- /* Check pick for given scene. */
- pick = evas_canvas3d_scene_pick(obj, x, y, NULL, NULL, NULL, NULL);
-
- if (!pick)
- return NULL;
-
- /* Get all members from root node. */
- list = evas_canvas3d_node_member_list_get(pd->root_node);
-
- EINA_LIST_FOREACH(list, l, node)
- {
- if (evas_canvas3d_scene_exist(obj, x, y, node))
- picked_nodes = eina_list_append(picked_nodes, l);
- }
-
- return picked_nodes;
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_scene_shadows_enable_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd)
-{
- return pd->shadows_enabled;
-}
-
-EOLIAN static void
-_evas_canvas3d_scene_shadows_enable_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd, Eina_Bool _shadows_enabled)
-{
- pd->shadows_enabled = _shadows_enabled;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_SCENE_SHADOWS_ENABLED, NULL);
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_scene_color_pick_enable_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd)
-{
- return pd->color_pick_enabled;
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_scene_color_pick_enable_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd, Eina_Bool _enabled)
-{
- if (pd->color_pick_enabled != _enabled)
- pd->color_pick_enabled = _enabled;
-
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_SCENE_UPDATED, NULL);
- return EINA_TRUE;
-}
-
-EOLIAN static void
-_evas_canvas3d_scene_shadows_depth_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd,
- Evas_Real depth_offset, Evas_Real depth_constant)
-{
- pd->depth_offset = depth_offset;
- pd->depth_constant = depth_constant;
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_SCENE_SHADOWS_DEPTH, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_scene_shadows_depth_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd,
- Evas_Real *depth_offset, Evas_Real *depth_constant)
-{
- if (depth_offset) *depth_offset = pd->depth_offset;
- if (depth_constant) *depth_constant = pd->depth_constant;
-}
-
-#include "canvas/evas_canvas3d_scene.eo.c"
diff --git a/src/lib/evas/canvas/evas_canvas3d_scene.eo b/src/lib/evas/canvas/evas_canvas3d_scene.eo
deleted file mode 100644
index 86b14ecd8d..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_scene.eo
+++ /dev/null
@@ -1,168 +0,0 @@
-import evas_canvas3d_types;
-
-class @beta Evas.Canvas3D.Scene extends Evas.Canvas3D.Object
-{
- [[Efl 3D canvas scene class]]
- data: Evas_Canvas3D_Scene_Data;
- methods {
- size_set {
- [[Set the resolution of a scene.
-
- A scene should be rendered to be displayed through image
- objects. The resolution defines the size of the internal surface
- holding the rendered result.
- ]]
- params {
- @in w: int; [[Width of the resolution.]]
- @in h: int; [[Height of the resolution.]]
- }
- }
-
- size_get @const {
- [[Get the internal resolution of a scene.]]
- params {
- @out w: int; [[Pointer to receive width of the resolution.]]
- @out h: int; [[Pointer to receive height of the resolution.]]
- }
- }
-
- background_color_set {
- [[Set the background color of a scene.
-
- Background color defines the initial color of pixels before a scene
- is rendered. If you want to display a scene with background evas
- objects as if they're part of the background, set
- the alpha term to 0.0.
-
- Default background color is (0.0, 0.0, 0.0, 0.0).
- ]]
- params {
- @in r: Evas.Real; [[Red component of the background color.]]
- @in g: Evas.Real; [[Green component of the background color.]]
- @in b: Evas.Real; [[Blue component of the background color.]]
- @in a: Evas.Real; [[Alpha component of the background color.]]
- }
- }
-
- background_color_get @const {
- [[Get the background color of a scene.]]
- params {
- @out r: Evas.Real; [[Pointer to receive red component of the background color.]]
- @out g: Evas.Real; [[Pointer to receive green component of the background color.]]
- @out b: Evas.Real; [[Pointer to receive blue component of the background color.]]
- @out a: Evas.Real; [[Pointer to receive alpha component of the background color.]]
- }
- }
-
- pick @const {
- [[Get information on the most front visible mesh for the given
- position.
-
- (x, y) is the screen coordinate of the given scene. That is,
- left-top is (0, 0) and right-bottom is (w, h) where (w, h) is
- the size of the scene. The texture coordinate is useful when
- using proxy texture source.
- ]]
- return: bool; [[$true on success, $false otherwise]]
- params {
- @in x: Evas.Real; [[X coordinate of the picking position.]]
- @in y: Evas.Real; [[Y coordinate of the picking position.]]
- @out node: Evas.Canvas3D.Node; [[Pointer to receive the node contains the picked mesh.]]
- @out mesh: Evas.Canvas3D.Mesh; [[Pointer to receive the picked mesh.]]
- @out s: Evas.Real; [[Pointer to receive the texture "s" coordinate.]]
- @out t: Evas.Real; [[Pointer to receive the texture "t" coordinate.]]
- }
- }
-
- exist @const {
- [[Search given node in the given position.]]
- return: Evas.Canvas3D.Node; [[Node at the given position]]
- params {
- @in x: Evas.Real; [[X coordinate of the picking position.]]
- @in y: Evas.Real; [[Y coordinate of the picking position.]]
- @in node: Evas.Canvas3D.Node; [[Node for search.]]
- }
- }
-
- pick_member_list_get @const {
- [[Get list of the all root members from scene in the given position.]]
- return: list<Evas.Canvas3D.Node>; [[List of all root members from scene]]
- params {
- @in x: Evas.Real; [[X coordinate of the picking position.]]
- @in y: Evas.Real; [[Y coordinate of the picking position.]]
- }
- }
- shadows_enable_set {
- [[Enable or disable shadows on given scene
-
- If shadows_enabled is $true, the objects in the scene can throw
- shadow to another objects located behind them. The depth map used
- for shading. Directed and projective light sources are supported.
- ]]
- params {
- @in shadows_enabled: bool; [[Shadows enabled status.]]
- }
- }
-
- shadows_enable_get @const {
- [[Get shadows enabled status for given scene.]]
- return: bool; [[The shadows enabled status.]]
- }
- color_pick_enable_get @const {
- [[Get status of color picking of the scene.]]
- return: bool; [[The pick enabled status]]
- }
- color_pick_enable_set {
- [[Set possibility color picking.]]
- return: bool; [[$true on success, $false otherwise]]
- params {
- @in color_pick: bool; [[Possibility flag]]
- }
- }
-
- @property root_node {
- [[The root node of a scene.]]
- set {
- }
- get {
- }
- values {
- node: Evas.Canvas3D.Node; [[A node which will be used as a
- root node for the scene.]]
- }
- }
-
- @property camera_node {
- [[The camera node of a scene.]]
- set {
- }
- get {
- }
- values {
- node: Evas.Canvas3D.Node; [[A node which will be used as a
- camera node for the scene.]]
- }
- }
- @property shadows_depth {
- [[Scale and units used to calculate depth values.]]
- set {
- }
- get {
- }
- values {
- depth_offset: Evas.Real; [[Scale factor that is used to
- create a variable depth offset
- for each polygon.]]
- depth_constant: Evas.Real; [[Value to create a constant
- depth offset]]
- }
- }
-}
- implements {
- Efl.Object.constructor;
- Evas.Canvas3D.Object.update_notify;
- Evas.Canvas3D.Object.change_notify;
- @empty Evas.Canvas3D.Object.callback_register;
- @empty Evas.Canvas3D.Object.callback_unregister;
- }
-}
diff --git a/src/lib/evas/canvas/evas_canvas3d_texture.c b/src/lib/evas/canvas/evas_canvas3d_texture.c
deleted file mode 100644
index 0381c87275..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_texture.c
+++ /dev/null
@@ -1,606 +0,0 @@
-#include "evas_common_private.h"
-#include "evas_private.h"
-
-#define MY_CLASS EVAS_CANVAS3D_TEXTURE_CLASS
-
-static inline void
-_texture_proxy_set(Evas_Canvas3D_Texture *texture, Evas_Object *eo_src, Evas_Object_Protected_Data *src)
-{
- Evas_Canvas3D_Texture_Data *pd = efl_data_scope_get(texture, MY_CLASS);
- EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, src->proxy, Evas_Object_Proxy_Data, proxy_src)
- {
- proxy_src->proxy_textures = eina_list_append(proxy_src->proxy_textures, texture);
- proxy_src->redraw = EINA_TRUE;
- }
- EINA_COW_WRITE_END(evas_object_proxy_cow, src->proxy, proxy_src);
-
- pd->source = eo_src;
-}
-
-static inline void
-_texture_proxy_unset(Evas_Canvas3D_Texture_Data *texture)
-{
- Evas_Object_Protected_Data *src = efl_data_scope_get(texture->source, EFL_CANVAS_OBJECT_CLASS);
-
- EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, src->proxy, Evas_Object_Proxy_Data, proxy_src);
- {
- proxy_src->proxy_textures = eina_list_remove(proxy_src->proxy_textures, texture);
-
- if (eina_list_count(proxy_src->proxy_textures) == 0 &&
- eina_list_count(proxy_src->proxies) == 0 &&
- proxy_src->surface != NULL)
- {
- Evas_Public_Data *e = src->layer->evas;
- e->engine.func->image_free(_evas_engine_context(e), proxy_src->surface);
- proxy_src->surface = NULL;
- }
-
- if (proxy_src->src_invisible)
- {
- proxy_src->src_invisible = EINA_FALSE;
- src->changed_src_visible = EINA_TRUE;
- evas_object_change(texture->source, src);
- evas_object_smart_member_cache_invalidate(texture->source,
- EINA_FALSE, EINA_FALSE, EINA_TRUE);
- }
- }
- EINA_COW_WRITE_END(evas_object_proxy_cow, src->proxy, proxy_src);
-
- texture->source = NULL;
-}
-
-static inline void
-_texture_proxy_subrender(Evas_Canvas3D_Texture *obj, void *engine)
-{
- /* Code taken from _proxy_subrender() in file evas_object_image.c */
- Eo *evas = NULL;
- evas = evas_object_evas_get(obj);
- Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
- Evas_Canvas3D_Texture_Data *pd = efl_data_scope_get(obj, MY_CLASS);
- Evas_Object_Protected_Data *source;
- void *ctx;
- int w, h;
- Eina_Bool is_image;
-
- if (!pd->source)
- return;
-
- // TODO: replace this function by evas_render_proxy_subrender (as appropriate)
-
- source = efl_data_scope_get(pd->source, EFL_CANVAS_OBJECT_CLASS);
-
- is_image = efl_isa(pd->source, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
-
- EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, source->proxy, Evas_Object_Proxy_Data, proxy_write)
- {
- proxy_write->redraw = EINA_FALSE;
-
- if (is_image)
- {
- void *image = source->func->engine_data_get(pd->source);
- e->engine.func->image_size_get(engine, image, &w, &h);
- }
- else
- {
- w = source->cur->geometry.w;
- h = source->cur->geometry.h;
- }
-
- /* We need to redraw surface then */
- if ((proxy_write->surface) &&
- ((proxy_write->w != w) || (proxy_write->h != h)))
- {
- e->engine.func->image_free(engine, proxy_write->surface);
- proxy_write->surface = NULL;
- }
-
- /* FIXME: Hardcoded alpha 'on' */
- /* FIXME (cont): Should see if the object has alpha */
- if (!proxy_write->surface)
- {
- proxy_write->surface = e->engine.func->image_map_surface_new
- (engine, w, h, 1);
- if (!proxy_write->surface) goto end;
- proxy_write->w = w;
- proxy_write->h = h;
- }
-
- ctx = e->engine.func->context_new(engine);
- e->engine.func->context_color_set(engine, ctx, 0, 0,
- 0, 0);
- e->engine.func->context_render_op_set(engine, ctx,
- EVAS_RENDER_COPY);
- e->engine.func->rectangle_draw(engine, _evas_default_output_get(e), ctx,
- proxy_write->surface, 0, 0, w, h,
- EINA_FALSE);
- e->engine.func->context_free(engine, ctx);
-
- ctx = e->engine.func->context_new(engine);
-
- if (is_image)
- {
- void *image = source->func->engine_data_get(pd->source);
-
- if (image)
- {
- int imagew, imageh;
- e->engine.func->image_size_get(engine, image,
- &imagew, &imageh);
- e->engine.func->image_draw(engine, _evas_default_output_get(e), ctx,
- proxy_write->surface, image,
- 0, 0, imagew, imageh, 0, 0, w, h, 0, EINA_FALSE);
- }
- }
- else
- {
- Evas_Proxy_Render_Data proxy_render_data = {
- .eo_proxy = NULL,
- .proxy_obj = NULL,
- .eo_src = pd->source,
- .src_obj = source,
- .source_clip = EINA_FALSE
- };
-
- evas_render_mapped(e, pd->source, source, ctx,
- _evas_default_output_get(e),
- proxy_write->surface,
- -source->cur->geometry.x,
- -source->cur->geometry.y,
- 2, 0, 0, e->output.w, e->output.h,
- &proxy_render_data, 1, EINA_FALSE);
- }
-
- e->engine.func->context_free(engine, ctx);
- proxy_write->surface = e->engine.func->image_dirty_region
- (engine, proxy_write->surface, 0, 0, w, h);
- }
- end:
- EINA_COW_WRITE_END(evas_object_proxy_cow, source->proxy, proxy_write);
-}
-
-static void
-_texture_fini(Evas_Canvas3D_Texture *obj)
-{
- Eo *evas = NULL;
- int i = 0;
- Eina_Iterator *it = NULL;
- void *data = NULL;
- Evas_Canvas3D_Material_Data *material = NULL;
-
- evas = evas_object_evas_get(obj);
- Evas_Canvas3D_Texture_Data *pd = efl_data_scope_get(obj, MY_CLASS);
-
- if (pd->engine_data)
- {
- Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
- if (e->engine.func->texture_free)
- e->engine.func->texture_free(_evas_engine_context(e), pd->engine_data);
- pd->engine_data = NULL;
- }
-
- if (pd->materials)
- {
- it = eina_hash_iterator_key_new(pd->materials);
- EINA_ITERATOR_FOREACH(it, data)
- {
- material = efl_data_scope_get(data, EVAS_CANVAS3D_MATERIAL_CLASS);
- if (!material) continue;
- for (i = 0; i < EVAS_CANVAS3D_MATERIAL_ATTRIB_COUNT; i++)
- {
- if (material->attribs[i].texture)
- evas_canvas3d_texture_material_del(material->attribs[i].texture, data);
- }
- }
- eina_iterator_free(it);
-
- eina_hash_free(pd->materials);
- pd->materials = NULL;
- }
-
- if (pd->source)
- {
- _texture_proxy_unset(pd);
- }
-}
-
-static Eina_Bool
-_texture_material_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
- void *data EINA_UNUSED, void *fdata)
-{
- Evas_Canvas3D_Material *m = *(Evas_Canvas3D_Material **)key;
- evas_canvas3d_object_change(m, EVAS_CANVAS3D_STATE_MATERIAL_TEXTURE, (Evas_Canvas3D_Object *)fdata);
- return EINA_TRUE;
-}
-
-EOLIAN static void
-_evas_canvas3d_texture_evas_canvas3d_object_change_notify(Eo *obj, Evas_Canvas3D_Texture_Data *pd, Evas_Canvas3D_State state EINA_UNUSED, Evas_Canvas3D_Object *ref EINA_UNUSED)
-{
-
- if (pd->materials)
- eina_hash_foreach(pd->materials, _texture_material_change_notify, obj);
-}
-
-/* FIXME: This code is problematic as it actually does rendering and rely on the output before we start rendering. */
-EOLIAN static void
-_evas_canvas3d_texture_evas_canvas3d_object_update_notify(Eo *obj, Evas_Canvas3D_Texture_Data *pd)
-{
- if (pd->source)
- {
- Eo *evas = NULL;
- evas = evas_object_evas_get(obj);
- Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
- Evas_Object_Protected_Data *src = efl_data_scope_get(pd->source, EFL_CANVAS_OBJECT_CLASS);
-
- if (pd->engine_data == NULL)
- {
- if (e->engine.func->texture_new)
- {
- pd->engine_data =
- e->engine.func->texture_new(_evas_engine_context(e), pd->atlas_enable);
- }
-
- if (pd->engine_data == NULL)
- {
- ERR("Failed to create engine-side texture object.");
- return;
- }
- }
-
- if (src->proxy->surface && !src->proxy->redraw)
- {
- if (e->engine.func->texture_image_set)
- {
- e->engine.func->texture_image_set(_evas_engine_context(e),
- pd->engine_data,
- src->proxy->surface);
- }
- return;
-
- }
-
- pd->proxy_rendering = EINA_TRUE;
- _texture_proxy_subrender(obj, _evas_engine_context(e));
-
- if (e->engine.func->texture_image_set)
- e->engine.func->texture_image_set(_evas_engine_context(e),
- pd->engine_data,
- src->proxy->surface);
- pd->proxy_rendering = EINA_FALSE;
- }
-}
-
-void
-evas_canvas3d_texture_material_add(Evas_Canvas3D_Texture *texture, Evas_Canvas3D_Material *material)
-{
- int count = 0;
- Evas_Canvas3D_Texture_Data *pd = efl_data_scope_get(texture, MY_CLASS);
- if (pd->materials == NULL)
- {
- pd->materials = eina_hash_pointer_new(NULL);
-
- if (pd->materials == NULL)
- {
- ERR("Failed to create hash table.");
- return;
- }
- }
- else
- count = (int)(uintptr_t)eina_hash_find(pd->materials, &material);
-
- /* Increase reference count or add new one if not exist. */
- eina_hash_set(pd->materials, &material, (const void *)(uintptr_t)(count + 1));
-}
-
-void
-evas_canvas3d_texture_material_del(Evas_Canvas3D_Texture *texture, Evas_Canvas3D_Material *material)
-{
- int count = 0;
- Evas_Canvas3D_Texture_Data *pd = efl_data_scope_get(texture, MY_CLASS);
- if (pd->materials == NULL)
- {
- ERR("No material to delete.");
- return;
- }
-
- count = (int)(uintptr_t)eina_hash_find(pd->materials, &material);
-
- if (count == 1)
- eina_hash_del(pd->materials, &material, NULL);
- else
- eina_hash_set(pd->materials, &material, (const void *)(uintptr_t)(count - 1));
-}
-
-EAPI Evas_Canvas3D_Texture *
-evas_canvas3d_texture_add(Evas *e)
-{
- MAGIC_CHECK(e, Evas, MAGIC_EVAS);
- return NULL;
- MAGIC_CHECK_END();
- return efl_add(MY_CLASS, e);
-}
-
-
-EOLIAN static Eo *
-_evas_canvas3d_texture_efl_object_constructor(Eo *obj, Evas_Canvas3D_Texture_Data *pd EINA_UNUSED)
-{
- obj = efl_constructor(efl_super(obj, MY_CLASS));
- pd->atlas_enable = EINA_TRUE;
-
- evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_TEXTURE);
-
- return obj;
-}
-
-EOLIAN static void
-_evas_canvas3d_texture_efl_object_destructor(Eo *obj, Evas_Canvas3D_Texture_Data *pd)
-{
- eina_file_close(pd->f); // close matching open (matches open in _evas_canvas3d_texture_efl_file_load) OK
- pd->f = NULL;
- _texture_fini(obj);
- efl_destructor(efl_super(obj, MY_CLASS));
-}
-
-EOLIAN static void
-_evas_canvas3d_texture_data_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd,
- Evas_Colorspace color_format,
- int w, int h, const void *data)
-{
- Eo *evas = NULL;
- void *image = NULL;
- evas = evas_object_evas_get(obj);
- Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
-
- if (!pd->engine_data && e->engine.func->texture_new)
- pd->engine_data = e->engine.func->texture_new(_evas_engine_context(e), pd->atlas_enable);
- if (!data)
- {
- ERR("Failure, image data is empty");
- return;
- }
-
- image = e->engine.func->image_new_from_data(_evas_engine_context(e), w, h, (DATA32 *)data, EINA_TRUE, color_format);
- if (!image)
- {
- ERR("Can't load image from data");
- return;
- }
-
- if (e->engine.func->texture_image_set)
- e->engine.func->texture_image_set(_evas_engine_context(e),
- pd->engine_data,
- image);
- e->engine.func->image_free(_evas_engine_context(e), image);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_TEXTURE_DATA, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_texture_efl_file_unload(Eo *obj, Evas_Canvas3D_Texture_Data *pd)
-{
- efl_file_unload(efl_super(obj, MY_CLASS));
- eina_file_close(pd->f); // close matching open (matches open in _evas_canvas3d_texture_efl_file_load) OK
- pd->f = NULL;
- _texture_fini(obj);
-}
-
-EOLIAN static Eina_Error
-_evas_canvas3d_texture_efl_file_load(Eo *obj, Evas_Canvas3D_Texture_Data *pd)
-{
- Evas_Image_Load_Opts lo;
- int load_error;
- Eo *evas = NULL;
- void *image;
- const Eina_File *f;
- const char *key;
-
- if (efl_file_loaded_get(obj)) return 0;
-
- evas = evas_object_evas_get(obj);
- Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
-
- Eina_Error err = efl_file_load(efl_super(obj, MY_CLASS));
- if (err) return err;
-
- f = efl_file_mmap_get(obj);
- key = efl_file_key_get(obj);
-
- if (!pd->engine_data && e->engine.func->texture_new)
- pd->engine_data = e->engine.func->texture_new(_evas_engine_context(e), pd->atlas_enable);
-
- memset(&lo, 0x0, sizeof(Evas_Image_Load_Opts));
- image = e->engine.func->image_mmap(_evas_engine_context(e),
- (Eina_File *) f, key, &load_error, &lo);
- if (!image)
- {
- ERR("Can't load image from file");
- return EINA_FALSE;
- }
-
- if (e->engine.func->texture_image_set)
- e->engine.func->texture_image_set(_evas_engine_context(e),
- pd->engine_data,
- image);
-
- e->engine.func->image_free(_evas_engine_context(e), image);
-
- pd->f = eina_file_dup(f);
- pd->key = eina_stringshare_add(key);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_TEXTURE_DATA, NULL);
-
- return EINA_TRUE;
-}
-
-EAPI void
-_evas_canvas3d_texture_source_set(Eo *obj , Evas_Canvas3D_Texture_Data *pd, Evas_Object *source)
-{
- Eo *evas = NULL;
- evas = evas_object_evas_get(obj);
- Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
- Evas_Object_Protected_Data *src;
-
- if (source == pd->source)
- return;
-
- _texture_fini(obj);
-
- if (source == NULL)
- return;
-
- if (evas_object_evas_get(source) != evas)
- {
- ERR("Not matching canvas.");
- return;
- }
-
- src = efl_data_scope_get(source, EFL_CANVAS_OBJECT_CLASS);
-
- if (src->delete_me)
- {
- ERR("Source object is deleted.");
- return;
- }
-
- if (src->layer == NULL)
- {
- ERR("No evas surface associated with the source object.");
- return;
- }
- if (!pd->engine_data && e->engine.func->texture_new)
- pd->engine_data = e->engine.func->texture_new(_evas_engine_context(e), pd->atlas_enable);
-
- _texture_proxy_set(obj, source, src);
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_TEXTURE_DATA, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_texture_source_visible_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Texture_Data *pd, Eina_Bool visible)
-{
- Evas_Object_Protected_Data *src_obj;
-
- if (pd->source == NULL)
- return;
-
- src_obj = efl_data_scope_get(pd->source, EFL_CANVAS_OBJECT_CLASS);
-
- if (src_obj->proxy->src_invisible == !visible)
- return;
-
- EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, src_obj->proxy, Evas_Object_Proxy_Data, proxy_write)
- proxy_write->src_invisible = !visible;
- EINA_COW_WRITE_END(evas_object_proxy_cow, src_obj->proxy, proxy_write);
-
- src_obj->changed_src_visible = EINA_TRUE;
- evas_object_smart_member_cache_invalidate(pd->source, EINA_FALSE, EINA_FALSE, EINA_TRUE);
- evas_object_change(pd->source, src_obj);
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_texture_source_visible_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Texture_Data *pd)
-{
- Evas_Object_Protected_Data *src_obj;
-
- if (pd->source == NULL)
- return EINA_FALSE;
-
- src_obj = efl_data_scope_get(pd->source, EFL_CANVAS_OBJECT_CLASS);
- return !src_obj->proxy->src_invisible;
-}
-
-EOLIAN static Evas_Colorspace
-_evas_canvas3d_texture_color_format_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Texture_Data *pd)
-{
- Evas_Colorspace format = -1;
- Eo *evas = NULL;
- evas = evas_object_evas_get(obj);
- Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
-
- if (e->engine.func->image_colorspace_get &&
- e->engine.func->texture_image_get)
- {
- void *image;
-
- image = e->engine.func->texture_image_get(_evas_engine_context(e), pd->engine_data);
- format = e->engine.func->image_colorspace_get(_evas_engine_context(e), image);
- }
-
- return format;
-}
-
-EOLIAN static void
-_evas_canvas3d_texture_size_get(const Eo *obj, Evas_Canvas3D_Texture_Data *pd, int *w, int *h)
-{
- Eo *evas = NULL;
- evas = evas_object_evas_get(obj);
- Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
- if (e->engine.func->texture_size_get)
- {
- e->engine.func->texture_size_get(_evas_engine_context(e),
- pd->engine_data, w, h);
- }
-}
-
-EOLIAN static void
-_evas_canvas3d_texture_wrap_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd, Evas_Canvas3D_Wrap_Mode s, Evas_Canvas3D_Wrap_Mode t)
-{
- Eo *evas = NULL;
- evas = evas_object_evas_get(obj);
- Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
- if (e->engine.func->texture_wrap_set)
- {
- e->engine.func->texture_wrap_set(_evas_engine_context(e),
- pd->engine_data, s, t);
- }
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_TEXTURE_WRAP, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_texture_wrap_get(Eo *obj, Evas_Canvas3D_Texture_Data *pd, Evas_Canvas3D_Wrap_Mode *s, Evas_Canvas3D_Wrap_Mode *t)
-{
- Eo *evas = NULL;
- evas = evas_object_evas_get(obj);
- Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
- if (e->engine.func->texture_wrap_set)
- {
- e->engine.func->texture_wrap_get(_evas_engine_context(e),
- pd->engine_data, s, t);
- }
-}
-
-EOLIAN static void
-_evas_canvas3d_texture_filter_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd, Evas_Canvas3D_Texture_Filter min, Evas_Canvas3D_Texture_Filter mag)
-{
- Eo *evas = NULL;
- evas = evas_object_evas_get(obj);
- Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
- if (e->engine.func->texture_filter_set)
- {
- e->engine.func->texture_filter_set(_evas_engine_context(e),
- pd->engine_data, min, mag);
- }
- evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_TEXTURE_FILTER, NULL);
-}
-
-EOLIAN static void
-_evas_canvas3d_texture_filter_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Texture_Data *pd, Evas_Canvas3D_Texture_Filter *min, Evas_Canvas3D_Texture_Filter *mag)
-{
- Eo *evas = NULL;
- evas = evas_object_evas_get(obj);
- Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
- if (e->engine.func->texture_filter_get)
- {
- e->engine.func->texture_filter_get(_evas_engine_context(e),
- pd->engine_data, min, mag);
- }
-}
-
-EOLIAN static void
-_evas_canvas3d_texture_atlas_enable_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Texture_Data *pd, Eina_Bool use_atlas)
-{
- if (pd->atlas_enable != use_atlas) pd->atlas_enable = use_atlas;
-}
-
-EOLIAN static Eina_Bool
-_evas_canvas3d_texture_atlas_enable_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Texture_Data *pd)
-{
- return pd->atlas_enable;
-}
-#include "canvas/evas_canvas3d_texture.eo.c"
diff --git a/src/lib/evas/canvas/evas_canvas3d_texture.eo b/src/lib/evas/canvas/evas_canvas3d_texture.eo
deleted file mode 100644
index a680d299cc..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_texture.eo
+++ /dev/null
@@ -1,159 +0,0 @@
-type @beta @extern Evas_Colorspace: int; [[Evas colorspace type]] /* FIXME: Need to get emile migrated. */
-
-class @beta Evas.Canvas3D.Texture extends Evas.Canvas3D.Object implements Efl.File
-{
- [[Evas 3d canvas texture class]]
- data : Evas_Canvas3D_Texture_Data;
- methods {
- @property source_visible {
- [[The visibility flag of the source evas object of the given
- texture.
-
- Call \@ref evas_object_show on the source object
- and control the visibility using this function.
-
- By default the source object is visible.
-
- See also @.source_set.
- ]]
- set {
- }
- get {
- }
- values {
- visible: bool; [[$true for visible, $false for invisible.]]
- }
- }
- @property atlas_enable {
- [[Enable flag to generation texture unit with support atlas.
-
- Use this flag only when you cannot normalize texture coordinates.
-
- By default it is enabled.
- ]]
- set {
- }
- get {
- }
- values {
- use_atlas: bool; [[$true for enable, $false for disable.]]
- }
- }
- data_set {
- [[Set the data of the given texture.
-
- See also @Efl.File.file.set.
- ]]
-
- params {
- @in color_format: Evas_Colorspace; [[Color format of the texture.]]
- @in w: int; [[Width of the data.]]
- @in h: int; [[Height of the data.]]
- @in data: const(void_ptr); [[Pointer to the data.]]
- }
- }
-
- source_set {
- [[Set the data of the given texture from an evas object.
-
- Evas 3D support using existing evas object as a texture source.
- This feature make it possible using any existing evas object
- inside 3D scene.
-
- See also @.source_visible.set.
- ]]
-
- params {
- @in source: Efl.Canvas.Object; [[Source evas object to be used as
- the texture data.]]
- }
- }
-
- color_format_get @const {
- [[Get the color format of the given texture.
-
- EVAS_CANVAS3D_COLOR_FORMAT_RGBA will be returned if the texture
- has source object. Otherwise, the color format of the data will
- be returned.
-
- See also @.data_set, @Efl.File.file.set, @.source_set.
- ]]
- return: Evas_Colorspace; [[Color format of the given texture]]
- }
-
- size_get @const {
- [[Get the size of the given texture.
-
- If the texture has a source object, the size of the source object
- will be returned. Otherwise the size of the data (or image file)
- will be returned.
-
- See also @.data_set, @Efl.File.file.set, @.source_set.
- ]]
- params {
- @out w: int; [[Pointer to receive the width of the texture size.]]
- @out h: int; [[Pointer to receive the height of the texture size.]]
- }
- }
-
- wrap_set {
- [[Set the wrap mode of the given texture.
-
- If the texture coordinate exceed range [0.0, 1.0] the values are
- modified according to the wrap mode.
-
- Default wrap modes are both EVAS_CANVAS3D_WRAP_MODE_CLAMP for s and t.
- ]]
- params {
- @in s: Evas.Canvas3D.Wrap_Mode; [[Wrap mode for S-axis.]]
- @in t: Evas.Canvas3D.Wrap_Mode; [[Wrap mode for T-axis.]]
- }
- }
-
- wrap_get {
- [[Get the wrap mode of the given texture.
-
- See also @.wrap_set.
- ]]
- params {
- @out s: Evas.Canvas3D.Wrap_Mode; [[Pointer to receive S-axis wrap mode.]]
- @out t: Evas.Canvas3D.Wrap_Mode; [[Pointer to receive T-axis wrap mode.]]
- }
- }
-
- filter_set {
- [[Set the filter of the given texture.
-
- Default filters are both EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST for
- s and t.
- ]]
-
- params {
- @in min: Evas.Canvas3D.Texture_Filter; [[Minification filter used when down-scaling.]]
- @in mag: Evas.Canvas3D.Texture_Filter; [[Magnification filter used when up-scaling.]]
- }
- }
-
- filter_get @const {
- [[Get the filter of the given texture.
-
- See also @.filter_set.
- ]]
- params {
- @out min: Evas.Canvas3D.Texture_Filter; [[Pointer to receive the minification filter.]]
- @out mag: Evas.Canvas3D.Texture_Filter; [[Pointer to receive the magnification filter.]]
- }
- }
- }
-
- implements {
- Efl.Object.constructor;
- Efl.Object.destructor;
- Evas.Canvas3D.Object.update_notify;
- Evas.Canvas3D.Object.change_notify;
- Efl.File.load;
- Efl.File.unload;
- @empty Evas.Canvas3D.Object.callback_register;
- @empty Evas.Canvas3D.Object.callback_unregister;
- }
-}
diff --git a/src/lib/evas/canvas/evas_canvas3d_types.eot b/src/lib/evas/canvas/evas_canvas3d_types.eot
deleted file mode 100644
index 81e3030e19..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_types.eot
+++ /dev/null
@@ -1,293 +0,0 @@
-// ----------------------------------------------------------------------------
-// All the below types are for Evas 3D
-
-type @beta Evas.Real: double; [[A type for floating value]]
-
-enum @beta Evas.Canvas3D.Object_Type
-{
- [[Type of 3D Object
-
- @since 1.10]]
- invalid = 0, [[Evas 3D type: invalid]]
- scene, [[Evas 3D type: scene]]
- node, [[Evas 3D type: node]]
- camera, [[Evas 3D type: camera]]
- light, [[Evas 3D type: light]]
- model, [[Evas 3D type: model]]
- mesh, [[Evas 3D type: mesh]]
- texture, [[Evas 3D type: texture]]
- material, [[Evas 3D type: material]]
- primitive [[Evas 3D type: primitive
- @since 1.15]]
-}
-
-enum @beta Evas.Canvas3D.State
-{
- [[State of the Evas 3D
-
- @since 1.10]]
- max = 16, [[Evas 3D state: max]]
-
- any = 0, [[Evas 3D state: any]]
-
- scene_root_node = 1, [[Evas 3D state: scene root node]]
- scene_camera_node, [[Evas 3D state: scene camera node]]
- scene_background_color, [[Evas 3D state: scene background color]]
- scene_size, [[Evas 3D state: scene size]]
- scene_shadows_enabled, [[Evas 3D state: scene shadows enabled]]
- scene_updated, [[Evas 3D state: scene updated
- @since 1.14]]
- scene_shadows_depth, [[Evas 3D state: scene shadows depth]]
- scene_render_to_texture, [[Evas 3D state: scene render to texture]]
-
- texture_data = 1, [[Evas 3D state: texture data]]
- texture_wrap, [[Evas 3D state: texture wrap]]
- texture_filter, [[Evas 3D state: texture filter]]
-
- material_id = 1, [[Evas 3D state: material ID]]
- material_color, [[Evas 3D state: material color]]
- material_texture, [[Evas 3D state: material texture]]
-
- mesh_vertex_count = 1, [[Evas 3D state: mesh vertex count]]
- mesh_frame, [[Evas 3D state: mesh frame]]
- mesh_material, [[Evas 3D state: mesh material]]
- mesh_transform, [[Evas 3D state: mesh transform]]
- mesh_vertex_data, [[Evas 3D state: mesh vertex data]]
- mesh_index_data, [[Evas 3D state: mesh index data]]
- mesh_vertex_assembly, [[Evas 3D state: mesh vertex assembly]]
- mesh_shader_mode, [[Evas 3D state: mesh shader mode]]
- mesh_fog, [[Evas 3D state: mesh fog]]
- mesh_blending, [[Evas 3D state: mesh blending]]
- mesh_alpha_test, [[Evas 3D state: mesh alpha test]]
- mesh_color_pick, [[Evas 3D state: mesh color pick]]
- mesh_shadows_edges_filtering, [[Evas 3D state: mesh shadows edges filtering]]
- mesh_shadows_constant_bias, [[Evas 3D state: mesh shadows constant bias]]
-
- camera_projection = 1, [[Evas 3D state: camera projection]]
-
- light_ambient = 1, [[Evas 3D state: light ambient]]
- light_diffuse, [[Evas 3D state: light diffuse]]
- light_specular, [[Evas 3D state: light specular]]
- light_spot_dir, [[Evas 3D state: light spot dir]]
- light_spot_exp, [[Evas 3D state: light spot exp]]
- light_spot_cutoff, [[Evas 3D state: light spot cutoff]]
- light_attenuation, [[Evas 3D state: light attenuation]]
- light_projection, [[Evas 3D state: light projection]]
-
- node_transform_position = 1, [[Evas 3D state: node transform position]]
- node_transform_orientation, [[Evas 3D state: node transform orientation]]
- node_transform_scale, [[Evas 3D state: node transform scale]]
- node_mesh_geometry, [[Evas 3D state: node mesh geometry]]
- node_mesh_material, [[Evas 3D state: node mesh material]]
- node_mesh_frame, [[Evas 3D state: node mesh frame]]
- node_mesh_shader_mode, [[Evas 3D state: node mesh shader mode]]
- node_mesh_material_id, [[Evas 3D state: node mesh material ID]]
- node_light, [[Evas 3D state: node light]]
- node_camera, [[Evas 3D state: node camera]]
- node_parent_position, [[Evas 3D state: node parent position]]
- node_parent_orientation, [[Evas 3D state: node parent orientation]]
- node_parent_scale, [[Evas 3D state: node parent scale]]
- node_member, [[Evas 3D state: node member]]
- node_parent_billboard, [[Evas 3D state: node parent billboard
- @since 1.14]]
- node_lod [[Evas 3D state: node lod
- @since 1.18]]
-}
-
-enum @beta Evas.Canvas3D.Space
-{
- [[Transform space
-
- @since 1.10]]
- local = 0, [[Local coordinate space]]
- parent, [[Parent coordinate space]]
- world [[World coordinate space]]
-}
-
-enum @beta Evas.Canvas3D.Node_Type
-{
- [[Types of a node
-
- @since 1.10]]
- unknown = -1, [[Unknown node type @since 1.21]]
- node = 0, [[Node with no items]]
- camera, [[Node which can contain camera object]]
- light, [[Node which can contain light object]]
- mesh [[Node which can contain mesh objects]]
-}
-
-enum @beta Evas.Canvas3D.Node_Orientation_Type
-{
- [[Types of node orientation
-
- @since 1.13]]
- none = 0, [[Node with no orientation properties]]
- look_at, [[Node orientation is given as a point to look at and a vector that indicates the angle at which the subject is looking at the point]]
- look_to, [[Node orientation is given as id of another part to look at and a vector that indicates the angle at which the subject is looking at the part]]
- angle_axis, [[Node orientation is given as an angle and an axis to rotate around]]
- quaternion [[Node orientation is given as a quaternion]]
-}
-
-enum @beta Evas.Canvas3D.Index_Format
-{
- [[Index formats
-
- @since 1.10]]
- none = 0, [[Indexing is not used]]
- unsigned_byte, [[Index is of type unsigned byte]]
- unsigned_short [[Index is of type unsigned short]]
-}
-
-enum @beta Evas.Canvas3D.Frustum_Mode
-{
- [[Frustum modes
-
- @since 1.12]]
- bsphere, [[Bounding sphere]]
- aabb, [[Axis-aligned bounding box]]
- central_point [[Central point]]
-}
-
-enum @beta Evas.Canvas3D.Vertex_Assembly
-{
- [[Vertex assembly modes. Vertex assembly represents how the vertices are organized into geometric primitives.
-
- @since 1.10]]
- points = 0, [[A vertex is rendered as a point]]
- lines, [[Two vertices are organized as a line]]
- line_strip, [[Vertices are organized as a connected line path]]
- line_loop, [[Vertices are organized as a closed line path]]
- triangles, [[Three vertices are organized as a triangle]]
- triangle_strip, [[Vertices are organized as connected triangles]]
- triangle_fan [[Vertices are organized as a triangle fan]]
-}
-
-enum @beta Evas.Canvas3D.Comparison
-{
- [[Comparsion functions for testing(alpha, depth, stencil) in fragment shader
-
- @since 1.14]]
- never, [[Never passes]]
- less, [[Passes if the incoming value is less than the reference value]]
- equal, [[Passes if the incoming value is equal to the reference value]]
- lequal, [[Passes if the incoming value is less than or equal to the reference value]]
- greater, [[Passes if the incoming value is greater than the reference value]]
- notequal, [[Passes if the incoming value is not equal to the reference value]]
- gequal, [[Passes if the incoming value is greater than or equal to the reference value]]
- always [[Always passes (initial value)]]
-}
-
-enum @beta Evas.Canvas3D.Wrap_Mode
-{
- [[Wrap modes for texture units
-
- @since 1.14]]
- clamp = 0, [[Values will be clamped to be in range (min, max)]]
- repeat, [[Values will be repeated]]
- reflect [[Values will be repeated in a reflected manner]]
-}
-
-enum @beta Evas.Canvas3D.Texture_Filter
-{
- [[Filters for texture units
-
- @since 1.14]]
- nearest = 0, [[Samples nearest texel]]
- linear, [[Lineary interpolate nearby texels]]
- nearest_mipmap_nearest, [[Nearest sampling mipmap]]
- linear_mipmap_nearest, [[Nearest sampling mipmap and interpolate]]
- nearest_mipmap_linear, [[Linear sampling in nearest mipmap]]
- linear_mipmap_linear [[Linear sampling in mipmap and interpolate]]
-}
-
-enum @beta Evas.Canvas3D.Mesh_Primitive
-{
- [[Mesh primitive
-
- @since 1.12]]
- none = 0, [[An empty space]]
- square, [[One sided square]]
- cube, [[Cube primitive]]
- cylinder, [[Cylinder (can use precision and texture scale)]]
- cone, [[Cone (can use precision and texture scale)]]
- sphere, [[Sphere (can use precision and texture scale)]]
- torus, [[Torus (can use ratio, precision and texture scale)]]
- surface, [[Custom surface (can use pointer to users function, precision and texture scale)]]
- terrain, [[Terrain as surface with pointer to perlin's noise function]]
- count [[Sentinel value to indicate last enum field during iteration]]
-}
-
-enum @beta Evas.Canvas3D.Primitive_Mode
-{
- [[Mode of mesh primitive
-
- @since 1.15]]
- default = 0, [[Default mode of primitive]]
- without_base, [[Primitive without base (supported for cylinder and cone)]]
- alternative_uv [[Ptimitive with alternative uv (supported for sphere)]]
-}
-
-enum @beta Evas.Canvas3D.Shader_Mode
-{
- [[Shader shade modes
-
- @since 1.10]]
- vertex_color = 0, [[Shaded using vertex color attribute]]
- diffuse, [[Shaded using material diffuse term]]
- flat, [[Per-vertex flat lighting]]
- phong, [[Per-pixel phong shading]]
- normal_map, [[Per-pixel normal map shading]]
- shadow_map_render, [[Fragment color is defined by its z-coord]]
- color_pick, [[Rendering to additional frame bufer]]
- parallax_occlusion, [[Per-pixel parallax occlusion map shading]]
- post_processing_FXAA [[Render full screen quard]]
-}
-
-enum @beta Evas.Canvas3D.Vertex_Attrib
-{
- [[Vertex attribute IDs
-
- @since 1.10]]
- position = 0, [[vertex position]]
- normal, [[vertex normal]]
- tangent, [[vertex tangent (for normal mapping)]]
- color, [[vertex color]]
- texcoord [[vertex texture coordinate]]
-}
-
-enum @beta Evas.Canvas3D.Blend_Func
-{
- [[Blending function
-
- @since 1.14]]
-
- zero = 0, [[The scale factors for color components is (0, 0, 0, 0)]]
- one, [[The scale factors for color components is (1, 1, 1, 1)]]
- src_color, [[The scale factors for color components is (rs/kr, gs/kg, bs/kb, as/ka)]]
- one_minus_src_color, [[The scale factors for color components is (1, 1, 1, 1) - (rs/kr, gs/kg, bs/kb, as/ka)]]
- dst_color, [[The scale factors for color components is (rd/kr, gd/kg, bd/kb, ad/ka)]]
- one_minus_dst_color, [[The scale factors for color components is (1, 1, 1, 1) - (rd/kr, gd/kg, bd/kb, ad/ka)]]
- src_alpha, [[The scale factors for color components is (as/ka, as/ka, as/ka, as/ka)]]
- one_minus_src_alpha, [[The scale factors for color components is (1, 1, 1, 1) - (as/ka, as/ka, as/ka, as/ka)]]
- dst_alpha, [[The scale factors for color components is (ad/ka, ad/ka, ad/ka, ad/ka)]]
- one_minus_dst_alpha, [[The scale factors for color components is (1, 1, 1, 1) - (ad/ka, ad/ka, ad/ka, ad/ka)]]
- constant_color, [[The scale factors for color components is (rc, gc, bc, ac)]]
- one_minus_constant_color, [[The scale factors for color components is (1, 1, 1, 1) - (rc, gc, bc, ac)]]
- constant_alpha, [[The scale factors for color components is (ac, ac, ac, ac)]]
- one_minus_constant_alpha, [[The scale factors for color components is (1, 1, 1, 1) - (ac, ac, ac, ac)]]
- src_alpha_saturate [[The scale factors for color components is (i, i, i, 1) where i = min(as, ka, ad)/ka]]
-}
-
-enum @beta Evas.Canvas3D.Material_Attrib
-{
- [[Material attributes
-
- @since 1.10]]
- ambient = 0, [[ambient term]]
- diffuse, [[diffuse term]]
- specular, [[specular term]]
- emission, [[emission term]]
- normal [[Normal map term]]
-}
-
-type @beta Evas.Canvas3D.Surface_Func: __undefined_type; [[Evas 3D canvas surface function type]]
diff --git a/src/lib/evas/canvas/evas_canvas_eo.c b/src/lib/evas/canvas/evas_canvas_eo.c
index 2f618ce37c..3b7357f54e 100644
--- a/src/lib/evas/canvas/evas_canvas_eo.c
+++ b/src/lib/evas/canvas/evas_canvas_eo.c
@@ -17,7 +17,7 @@ __eolian_evas_canvas_image_cache_set_reflect(Eo *obj, Eina_Value val)
return r;
}
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_image_cache_set, EFL_FUNC_CALL(size), int size);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_image_cache_set, EFL_FUNC_CALL(size), int size);
int _evas_canvas_image_cache_get(const Eo *obj, Evas_Public_Data *pd);
@@ -29,15 +29,15 @@ __eolian_evas_canvas_image_cache_get_reflect(const Eo *obj)
return eina_value_int_init(val);
}
-EOAPI EFL_FUNC_BODY_CONST(evas_canvas_image_cache_get, int, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_canvas_image_cache_get, int, 0);
void _evas_canvas_event_default_flags_set(Eo *obj, Evas_Public_Data *pd, Evas_Event_Flags flags);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_event_default_flags_set, EFL_FUNC_CALL(flags), Evas_Event_Flags flags);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_event_default_flags_set, EFL_FUNC_CALL(flags), Evas_Event_Flags flags);
Evas_Event_Flags _evas_canvas_event_default_flags_get(const Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_canvas_event_default_flags_get, Evas_Event_Flags, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_canvas_event_default_flags_get, Evas_Event_Flags, 0);
void _evas_canvas_font_cache_set(Eo *obj, Evas_Public_Data *pd, int size);
@@ -57,7 +57,7 @@ __eolian_evas_canvas_font_cache_set_reflect(Eo *obj, Eina_Value val)
return r;
}
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_font_cache_set, EFL_FUNC_CALL(size), int size);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_font_cache_set, EFL_FUNC_CALL(size), int size);
int _evas_canvas_font_cache_get(const Eo *obj, Evas_Public_Data *pd);
@@ -69,251 +69,251 @@ __eolian_evas_canvas_font_cache_get_reflect(const Eo *obj)
return eina_value_int_init(val);
}
-EOAPI EFL_FUNC_BODY_CONST(evas_canvas_font_cache_get, int, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_canvas_font_cache_get, int, 0);
void _evas_canvas_data_attach_set(Eo *obj, Evas_Public_Data *pd, void *data);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_data_attach_set, EFL_FUNC_CALL(data), void *data);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_data_attach_set, EFL_FUNC_CALL(data), void *data);
void *_evas_canvas_data_attach_get(const Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_canvas_data_attach_get, void *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_canvas_data_attach_get, void *, NULL);
Efl_Canvas_Object *_evas_canvas_focus_get(const Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_canvas_focus_get, Efl_Canvas_Object *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_canvas_focus_get, Efl_Canvas_Object *, NULL);
Efl_Canvas_Object *_evas_canvas_seat_focus_get(const Eo *obj, Evas_Public_Data *pd, Evas_Device *seat);
-EOAPI EFL_FUNC_BODYV_CONST(evas_canvas_seat_focus_get, Efl_Canvas_Object *, NULL, EFL_FUNC_CALL(seat), Evas_Device *seat);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_canvas_seat_focus_get, Efl_Canvas_Object *, NULL, EFL_FUNC_CALL(seat), Evas_Device *seat);
Efl_Canvas_Object *_evas_canvas_object_top_get(const Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_canvas_object_top_get, Efl_Canvas_Object *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_canvas_object_top_get, Efl_Canvas_Object *, NULL);
void _evas_canvas_pointer_canvas_xy_by_device_get(const Eo *obj, Evas_Public_Data *pd, Evas_Device *dev, int *x, int *y);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_canvas_pointer_canvas_xy_by_device_get, EFL_FUNC_CALL(dev, x, y), Evas_Device *dev, int *x, int *y);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_canvas_pointer_canvas_xy_by_device_get, EFL_FUNC_CALL(dev, x, y), Evas_Device *dev, int *x, int *y);
void _evas_canvas_pointer_canvas_xy_get(const Eo *obj, Evas_Public_Data *pd, int *x, int *y);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_canvas_pointer_canvas_xy_get, EFL_FUNC_CALL(x, y), int *x, int *y);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_canvas_pointer_canvas_xy_get, EFL_FUNC_CALL(x, y), int *x, int *y);
int _evas_canvas_event_down_count_get(const Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_canvas_event_down_count_get, int, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_canvas_event_down_count_get, int, 0);
int _evas_canvas_smart_objects_calculate_count_get(const Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_canvas_smart_objects_calculate_count_get, int, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_canvas_smart_objects_calculate_count_get, int, 0);
Eina_Bool _evas_canvas_focus_state_get(const Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_canvas_focus_state_get, Eina_Bool, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_canvas_focus_state_get, Eina_Bool, 0);
Eina_Bool _evas_canvas_seat_focus_state_get(const Eo *obj, Evas_Public_Data *pd, Evas_Device *seat);
-EOAPI EFL_FUNC_BODYV_CONST(evas_canvas_seat_focus_state_get, Eina_Bool, 0, EFL_FUNC_CALL(seat), Evas_Device *seat);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_canvas_seat_focus_state_get, Eina_Bool, 0, EFL_FUNC_CALL(seat), Evas_Device *seat);
Eina_Bool _evas_canvas_changed_get(const Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_canvas_changed_get, Eina_Bool, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_canvas_changed_get, Eina_Bool, 0);
void _evas_canvas_pointer_output_xy_by_device_get(const Eo *obj, Evas_Public_Data *pd, Evas_Device *dev, int *x, int *y);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_canvas_pointer_output_xy_by_device_get, EFL_FUNC_CALL(dev, x, y), Evas_Device *dev, int *x, int *y);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_canvas_pointer_output_xy_by_device_get, EFL_FUNC_CALL(dev, x, y), Evas_Device *dev, int *x, int *y);
void _evas_canvas_pointer_output_xy_get(const Eo *obj, Evas_Public_Data *pd, int *x, int *y);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_canvas_pointer_output_xy_get, EFL_FUNC_CALL(x, y), int *x, int *y);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_canvas_pointer_output_xy_get, EFL_FUNC_CALL(x, y), int *x, int *y);
Efl_Canvas_Object *_evas_canvas_object_bottom_get(const Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_canvas_object_bottom_get, Efl_Canvas_Object *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_canvas_object_bottom_get, Efl_Canvas_Object *, NULL);
unsigned int _evas_canvas_pointer_button_down_mask_by_device_get(const Eo *obj, Evas_Public_Data *pd, Evas_Device *dev);
-EOAPI EFL_FUNC_BODYV_CONST(evas_canvas_pointer_button_down_mask_by_device_get, unsigned int, 0, EFL_FUNC_CALL(dev), Evas_Device *dev);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_canvas_pointer_button_down_mask_by_device_get, unsigned int, 0, EFL_FUNC_CALL(dev), Evas_Device *dev);
unsigned int _evas_canvas_pointer_button_down_mask_get(const Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_canvas_pointer_button_down_mask_get, unsigned int, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_canvas_pointer_button_down_mask_get, unsigned int, 0);
Eina_List *_evas_canvas_tree_objects_at_xy_get(Eo *obj, Evas_Public_Data *pd, Efl_Canvas_Object *stop, int x, int y);
-EOAPI EFL_FUNC_BODYV(evas_canvas_tree_objects_at_xy_get, Eina_List *, NULL, EFL_FUNC_CALL(stop, x, y), Efl_Canvas_Object *stop, int x, int y);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_canvas_tree_objects_at_xy_get, Eina_List *, NULL, EFL_FUNC_CALL(stop, x, y), Efl_Canvas_Object *stop, int x, int y);
void _evas_canvas_key_lock_on(Eo *obj, Evas_Public_Data *pd, const char *keyname);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_key_lock_on, EFL_FUNC_CALL(keyname), const char *keyname);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_key_lock_on, EFL_FUNC_CALL(keyname), const char *keyname);
void _evas_canvas_seat_key_lock_on(Eo *obj, Evas_Public_Data *pd, const char *keyname, Evas_Device *seat);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_seat_key_lock_on, EFL_FUNC_CALL(keyname, seat), const char *keyname, Evas_Device *seat);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_seat_key_lock_on, EFL_FUNC_CALL(keyname, seat), const char *keyname, Evas_Device *seat);
void _evas_canvas_seat_key_lock_off(Eo *obj, Evas_Public_Data *pd, const char *keyname, Evas_Device *seat);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_seat_key_lock_off, EFL_FUNC_CALL(keyname, seat), const char *keyname, Evas_Device *seat);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_seat_key_lock_off, EFL_FUNC_CALL(keyname, seat), const char *keyname, Evas_Device *seat);
void _evas_canvas_key_modifier_add(Eo *obj, Evas_Public_Data *pd, const char *keyname);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_key_modifier_add, EFL_FUNC_CALL(keyname), const char *keyname);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_key_modifier_add, EFL_FUNC_CALL(keyname), const char *keyname);
void _evas_canvas_key_modifier_off(Eo *obj, Evas_Public_Data *pd, const char *keyname);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_key_modifier_off, EFL_FUNC_CALL(keyname), const char *keyname);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_key_modifier_off, EFL_FUNC_CALL(keyname), const char *keyname);
Eina_Bool _evas_canvas_render_async(Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_FUNC_BODY(evas_canvas_render_async, Eina_Bool, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY(evas_canvas_render_async, Eina_Bool, 0);
void _evas_canvas_focus_out(Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_VOID_FUNC_BODY(evas_canvas_focus_out);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(evas_canvas_focus_out);
void _evas_canvas_norender(Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_VOID_FUNC_BODY(evas_canvas_norender);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(evas_canvas_norender);
void _evas_canvas_nochange_pop(Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_VOID_FUNC_BODY(evas_canvas_nochange_pop);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(evas_canvas_nochange_pop);
void _evas_canvas_key_lock_off(Eo *obj, Evas_Public_Data *pd, const char *keyname);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_key_lock_off, EFL_FUNC_CALL(keyname), const char *keyname);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_key_lock_off, EFL_FUNC_CALL(keyname), const char *keyname);
void _evas_canvas_nochange_push(Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_VOID_FUNC_BODY(evas_canvas_nochange_push);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(evas_canvas_nochange_push);
void _evas_canvas_font_cache_flush(Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_VOID_FUNC_BODY(evas_canvas_font_cache_flush);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(evas_canvas_font_cache_flush);
void _evas_canvas_key_modifier_on(Eo *obj, Evas_Public_Data *pd, const char *keyname);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_key_modifier_on, EFL_FUNC_CALL(keyname), const char *keyname);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_key_modifier_on, EFL_FUNC_CALL(keyname), const char *keyname);
void _evas_canvas_seat_key_modifier_on(Eo *obj, Evas_Public_Data *pd, const char *keyname, Evas_Device *seat);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_seat_key_modifier_on, EFL_FUNC_CALL(keyname, seat), const char *keyname, Evas_Device *seat);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_seat_key_modifier_on, EFL_FUNC_CALL(keyname, seat), const char *keyname, Evas_Device *seat);
void _evas_canvas_seat_key_modifier_off(Eo *obj, Evas_Public_Data *pd, const char *keyname, Evas_Device *seat);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_seat_key_modifier_off, EFL_FUNC_CALL(keyname, seat), const char *keyname, Evas_Device *seat);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_seat_key_modifier_off, EFL_FUNC_CALL(keyname, seat), const char *keyname, Evas_Device *seat);
Eina_List *_evas_canvas_font_available_list(const Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_canvas_font_available_list, Eina_List *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_canvas_font_available_list, Eina_List *, NULL);
Efl_Canvas_Object *_evas_canvas_object_name_find(const Eo *obj, Evas_Public_Data *pd, const char *name);
-EOAPI EFL_FUNC_BODYV_CONST(evas_canvas_object_name_find, Efl_Canvas_Object *, NULL, EFL_FUNC_CALL(name), const char *name);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_canvas_object_name_find, Efl_Canvas_Object *, NULL, EFL_FUNC_CALL(name), const char *name);
void _evas_canvas_font_path_append(Eo *obj, Evas_Public_Data *pd, const char *path);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_font_path_append, EFL_FUNC_CALL(path), const char *path);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_font_path_append, EFL_FUNC_CALL(path), const char *path);
void _evas_canvas_font_path_clear(Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_VOID_FUNC_BODY(evas_canvas_font_path_clear);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(evas_canvas_font_path_clear);
void _evas_canvas_touch_point_list_nth_xy_get(Eo *obj, Evas_Public_Data *pd, unsigned int n, double *x, double *y);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_touch_point_list_nth_xy_get, EFL_FUNC_CALL(n, x, y), unsigned int n, double *x, double *y);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_touch_point_list_nth_xy_get, EFL_FUNC_CALL(n, x, y), unsigned int n, double *x, double *y);
void _evas_canvas_key_lock_del(Eo *obj, Evas_Public_Data *pd, const char *keyname);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_key_lock_del, EFL_FUNC_CALL(keyname), const char *keyname);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_key_lock_del, EFL_FUNC_CALL(keyname), const char *keyname);
void _evas_canvas_damage_rectangle_add(Eo *obj, Evas_Public_Data *pd, int x, int y, int w, int h);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_damage_rectangle_add, EFL_FUNC_CALL(x, y, w, h), int x, int y, int w, int h);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_damage_rectangle_add, EFL_FUNC_CALL(x, y, w, h), int x, int y, int w, int h);
void _evas_canvas_sync(Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_VOID_FUNC_BODY(evas_canvas_sync);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(evas_canvas_sync);
const Eina_List *_evas_canvas_font_path_list(const Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_canvas_font_path_list, const Eina_List *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_canvas_font_path_list, const Eina_List *, NULL);
void _evas_canvas_image_cache_reload(Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_VOID_FUNC_BODY(evas_canvas_image_cache_reload);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(evas_canvas_image_cache_reload);
int _evas_canvas_coord_world_x_to_screen(const Eo *obj, Evas_Public_Data *pd, int x);
-EOAPI EFL_FUNC_BODYV_CONST(evas_canvas_coord_world_x_to_screen, int, 0, EFL_FUNC_CALL(x), int x);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_canvas_coord_world_x_to_screen, int, 0, EFL_FUNC_CALL(x), int x);
Eina_List *_evas_canvas_render_updates(Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_FUNC_BODY(evas_canvas_render_updates, Eina_List *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY(evas_canvas_render_updates, Eina_List *, NULL);
void _evas_canvas_image_cache_flush(Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_VOID_FUNC_BODY(evas_canvas_image_cache_flush);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(evas_canvas_image_cache_flush);
int _evas_canvas_coord_screen_y_to_world(const Eo *obj, Evas_Public_Data *pd, int y);
-EOAPI EFL_FUNC_BODYV_CONST(evas_canvas_coord_screen_y_to_world, int, 0, EFL_FUNC_CALL(y), int y);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_canvas_coord_screen_y_to_world, int, 0, EFL_FUNC_CALL(y), int y);
void _evas_canvas_key_modifier_del(Eo *obj, Evas_Public_Data *pd, const char *keyname);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_key_modifier_del, EFL_FUNC_CALL(keyname), const char *keyname);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_key_modifier_del, EFL_FUNC_CALL(keyname), const char *keyname);
void _evas_canvas_focus_in(Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_VOID_FUNC_BODY(evas_canvas_focus_in);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(evas_canvas_focus_in);
void _evas_canvas_seat_focus_in(Eo *obj, Evas_Public_Data *pd, Evas_Device *seat);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_seat_focus_in, EFL_FUNC_CALL(seat), Evas_Device *seat);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_seat_focus_in, EFL_FUNC_CALL(seat), Evas_Device *seat);
void _evas_canvas_seat_focus_out(Eo *obj, Evas_Public_Data *pd, Evas_Device *seat);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_seat_focus_out, EFL_FUNC_CALL(seat), Evas_Device *seat);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_seat_focus_out, EFL_FUNC_CALL(seat), Evas_Device *seat);
void _evas_canvas_obscured_rectangle_add(Eo *obj, Evas_Public_Data *pd, int x, int y, int w, int h);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_obscured_rectangle_add, EFL_FUNC_CALL(x, y, w, h), int x, int y, int w, int h);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_obscured_rectangle_add, EFL_FUNC_CALL(x, y, w, h), int x, int y, int w, int h);
void _evas_canvas_render_dump(Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_VOID_FUNC_BODY(evas_canvas_render_dump);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(evas_canvas_render_dump);
void _evas_canvas_render(Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_VOID_FUNC_BODY(evas_canvas_render);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(evas_canvas_render);
void _evas_canvas_font_path_prepend(Eo *obj, Evas_Public_Data *pd, const char *path);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_font_path_prepend, EFL_FUNC_CALL(path), const char *path);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_font_path_prepend, EFL_FUNC_CALL(path), const char *path);
void _evas_canvas_obscured_clear(Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_VOID_FUNC_BODY(evas_canvas_obscured_clear);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(evas_canvas_obscured_clear);
int _evas_canvas_coord_screen_x_to_world(const Eo *obj, Evas_Public_Data *pd, int x);
-EOAPI EFL_FUNC_BODYV_CONST(evas_canvas_coord_screen_x_to_world, int, 0, EFL_FUNC_CALL(x), int x);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_canvas_coord_screen_x_to_world, int, 0, EFL_FUNC_CALL(x), int x);
void _evas_canvas_key_lock_add(Eo *obj, Evas_Public_Data *pd, const char *keyname);
-EOAPI EFL_VOID_FUNC_BODYV(evas_canvas_key_lock_add, EFL_FUNC_CALL(keyname), const char *keyname);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_canvas_key_lock_add, EFL_FUNC_CALL(keyname), const char *keyname);
void _evas_canvas_render_idle_flush(Eo *obj, Evas_Public_Data *pd);
-EOAPI EFL_VOID_FUNC_BODY(evas_canvas_render_idle_flush);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(evas_canvas_render_idle_flush);
Evas_Device *_evas_canvas_default_device_get(const Eo *obj, Evas_Public_Data *pd, Evas_Device_Class type);
-EOAPI EFL_FUNC_BODYV_CONST(evas_canvas_default_device_get, Evas_Device *, NULL, EFL_FUNC_CALL(type), Evas_Device_Class type);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_canvas_default_device_get, Evas_Device *, NULL, EFL_FUNC_CALL(type), Evas_Device_Class type);
int _evas_canvas_coord_world_y_to_screen(const Eo *obj, Evas_Public_Data *pd, int y);
-EOAPI EFL_FUNC_BODYV_CONST(evas_canvas_coord_world_y_to_screen, int, 0, EFL_FUNC_CALL(y), int y);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_canvas_coord_world_y_to_screen, int, 0, EFL_FUNC_CALL(y), int y);
Efl_Object *_evas_canvas_efl_object_constructor(Eo *obj, Evas_Public_Data *pd);
diff --git a/src/lib/evas/canvas/evas_canvas_eo.h b/src/lib/evas/canvas/evas_canvas_eo.h
index 938d59fcee..241ad9ccff 100644
--- a/src/lib/evas/canvas/evas_canvas_eo.h
+++ b/src/lib/evas/canvas/evas_canvas_eo.h
@@ -19,7 +19,7 @@ typedef Eo Evas_Canvas;
*/
#define EVAS_CANVAS_CLASS evas_canvas_class_get()
-EWAPI const Efl_Class *evas_canvas_class_get(void);
+EVAS_API EVAS_API_WEAK const Efl_Class *evas_canvas_class_get(void) EINA_CONST;
/**
* @brief Set the image cache.
@@ -31,7 +31,7 @@ EWAPI const Efl_Class *evas_canvas_class_get(void);
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_image_cache_set(Eo *obj, int size);
+EVAS_API EVAS_API_WEAK void evas_canvas_image_cache_set(Eo *obj, int size);
/**
* @brief Get the image cache.
@@ -44,7 +44,7 @@ EOAPI void evas_canvas_image_cache_set(Eo *obj, int size);
*
* @ingroup Evas_Canvas
*/
-EOAPI int evas_canvas_image_cache_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK int evas_canvas_image_cache_get(const Eo *obj);
/**
* @brief Set the default set of flags an event begins with
@@ -60,7 +60,7 @@ EOAPI int evas_canvas_image_cache_get(const Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_event_default_flags_set(Eo *obj, Evas_Event_Flags flags);
+EVAS_API EVAS_API_WEAK void evas_canvas_event_default_flags_set(Eo *obj, Evas_Event_Flags flags);
/**
* @brief Get the default set of flags an event begins with
@@ -75,7 +75,7 @@ EOAPI void evas_canvas_event_default_flags_set(Eo *obj, Evas_Event_Flags flags);
*
* @ingroup Evas_Canvas
*/
-EOAPI Evas_Event_Flags evas_canvas_event_default_flags_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK Evas_Event_Flags evas_canvas_event_default_flags_get(const Eo *obj);
/**
* @brief Changes the size of font cache of the given evas.
@@ -85,7 +85,7 @@ EOAPI Evas_Event_Flags evas_canvas_event_default_flags_get(const Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_font_cache_set(Eo *obj, int size);
+EVAS_API EVAS_API_WEAK void evas_canvas_font_cache_set(Eo *obj, int size);
/**
* @brief Get the size of font cache of the given evas in bytes.
@@ -96,7 +96,7 @@ EOAPI void evas_canvas_font_cache_set(Eo *obj, int size);
*
* @ingroup Evas_Canvas
*/
-EOAPI int evas_canvas_font_cache_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK int evas_canvas_font_cache_get(const Eo *obj);
/**
* @brief Attaches a specific pointer to the evas for fetching later.
@@ -106,7 +106,7 @@ EOAPI int evas_canvas_font_cache_get(const Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_data_attach_set(Eo *obj, void *data);
+EVAS_API EVAS_API_WEAK void evas_canvas_data_attach_set(Eo *obj, void *data);
/**
* @brief Returns the pointer attached by @ref evas_canvas_data_attach_set.
@@ -117,7 +117,7 @@ EOAPI void evas_canvas_data_attach_set(Eo *obj, void *data);
*
* @ingroup Evas_Canvas
*/
-EOAPI void *evas_canvas_data_attach_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK void *evas_canvas_data_attach_get(const Eo *obj);
/**
* @brief Retrieve the object focused by the default seat.
@@ -135,9 +135,7 @@ EOAPI void *evas_canvas_data_attach_get(const Eo *obj);
*
* See also @ref evas_object_focus_set, @ref evas_object_focus_get, @ref
* evas_object_key_grab, @ref evas_object_key_ungrab,
- * @ref evas_canvas_seat_focus_get, @ref efl_canvas_object_seat_focus_check,
- * @ref efl_canvas_object_seat_focus_add,
- * @ref efl_canvas_object_seat_focus_del.
+ * @ref evas_canvas_seat_focus_get
*
* @param[in] obj The object.
*
@@ -145,7 +143,7 @@ EOAPI void *evas_canvas_data_attach_get(const Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI Efl_Canvas_Object *evas_canvas_focus_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Efl_Canvas_Object *evas_canvas_focus_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Return the focused object by a given seat.
@@ -161,7 +159,7 @@ EOAPI Efl_Canvas_Object *evas_canvas_focus_get(const Eo *obj) EINA_WARN_UNUSED_R
*
* @ingroup Evas_Canvas
*/
-EOAPI Efl_Canvas_Object *evas_canvas_seat_focus_get(const Eo *obj, Evas_Device *seat);
+EVAS_API EVAS_API_WEAK Efl_Canvas_Object *evas_canvas_seat_focus_get(const Eo *obj, Evas_Device *seat);
/**
* @brief Get the highest (stacked) Evas object on the canvas @c e.
@@ -181,7 +179,7 @@ EOAPI Efl_Canvas_Object *evas_canvas_seat_focus_get(const Eo *obj, Evas_Device *
*
* @ingroup Evas_Canvas
*/
-EOAPI Efl_Canvas_Object *evas_canvas_object_top_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Efl_Canvas_Object *evas_canvas_object_top_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief This function returns the current known default pointer coordinates.
@@ -195,7 +193,7 @@ EOAPI Efl_Canvas_Object *evas_canvas_object_top_get(const Eo *obj) EINA_WARN_UNU
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_pointer_canvas_xy_by_device_get(const Eo *obj, Evas_Device *dev, int *x, int *y);
+EVAS_API EVAS_API_WEAK void evas_canvas_pointer_canvas_xy_by_device_get(const Eo *obj, Evas_Device *dev, int *x, int *y);
/**
* @brief This function returns the current known default pointer coordinates
@@ -211,7 +209,7 @@ EOAPI void evas_canvas_pointer_canvas_xy_by_device_get(const Eo *obj, Evas_Devic
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_pointer_canvas_xy_get(const Eo *obj, int *x, int *y);
+EVAS_API EVAS_API_WEAK void evas_canvas_pointer_canvas_xy_get(const Eo *obj, int *x, int *y);
/**
* @brief Get the number of mouse or multi presses currently active.
@@ -224,7 +222,7 @@ EOAPI void evas_canvas_pointer_canvas_xy_get(const Eo *obj, int *x, int *y);
*
* @ingroup Evas_Canvas
*/
-EOAPI int evas_canvas_event_down_count_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK int evas_canvas_event_down_count_get(const Eo *obj);
/**
* @brief This gets the internal counter that counts the number of smart
@@ -246,7 +244,7 @@ EOAPI int evas_canvas_event_down_count_get(const Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI int evas_canvas_smart_objects_calculate_count_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK int evas_canvas_smart_objects_calculate_count_get(const Eo *obj);
/**
* @brief Get the focus state for the default seat.
@@ -257,7 +255,7 @@ EOAPI int evas_canvas_smart_objects_calculate_count_get(const Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI Eina_Bool evas_canvas_focus_state_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK Eina_Bool evas_canvas_focus_state_get(const Eo *obj);
/**
* @brief Get the focus state by a given seat.
@@ -270,7 +268,7 @@ EOAPI Eina_Bool evas_canvas_focus_state_get(const Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI Eina_Bool evas_canvas_seat_focus_state_get(const Eo *obj, Evas_Device *seat);
+EVAS_API EVAS_API_WEAK Eina_Bool evas_canvas_seat_focus_state_get(const Eo *obj, Evas_Device *seat);
/**
* @brief Get the changed marker for the canvas.
@@ -283,7 +281,7 @@ EOAPI Eina_Bool evas_canvas_seat_focus_state_get(const Eo *obj, Evas_Device *sea
*
* @ingroup Evas_Canvas
*/
-EOAPI Eina_Bool evas_canvas_changed_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK Eina_Bool evas_canvas_changed_get(const Eo *obj);
/**
* @brief This function returns the current known pointer coordinates.
@@ -297,7 +295,7 @@ EOAPI Eina_Bool evas_canvas_changed_get(const Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_pointer_output_xy_by_device_get(const Eo *obj, Evas_Device *dev, int *x, int *y);
+EVAS_API EVAS_API_WEAK void evas_canvas_pointer_output_xy_by_device_get(const Eo *obj, Evas_Device *dev, int *x, int *y);
/**
* @brief This function returns the current known default pointer coordinates.
@@ -313,7 +311,7 @@ EOAPI void evas_canvas_pointer_output_xy_by_device_get(const Eo *obj, Evas_Devic
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_pointer_output_xy_get(const Eo *obj, int *x, int *y);
+EVAS_API EVAS_API_WEAK void evas_canvas_pointer_output_xy_get(const Eo *obj, int *x, int *y);
/**
* @brief Get the lowest (stacked) Evas object on the canvas @c e.
@@ -325,7 +323,7 @@ EOAPI void evas_canvas_pointer_output_xy_get(const Eo *obj, int *x, int *y);
* only on the ones at the "top level", with regard to object parenting.
*
* See also @ref evas_object_layer_get, @ref evas_object_layer_set, @ref
- * evas_object_below_get, @ref evas_object_below_set.
+ * evas_object_below_get.
*
* @param[in] obj The object.
*
@@ -333,7 +331,7 @@ EOAPI void evas_canvas_pointer_output_xy_get(const Eo *obj, int *x, int *y);
*
* @ingroup Evas_Canvas
*/
-EOAPI Efl_Canvas_Object *evas_canvas_object_bottom_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Efl_Canvas_Object *evas_canvas_object_bottom_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Returns a bitmask with the mouse buttons currently pressed, set to 1.
@@ -345,7 +343,7 @@ EOAPI Efl_Canvas_Object *evas_canvas_object_bottom_get(const Eo *obj) EINA_WARN_
*
* @ingroup Evas_Canvas
*/
-EOAPI unsigned int evas_canvas_pointer_button_down_mask_by_device_get(const Eo *obj, Evas_Device *dev);
+EVAS_API EVAS_API_WEAK unsigned int evas_canvas_pointer_button_down_mask_by_device_get(const Eo *obj, Evas_Device *dev);
/**
* @brief Returns a bitmask with the default mouse buttons currently pressed,
@@ -371,7 +369,7 @@ EOAPI unsigned int evas_canvas_pointer_button_down_mask_by_device_get(const Eo *
*
* @ingroup Evas_Canvas
*/
-EOAPI unsigned int evas_canvas_pointer_button_down_mask_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK unsigned int evas_canvas_pointer_button_down_mask_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Retrieve a list of Evas objects lying over a given position in a
@@ -391,7 +389,7 @@ EOAPI unsigned int evas_canvas_pointer_button_down_mask_get(const Eo *obj) EINA_
*
* @ingroup Evas_Canvas
*/
-EOAPI Eina_List *evas_canvas_tree_objects_at_xy_get(Eo *obj, Efl_Canvas_Object *stop, int x, int y) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Eina_List *evas_canvas_tree_objects_at_xy_get(Eo *obj, Efl_Canvas_Object *stop, int x, int y) EINA_WARN_UNUSED_RESULT;
/**
* @brief Enables or turns on programmatically the lock key with name
@@ -409,7 +407,7 @@ EOAPI Eina_List *evas_canvas_tree_objects_at_xy_get(Eo *obj, Efl_Canvas_Object *
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_key_lock_on(Eo *obj, const char *keyname) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK void evas_canvas_key_lock_on(Eo *obj, const char *keyname) EINA_ARG_NONNULL(2);
/**
* @brief Enables or turns on programmatically the lock key with name
@@ -431,7 +429,7 @@ EOAPI void evas_canvas_key_lock_on(Eo *obj, const char *keyname) EINA_ARG_NONNUL
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_seat_key_lock_on(Eo *obj, const char *keyname, Evas_Device *seat) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK void evas_canvas_seat_key_lock_on(Eo *obj, const char *keyname, Evas_Device *seat) EINA_ARG_NONNULL(2);
/**
* @brief Disables or turns off programmatically the lock key with name
@@ -452,7 +450,7 @@ EOAPI void evas_canvas_seat_key_lock_on(Eo *obj, const char *keyname, Evas_Devic
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_seat_key_lock_off(Eo *obj, const char *keyname, Evas_Device *seat) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK void evas_canvas_seat_key_lock_off(Eo *obj, const char *keyname, Evas_Device *seat) EINA_ARG_NONNULL(2);
/**
* @brief Adds the @c keyname key to the current list of modifier keys.
@@ -478,7 +476,7 @@ EOAPI void evas_canvas_seat_key_lock_off(Eo *obj, const char *keyname, Evas_Devi
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_key_modifier_add(Eo *obj, const char *keyname) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK void evas_canvas_key_modifier_add(Eo *obj, const char *keyname) EINA_ARG_NONNULL(2);
/**
* @brief Disables or turns off programmatically the modifier key with name
@@ -494,7 +492,7 @@ EOAPI void evas_canvas_key_modifier_add(Eo *obj, const char *keyname) EINA_ARG_N
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_key_modifier_off(Eo *obj, const char *keyname) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK void evas_canvas_key_modifier_off(Eo *obj, const char *keyname) EINA_ARG_NONNULL(2);
/**
* @brief Render the given Evas canvas asynchronously.
@@ -519,13 +517,13 @@ EOAPI void evas_canvas_key_modifier_off(Eo *obj, const char *keyname) EINA_ARG_N
*
* @ingroup Evas_Canvas
*/
-EOAPI Eina_Bool evas_canvas_render_async(Eo *obj);
+EVAS_API EVAS_API_WEAK Eina_Bool evas_canvas_render_async(Eo *obj);
/** Inform the evas that it lost the focus from the default seat.
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_focus_out(Eo *obj);
+EVAS_API EVAS_API_WEAK void evas_canvas_focus_out(Eo *obj);
/**
* @brief Update the canvas internal objects but not triggering immediate
@@ -538,7 +536,7 @@ EOAPI void evas_canvas_focus_out(Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_norender(Eo *obj);
+EVAS_API EVAS_API_WEAK void evas_canvas_norender(Eo *obj);
/**
* @brief Pop the nochange flag down 1.
@@ -552,7 +550,7 @@ EOAPI void evas_canvas_norender(Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_nochange_pop(Eo *obj);
+EVAS_API EVAS_API_WEAK void evas_canvas_nochange_pop(Eo *obj);
/**
* @brief Disables or turns off programmatically the lock key with name
@@ -569,7 +567,7 @@ EOAPI void evas_canvas_nochange_pop(Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_key_lock_off(Eo *obj, const char *keyname) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK void evas_canvas_key_lock_off(Eo *obj, const char *keyname) EINA_ARG_NONNULL(2);
/**
* @brief Push the nochange flag up 1
@@ -583,13 +581,13 @@ EOAPI void evas_canvas_key_lock_off(Eo *obj, const char *keyname) EINA_ARG_NONNU
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_nochange_push(Eo *obj);
+EVAS_API EVAS_API_WEAK void evas_canvas_nochange_push(Eo *obj);
/** Force the given evas and associated engine to flush its font cache.
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_font_cache_flush(Eo *obj);
+EVAS_API EVAS_API_WEAK void evas_canvas_font_cache_flush(Eo *obj);
/**
* @brief Enables or turns on programmatically the modifier key with name
@@ -607,7 +605,7 @@ EOAPI void evas_canvas_font_cache_flush(Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_key_modifier_on(Eo *obj, const char *keyname) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK void evas_canvas_key_modifier_on(Eo *obj, const char *keyname) EINA_ARG_NONNULL(2);
/**
* @brief Enables or turns on programmatically the modifier key with name
@@ -629,7 +627,7 @@ EOAPI void evas_canvas_key_modifier_on(Eo *obj, const char *keyname) EINA_ARG_NO
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_seat_key_modifier_on(Eo *obj, const char *keyname, Evas_Device *seat) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK void evas_canvas_seat_key_modifier_on(Eo *obj, const char *keyname, Evas_Device *seat) EINA_ARG_NONNULL(2);
/**
* @brief Disables or turns off programmatically the modifier key with name
@@ -649,7 +647,7 @@ EOAPI void evas_canvas_seat_key_modifier_on(Eo *obj, const char *keyname, Evas_D
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_seat_key_modifier_off(Eo *obj, const char *keyname, Evas_Device *seat) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK void evas_canvas_seat_key_modifier_off(Eo *obj, const char *keyname, Evas_Device *seat) EINA_ARG_NONNULL(2);
/**
* @brief List of available font descriptions known or found by this evas.
@@ -665,7 +663,7 @@ EOAPI void evas_canvas_seat_key_modifier_off(Eo *obj, const char *keyname, Evas_
*
* @ingroup Evas_Canvas
*/
-EOAPI Eina_List *evas_canvas_font_available_list(const Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Eina_List *evas_canvas_font_available_list(const Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Retrieves the object on the given evas with the given name.
@@ -683,7 +681,7 @@ EOAPI Eina_List *evas_canvas_font_available_list(const Eo *obj) EINA_WARN_UNUSED
*
* @ingroup Evas_Canvas
*/
-EOAPI Efl_Canvas_Object *evas_canvas_object_name_find(const Eo *obj, const char *name) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Efl_Canvas_Object *evas_canvas_object_name_find(const Eo *obj, const char *name) EINA_WARN_UNUSED_RESULT;
/**
* @brief Appends a font path to the list of font paths used by the given evas.
@@ -693,13 +691,13 @@ EOAPI Efl_Canvas_Object *evas_canvas_object_name_find(const Eo *obj, const char
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_font_path_append(Eo *obj, const char *path) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK void evas_canvas_font_path_append(Eo *obj, const char *path) EINA_ARG_NONNULL(2);
/** Removes all font paths loaded into memory for the given evas.
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_font_path_clear(Eo *obj);
+EVAS_API EVAS_API_WEAK void evas_canvas_font_path_clear(Eo *obj);
/**
* @brief This function returns the nth touch point's coordinates.
@@ -714,7 +712,7 @@ EOAPI void evas_canvas_font_path_clear(Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_touch_point_list_nth_xy_get(Eo *obj, unsigned int n, double *x, double *y);
+EVAS_API EVAS_API_WEAK void evas_canvas_touch_point_list_nth_xy_get(Eo *obj, unsigned int n, double *x, double *y);
/**
* @brief Removes the @c keyname key from the current list of lock keys on
@@ -725,7 +723,7 @@ EOAPI void evas_canvas_touch_point_list_nth_xy_get(Eo *obj, unsigned int n, doub
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_key_lock_del(Eo *obj, const char *keyname) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK void evas_canvas_key_lock_del(Eo *obj, const char *keyname) EINA_ARG_NONNULL(2);
/**
* @brief Add a damage rectangle.
@@ -744,13 +742,13 @@ EOAPI void evas_canvas_key_lock_del(Eo *obj, const char *keyname) EINA_ARG_NONNU
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_damage_rectangle_add(Eo *obj, int x, int y, int w, int h);
+EVAS_API EVAS_API_WEAK void evas_canvas_damage_rectangle_add(Eo *obj, int x, int y, int w, int h);
/** Sync evas canvas
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_sync(Eo *obj);
+EVAS_API EVAS_API_WEAK void evas_canvas_sync(Eo *obj);
/**
* @brief Retrieves the list of font paths used by the given evas.
@@ -761,7 +759,7 @@ EOAPI void evas_canvas_sync(Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI const Eina_List *evas_canvas_font_path_list(const Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK const Eina_List *evas_canvas_font_path_list(const Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Reload the image cache.
@@ -771,7 +769,7 @@ EOAPI const Eina_List *evas_canvas_font_path_list(const Eo *obj) EINA_WARN_UNUSE
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_image_cache_reload(Eo *obj);
+EVAS_API EVAS_API_WEAK void evas_canvas_image_cache_reload(Eo *obj);
/**
* @brief Convert/scale a canvas coordinate into output screen coordinates.
@@ -788,7 +786,7 @@ EOAPI void evas_canvas_image_cache_reload(Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI int evas_canvas_coord_world_x_to_screen(const Eo *obj, int x) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK int evas_canvas_coord_world_x_to_screen(const Eo *obj, int x) EINA_WARN_UNUSED_RESULT;
/**
* @brief Force immediate renderization of the given Evas canvas.
@@ -808,11 +806,11 @@ EOAPI int evas_canvas_coord_world_x_to_screen(const Eo *obj, int x) EINA_WARN_UN
* @param[in] obj The object.
*
* @return A newly allocated list of updated rectangles of the canvas
- * (@Eina.Rect structs). Free this list with @ref evas_render_updates_free.
+ * (@ref Eina_Rect structs). Free this list with @ref evas_render_updates_free.
*
* @ingroup Evas_Canvas
*/
-EOAPI Eina_List *evas_canvas_render_updates(Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Eina_List *evas_canvas_render_updates(Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Flush the image cache of the canvas.
@@ -822,7 +820,7 @@ EOAPI Eina_List *evas_canvas_render_updates(Eo *obj) EINA_WARN_UNUSED_RESULT;
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_image_cache_flush(Eo *obj);
+EVAS_API EVAS_API_WEAK void evas_canvas_image_cache_flush(Eo *obj);
/**
* @brief Convert/scale an output screen coordinate into canvas coordinates.
@@ -839,7 +837,7 @@ EOAPI void evas_canvas_image_cache_flush(Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI int evas_canvas_coord_screen_y_to_world(const Eo *obj, int y) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK int evas_canvas_coord_screen_y_to_world(const Eo *obj, int y) EINA_WARN_UNUSED_RESULT;
/**
* @brief Removes the @c keyname key from the current list of modifier keys on
@@ -852,13 +850,13 @@ EOAPI int evas_canvas_coord_screen_y_to_world(const Eo *obj, int y) EINA_WARN_UN
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_key_modifier_del(Eo *obj, const char *keyname) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK void evas_canvas_key_modifier_del(Eo *obj, const char *keyname) EINA_ARG_NONNULL(2);
/** Inform to the evas that it got the focus from the default seat.
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_focus_in(Eo *obj);
+EVAS_API EVAS_API_WEAK void evas_canvas_focus_in(Eo *obj);
/**
* @brief Inform to the evas that it got the focus from a given seat.
@@ -870,7 +868,7 @@ EOAPI void evas_canvas_focus_in(Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_seat_focus_in(Eo *obj, Evas_Device *seat);
+EVAS_API EVAS_API_WEAK void evas_canvas_seat_focus_in(Eo *obj, Evas_Device *seat);
/**
* @brief Inform to the evas that it lost the focus from a given seat.
@@ -882,7 +880,7 @@ EOAPI void evas_canvas_seat_focus_in(Eo *obj, Evas_Device *seat);
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_seat_focus_out(Eo *obj, Evas_Device *seat);
+EVAS_API EVAS_API_WEAK void evas_canvas_seat_focus_out(Eo *obj, Evas_Device *seat);
/**
* @brief Add an "obscured region" to an Evas canvas.
@@ -923,7 +921,7 @@ EOAPI void evas_canvas_seat_focus_out(Eo *obj, Evas_Device *seat);
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_obscured_rectangle_add(Eo *obj, int x, int y, int w, int h);
+EVAS_API EVAS_API_WEAK void evas_canvas_obscured_rectangle_add(Eo *obj, int x, int y, int w, int h);
/**
* @brief Make the canvas discard as much data as possible used by the engine
@@ -938,13 +936,13 @@ EOAPI void evas_canvas_obscured_rectangle_add(Eo *obj, int x, int y, int w, int
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_render_dump(Eo *obj);
+EVAS_API EVAS_API_WEAK void evas_canvas_render_dump(Eo *obj);
/** Force renderization of the given canvas.
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_render(Eo *obj);
+EVAS_API EVAS_API_WEAK void evas_canvas_render(Eo *obj);
/**
* @brief Prepends a font path to the list of font paths used by the given
@@ -955,7 +953,7 @@ EOAPI void evas_canvas_render(Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_font_path_prepend(Eo *obj, const char *path) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK void evas_canvas_font_path_prepend(Eo *obj, const char *path) EINA_ARG_NONNULL(2);
/**
* @brief Remove all "obscured regions" from an Evas canvas.
@@ -975,7 +973,7 @@ EOAPI void evas_canvas_font_path_prepend(Eo *obj, const char *path) EINA_ARG_NON
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_obscured_clear(Eo *obj);
+EVAS_API EVAS_API_WEAK void evas_canvas_obscured_clear(Eo *obj);
/**
* @brief Convert/scale an output screen coordinate into canvas coordinates.
@@ -992,7 +990,7 @@ EOAPI void evas_canvas_obscured_clear(Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI int evas_canvas_coord_screen_x_to_world(const Eo *obj, int x) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK int evas_canvas_coord_screen_x_to_world(const Eo *obj, int x) EINA_WARN_UNUSED_RESULT;
/**
* @brief Adds the @c keyname key to the current list of lock keys.
@@ -1018,7 +1016,7 @@ EOAPI int evas_canvas_coord_screen_x_to_world(const Eo *obj, int x) EINA_WARN_UN
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_key_lock_add(Eo *obj, const char *keyname) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK void evas_canvas_key_lock_add(Eo *obj, const char *keyname) EINA_ARG_NONNULL(2);
/**
* @brief Make the canvas discard internally cached data used for rendering.
@@ -1030,7 +1028,7 @@ EOAPI void evas_canvas_key_lock_add(Eo *obj, const char *keyname) EINA_ARG_NONNU
*
* @ingroup Evas_Canvas
*/
-EOAPI void evas_canvas_render_idle_flush(Eo *obj);
+EVAS_API EVAS_API_WEAK void evas_canvas_render_idle_flush(Eo *obj);
/**
* @brief Return the default device of a given type.
@@ -1046,7 +1044,7 @@ EOAPI void evas_canvas_render_idle_flush(Eo *obj);
*
* @ingroup Evas_Canvas
*/
-EOAPI Evas_Device *evas_canvas_default_device_get(const Eo *obj, Evas_Device_Class type);
+EVAS_API EVAS_API_WEAK Evas_Device *evas_canvas_default_device_get(const Eo *obj, Evas_Device_Class type);
/**
* @brief Convert/scale a canvas coordinate into output screen coordinates.
@@ -1063,6 +1061,6 @@ EOAPI Evas_Device *evas_canvas_default_device_get(const Eo *obj, Evas_Device_Cla
*
* @ingroup Evas_Canvas
*/
-EOAPI int evas_canvas_coord_world_y_to_screen(const Eo *obj, int y) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK int evas_canvas_coord_world_y_to_screen(const Eo *obj, int y) EINA_WARN_UNUSED_RESULT;
#endif
diff --git a/src/lib/evas/canvas/evas_canvas_eo.legacy.c b/src/lib/evas/canvas/evas_canvas_eo.legacy.c
index b864c2f6d4..767d0e46f6 100644
--- a/src/lib/evas/canvas/evas_canvas_eo.legacy.c
+++ b/src/lib/evas/canvas/evas_canvas_eo.legacy.c
@@ -1,383 +1,383 @@
-EAPI void
+EVAS_API void
evas_image_cache_set(Evas_Canvas *obj, int size)
{
evas_canvas_image_cache_set(obj, size);
}
-EAPI int
+EVAS_API int
evas_image_cache_get(const Evas_Canvas *obj)
{
return evas_canvas_image_cache_get(obj);
}
-EAPI void
+EVAS_API void
evas_event_default_flags_set(Evas_Canvas *obj, Evas_Event_Flags flags)
{
- evas_canvas_event_default_flags_set(obj, (Efl_Input_Flags)flags);
+ evas_canvas_event_default_flags_set(obj, flags);
}
-EAPI Evas_Event_Flags
+EVAS_API Evas_Event_Flags
evas_event_default_flags_get(const Evas_Canvas *obj)
{
return (Evas_Event_Flags)evas_canvas_event_default_flags_get(obj);
}
-EAPI void
+EVAS_API void
evas_font_cache_set(Evas_Canvas *obj, int size)
{
evas_canvas_font_cache_set(obj, size);
}
-EAPI int
+EVAS_API int
evas_font_cache_get(const Evas_Canvas *obj)
{
return evas_canvas_font_cache_get(obj);
}
-EAPI void
+EVAS_API void
evas_data_attach_set(Evas_Canvas *obj, void *data)
{
evas_canvas_data_attach_set(obj, data);
}
-EAPI void *
+EVAS_API void *
evas_data_attach_get(const Evas_Canvas *obj)
{
return evas_canvas_data_attach_get(obj);
}
-EAPI Efl_Canvas_Object *
+EVAS_API Efl_Canvas_Object *
evas_focus_get(const Evas_Canvas *obj)
{
return evas_canvas_focus_get(obj);
}
-EAPI Efl_Canvas_Object *
+EVAS_API Efl_Canvas_Object *
evas_seat_focus_get(const Evas_Canvas *obj, Evas_Device *seat)
{
return evas_canvas_seat_focus_get(obj, seat);
}
-EAPI Efl_Canvas_Object *
+EVAS_API Efl_Canvas_Object *
evas_object_top_get(const Evas_Canvas *obj)
{
return evas_canvas_object_top_get(obj);
}
-EAPI void
+EVAS_API void
evas_pointer_canvas_xy_by_device_get(const Evas_Canvas *obj, Evas_Device *dev, int *x, int *y)
{
evas_canvas_pointer_canvas_xy_by_device_get(obj, dev, x, y);
}
-EAPI void
+EVAS_API void
evas_pointer_canvas_xy_get(const Evas_Canvas *obj, int *x, int *y)
{
evas_canvas_pointer_canvas_xy_get(obj, x, y);
}
-EAPI int
+EVAS_API int
evas_event_down_count_get(const Evas_Canvas *obj)
{
return evas_canvas_event_down_count_get(obj);
}
-EAPI int
+EVAS_API int
evas_smart_objects_calculate_count_get(const Evas_Canvas *obj)
{
return evas_canvas_smart_objects_calculate_count_get(obj);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_focus_state_get(const Evas_Canvas *obj)
{
return evas_canvas_focus_state_get(obj);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_seat_focus_state_get(const Evas_Canvas *obj, Evas_Device *seat)
{
return evas_canvas_seat_focus_state_get(obj, seat);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_changed_get(const Evas_Canvas *obj)
{
return evas_canvas_changed_get(obj);
}
-EAPI void
+EVAS_API void
evas_pointer_output_xy_by_device_get(const Evas_Canvas *obj, Evas_Device *dev, int *x, int *y)
{
evas_canvas_pointer_output_xy_by_device_get(obj, dev, x, y);
}
-EAPI void
+EVAS_API void
evas_pointer_output_xy_get(const Evas_Canvas *obj, int *x, int *y)
{
evas_canvas_pointer_output_xy_get(obj, x, y);
}
-EAPI Efl_Canvas_Object *
+EVAS_API Efl_Canvas_Object *
evas_object_bottom_get(const Evas_Canvas *obj)
{
return evas_canvas_object_bottom_get(obj);
}
-EAPI unsigned int
+EVAS_API unsigned int
evas_pointer_button_down_mask_by_device_get(const Evas_Canvas *obj, Evas_Device *dev)
{
return evas_canvas_pointer_button_down_mask_by_device_get(obj, dev);
}
-EAPI unsigned int
+EVAS_API unsigned int
evas_pointer_button_down_mask_get(const Evas_Canvas *obj)
{
return evas_canvas_pointer_button_down_mask_get(obj);
}
-EAPI Eina_List *
+EVAS_API Eina_List *
evas_tree_objects_at_xy_get(Evas_Canvas *obj, Efl_Canvas_Object *stop, int x, int y)
{
return evas_canvas_tree_objects_at_xy_get(obj, stop, x, y);
}
-EAPI void
+EVAS_API void
evas_key_lock_on(Evas_Canvas *obj, const char *keyname)
{
evas_canvas_key_lock_on(obj, keyname);
}
-EAPI void
+EVAS_API void
evas_seat_key_lock_on(Evas_Canvas *obj, const char *keyname, Evas_Device *seat)
{
evas_canvas_seat_key_lock_on(obj, keyname, seat);
}
-EAPI void
+EVAS_API void
evas_seat_key_lock_off(Evas_Canvas *obj, const char *keyname, Evas_Device *seat)
{
evas_canvas_seat_key_lock_off(obj, keyname, seat);
}
-EAPI void
+EVAS_API void
evas_key_modifier_add(Evas_Canvas *obj, const char *keyname)
{
evas_canvas_key_modifier_add(obj, keyname);
}
-EAPI void
+EVAS_API void
evas_key_modifier_off(Evas_Canvas *obj, const char *keyname)
{
evas_canvas_key_modifier_off(obj, keyname);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_render_async(Evas_Canvas *obj)
{
return evas_canvas_render_async(obj);
}
-EAPI void
+EVAS_API void
evas_focus_out(Evas_Canvas *obj)
{
evas_canvas_focus_out(obj);
}
-EAPI void
+EVAS_API void
evas_norender(Evas_Canvas *obj)
{
evas_canvas_norender(obj);
}
-EAPI void
+EVAS_API void
evas_nochange_pop(Evas_Canvas *obj)
{
evas_canvas_nochange_pop(obj);
}
-EAPI void
+EVAS_API void
evas_key_lock_off(Evas_Canvas *obj, const char *keyname)
{
evas_canvas_key_lock_off(obj, keyname);
}
-EAPI void
+EVAS_API void
evas_nochange_push(Evas_Canvas *obj)
{
evas_canvas_nochange_push(obj);
}
-EAPI void
+EVAS_API void
evas_font_cache_flush(Evas_Canvas *obj)
{
evas_canvas_font_cache_flush(obj);
}
-EAPI void
+EVAS_API void
evas_key_modifier_on(Evas_Canvas *obj, const char *keyname)
{
evas_canvas_key_modifier_on(obj, keyname);
}
-EAPI void
+EVAS_API void
evas_seat_key_modifier_on(Evas_Canvas *obj, const char *keyname, Evas_Device *seat)
{
evas_canvas_seat_key_modifier_on(obj, keyname, seat);
}
-EAPI void
+EVAS_API void
evas_seat_key_modifier_off(Evas_Canvas *obj, const char *keyname, Evas_Device *seat)
{
evas_canvas_seat_key_modifier_off(obj, keyname, seat);
}
-EAPI Eina_List *
+EVAS_API Eina_List *
evas_font_available_list(const Evas_Canvas *obj)
{
return evas_canvas_font_available_list(obj);
}
-EAPI Efl_Canvas_Object *
+EVAS_API Efl_Canvas_Object *
evas_object_name_find(const Evas_Canvas *obj, const char *name)
{
return evas_canvas_object_name_find(obj, name);
}
-EAPI void
+EVAS_API void
evas_font_path_append(Evas_Canvas *obj, const char *path)
{
evas_canvas_font_path_append(obj, path);
}
-EAPI void
+EVAS_API void
evas_font_path_clear(Evas_Canvas *obj)
{
evas_canvas_font_path_clear(obj);
}
-EAPI void
+EVAS_API void
evas_key_lock_del(Evas_Canvas *obj, const char *keyname)
{
evas_canvas_key_lock_del(obj, keyname);
}
-EAPI void
+EVAS_API void
evas_damage_rectangle_add(Evas_Canvas *obj, int x, int y, int w, int h)
{
evas_canvas_damage_rectangle_add(obj, x, y, w, h);
}
-EAPI void
+EVAS_API void
evas_sync(Evas_Canvas *obj)
{
evas_canvas_sync(obj);
}
-EAPI const Eina_List *
+EVAS_API const Eina_List *
evas_font_path_list(const Evas_Canvas *obj)
{
return evas_canvas_font_path_list(obj);
}
-EAPI void
+EVAS_API void
evas_image_cache_reload(Evas_Canvas *obj)
{
evas_canvas_image_cache_reload(obj);
}
-EAPI int
+EVAS_API int
evas_coord_world_x_to_screen(const Evas_Canvas *obj, int x)
{
return evas_canvas_coord_world_x_to_screen(obj, x);
}
-EAPI Eina_List *
+EVAS_API Eina_List *
evas_render_updates(Evas_Canvas *obj)
{
return evas_canvas_render_updates(obj);
}
-EAPI void
+EVAS_API void
evas_image_cache_flush(Evas_Canvas *obj)
{
evas_canvas_image_cache_flush(obj);
}
-EAPI int
+EVAS_API int
evas_coord_screen_y_to_world(const Evas_Canvas *obj, int y)
{
return evas_canvas_coord_screen_y_to_world(obj, y);
}
-EAPI void
+EVAS_API void
evas_key_modifier_del(Evas_Canvas *obj, const char *keyname)
{
evas_canvas_key_modifier_del(obj, keyname);
}
-EAPI void
+EVAS_API void
evas_focus_in(Evas_Canvas *obj)
{
evas_canvas_focus_in(obj);
}
-EAPI void
+EVAS_API void
evas_obscured_rectangle_add(Evas_Canvas *obj, int x, int y, int w, int h)
{
evas_canvas_obscured_rectangle_add(obj, x, y, w, h);
}
-EAPI void
+EVAS_API void
evas_render_dump(Evas_Canvas *obj)
{
evas_canvas_render_dump(obj);
}
-EAPI void
+EVAS_API void
evas_render(Evas_Canvas *obj)
{
evas_canvas_render(obj);
}
-EAPI void
+EVAS_API void
evas_font_path_prepend(Evas_Canvas *obj, const char *path)
{
evas_canvas_font_path_prepend(obj, path);
}
-EAPI void
+EVAS_API void
evas_obscured_clear(Evas_Canvas *obj)
{
evas_canvas_obscured_clear(obj);
}
-EAPI int
+EVAS_API int
evas_coord_screen_x_to_world(const Evas_Canvas *obj, int x)
{
return evas_canvas_coord_screen_x_to_world(obj, x);
}
-EAPI void
+EVAS_API void
evas_key_lock_add(Evas_Canvas *obj, const char *keyname)
{
evas_canvas_key_lock_add(obj, keyname);
}
-EAPI void
+EVAS_API void
evas_render_idle_flush(Evas_Canvas *obj)
{
evas_canvas_render_idle_flush(obj);
}
-EAPI Evas_Device *
+EVAS_API Evas_Device *
evas_default_device_get(const Evas_Canvas *obj, Evas_Device_Class type)
{
return evas_canvas_default_device_get(obj, type);
}
-EAPI int
+EVAS_API int
evas_coord_world_y_to_screen(const Evas_Canvas *obj, int y)
{
return evas_canvas_coord_world_y_to_screen(obj, y);
diff --git a/src/lib/evas/canvas/evas_canvas_eo.legacy.h b/src/lib/evas/canvas/evas_canvas_eo.legacy.h
index 88a6591168..caf497e6bf 100644
--- a/src/lib/evas/canvas/evas_canvas_eo.legacy.h
+++ b/src/lib/evas/canvas/evas_canvas_eo.legacy.h
@@ -22,9 +22,9 @@ typedef Eo Evas_Canvas;
* @param[in] obj The object.
* @param[in] size The cache size.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_image_cache_set(Evas_Canvas *obj, int size);
+EVAS_API void evas_image_cache_set(Evas_Canvas *obj, int size);
/**
* @brief Get the image cache.
@@ -35,9 +35,9 @@ EAPI void evas_image_cache_set(Evas_Canvas *obj, int size);
*
* @return The cache size.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI int evas_image_cache_get(const Evas_Canvas *obj);
+EVAS_API int evas_image_cache_get(const Evas_Canvas *obj);
/**
* @brief Set the default set of flags an event begins with
@@ -51,9 +51,9 @@ EAPI int evas_image_cache_get(const Evas_Canvas *obj);
*
* @since 1.2
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_event_default_flags_set(Evas_Canvas *obj, Evas_Event_Flags flags);
+EVAS_API void evas_event_default_flags_set(Evas_Canvas *obj, Evas_Event_Flags flags);
/**
* @brief Get the default set of flags an event begins with
@@ -66,9 +66,9 @@ EAPI void evas_event_default_flags_set(Evas_Canvas *obj, Evas_Event_Flags flags)
*
* @since 1.2
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI Evas_Event_Flags evas_event_default_flags_get(const Evas_Canvas *obj);
+EVAS_API Evas_Event_Flags evas_event_default_flags_get(const Evas_Canvas *obj);
/**
* @brief Changes the size of font cache of the given evas.
@@ -76,9 +76,9 @@ EAPI Evas_Event_Flags evas_event_default_flags_get(const Evas_Canvas *obj);
* @param[in] obj The object.
* @param[in] size The size in bytes.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_font_cache_set(Evas_Canvas *obj, int size);
+EVAS_API void evas_font_cache_set(Evas_Canvas *obj, int size);
/**
* @brief Get the size of font cache of the given evas in bytes.
@@ -87,9 +87,9 @@ EAPI void evas_font_cache_set(Evas_Canvas *obj, int size);
*
* @return The size in bytes.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI int evas_font_cache_get(const Evas_Canvas *obj);
+EVAS_API int evas_font_cache_get(const Evas_Canvas *obj);
/**
* @brief Attaches a specific pointer to the evas for fetching later.
@@ -97,9 +97,9 @@ EAPI int evas_font_cache_get(const Evas_Canvas *obj);
* @param[in] obj The object.
* @param[in] data The attached pointer.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_data_attach_set(Evas_Canvas *obj, void *data);
+EVAS_API void evas_data_attach_set(Evas_Canvas *obj, void *data);
/**
* @brief Returns the pointer attached by @ref evas_data_attach_set.
@@ -108,9 +108,9 @@ EAPI void evas_data_attach_set(Evas_Canvas *obj, void *data);
*
* @return The attached pointer.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void *evas_data_attach_get(const Evas_Canvas *obj);
+EVAS_API void *evas_data_attach_get(const Evas_Canvas *obj);
/**
* @brief Retrieve the object focused by the default seat.
@@ -127,18 +127,15 @@ EAPI void *evas_data_attach_get(const Evas_Canvas *obj);
* @c null, if none.
*
* See also @ref evas_object_focus_set, @ref evas_object_focus_get, @ref
- * evas_object_key_grab, @ref evas_object_key_ungrab, @ref evas_seat_focus_get,
- * @ref Efl.Canvas.Object.seat_focus_check,
- * @ref Efl.Canvas.Object.seat_focus_add,
- * @ref Efl.Canvas.Object.seat_focus_del.
+ * evas_object_key_grab, @ref evas_object_key_ungrab, @ref evas_seat_focus_get.
*
* @param[in] obj The object.
*
* @return The object that has focus or @c null if there is not one.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI Efl_Canvas_Object *evas_focus_get(const Evas_Canvas *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Efl_Canvas_Object *evas_focus_get(const Evas_Canvas *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Return the focused object by a given seat.
@@ -152,9 +149,9 @@ EAPI Efl_Canvas_Object *evas_focus_get(const Evas_Canvas *obj) EINA_WARN_UNUSED_
*
* @since 1.19
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI Efl_Canvas_Object *evas_seat_focus_get(const Evas_Canvas *obj, Evas_Device *seat);
+EVAS_API Efl_Canvas_Object *evas_seat_focus_get(const Evas_Canvas *obj, Evas_Device *seat);
/**
* @brief Get the highest (stacked) Evas object on the canvas @c e.
@@ -172,9 +169,9 @@ EAPI Efl_Canvas_Object *evas_seat_focus_get(const Evas_Canvas *obj, Evas_Device
*
* @return A pointer to the highest object on it (if any) or @c null otherwise.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI Efl_Canvas_Object *evas_object_top_get(const Evas_Canvas *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Efl_Canvas_Object *evas_object_top_get(const Evas_Canvas *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief This function returns the current known default pointer coordinates.
@@ -186,9 +183,9 @@ EAPI Efl_Canvas_Object *evas_object_top_get(const Evas_Canvas *obj) EINA_WARN_UN
*
* @since 1.19
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_pointer_canvas_xy_by_device_get(const Evas_Canvas *obj, Evas_Device *dev, int *x, int *y);
+EVAS_API void evas_pointer_canvas_xy_by_device_get(const Evas_Canvas *obj, Evas_Device *dev, int *x, int *y);
/**
* @brief This function returns the current known default pointer coordinates
@@ -202,9 +199,9 @@ EAPI void evas_pointer_canvas_xy_by_device_get(const Evas_Canvas *obj, Evas_Devi
* @param[out] x The pointer to a Evas_Coord to be filled in.
* @param[out] y The pointer to a Evas_Coord to be filled in.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_pointer_canvas_xy_get(const Evas_Canvas *obj, int *x, int *y);
+EVAS_API void evas_pointer_canvas_xy_get(const Evas_Canvas *obj, int *x, int *y);
/**
* @brief Get the number of mouse or multi presses currently active.
@@ -215,9 +212,9 @@ EAPI void evas_pointer_canvas_xy_get(const Evas_Canvas *obj, int *x, int *y);
*
* @since 1.2
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI int evas_event_down_count_get(const Evas_Canvas *obj);
+EVAS_API int evas_event_down_count_get(const Evas_Canvas *obj);
/**
* @brief This gets the internal counter that counts the number of smart
@@ -237,9 +234,9 @@ EAPI int evas_event_down_count_get(const Evas_Canvas *obj);
*
* @since 1.1
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI int evas_smart_objects_calculate_count_get(const Evas_Canvas *obj);
+EVAS_API int evas_smart_objects_calculate_count_get(const Evas_Canvas *obj);
/**
* @brief Get the focus state for the default seat.
@@ -248,9 +245,9 @@ EAPI int evas_smart_objects_calculate_count_get(const Evas_Canvas *obj);
*
* @return @c true if focused, @c false otherwise
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI Eina_Bool evas_focus_state_get(const Evas_Canvas *obj);
+EVAS_API Eina_Bool evas_focus_state_get(const Evas_Canvas *obj);
/**
* @brief Get the focus state by a given seat.
@@ -261,9 +258,9 @@ EAPI Eina_Bool evas_focus_state_get(const Evas_Canvas *obj);
*
* @return @c true if the seat has the canvas focus, @c false otherwise.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI Eina_Bool evas_seat_focus_state_get(const Evas_Canvas *obj, Evas_Device *seat);
+EVAS_API Eina_Bool evas_seat_focus_state_get(const Evas_Canvas *obj, Evas_Device *seat);
/**
* @brief Get the changed marker for the canvas.
@@ -274,9 +271,9 @@ EAPI Eina_Bool evas_seat_focus_state_get(const Evas_Canvas *obj, Evas_Device *se
*
* @since 1.11
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI Eina_Bool evas_changed_get(const Evas_Canvas *obj);
+EVAS_API Eina_Bool evas_changed_get(const Evas_Canvas *obj);
/**
* @brief This function returns the current known pointer coordinates.
@@ -288,9 +285,9 @@ EAPI Eina_Bool evas_changed_get(const Evas_Canvas *obj);
*
* @since 1.19
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_pointer_output_xy_by_device_get(const Evas_Canvas *obj, Evas_Device *dev, int *x, int *y);
+EVAS_API void evas_pointer_output_xy_by_device_get(const Evas_Canvas *obj, Evas_Device *dev, int *x, int *y);
/**
* @brief This function returns the current known default pointer coordinates.
@@ -304,9 +301,9 @@ EAPI void evas_pointer_output_xy_by_device_get(const Evas_Canvas *obj, Evas_Devi
* @param[out] x The pointer to an integer to be filled in.
* @param[out] y The pointer to an integer to be filled in.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_pointer_output_xy_get(const Evas_Canvas *obj, int *x, int *y);
+EVAS_API void evas_pointer_output_xy_get(const Evas_Canvas *obj, int *x, int *y);
/**
* @brief Get the lowest (stacked) Evas object on the canvas @c e.
@@ -318,15 +315,15 @@ EAPI void evas_pointer_output_xy_get(const Evas_Canvas *obj, int *x, int *y);
* only on the ones at the "top level", with regard to object parenting.
*
* See also @ref evas_object_layer_get, @ref evas_object_layer_set, @ref
- * evas_object_below_get, @ref evas_object_below_set.
+ * evas_object_below_get.
*
* @param[in] obj The object.
*
* @return A pointer to the lowest object on it, if any, or @c null otherwise.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI Efl_Canvas_Object *evas_object_bottom_get(const Evas_Canvas *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Efl_Canvas_Object *evas_object_bottom_get(const Evas_Canvas *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Returns a bitmask with the mouse buttons currently pressed, set to 1.
@@ -336,9 +333,9 @@ EAPI Efl_Canvas_Object *evas_object_bottom_get(const Evas_Canvas *obj) EINA_WARN
*
* @return A bitmask of the currently depressed buttons on the canvas.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI unsigned int evas_pointer_button_down_mask_by_device_get(const Evas_Canvas *obj, Evas_Device *dev);
+EVAS_API unsigned int evas_pointer_button_down_mask_by_device_get(const Evas_Canvas *obj, Evas_Device *dev);
/**
* @brief Returns a bitmask with the default mouse buttons currently pressed,
@@ -362,9 +359,9 @@ EAPI unsigned int evas_pointer_button_down_mask_by_device_get(const Evas_Canvas
*
* @return A bitmask of the currently depressed buttons on the canvas.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI unsigned int evas_pointer_button_down_mask_get(const Evas_Canvas *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API unsigned int evas_pointer_button_down_mask_get(const Evas_Canvas *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Retrieve a list of Evas objects lying over a given position in a
@@ -382,9 +379,9 @@ EAPI unsigned int evas_pointer_button_down_mask_get(const Evas_Canvas *obj) EINA
*
* @return List of objects
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI Eina_List *evas_tree_objects_at_xy_get(Evas_Canvas *obj, Efl_Canvas_Object *stop, int x, int y) EINA_WARN_UNUSED_RESULT;
+EVAS_API Eina_List *evas_tree_objects_at_xy_get(Evas_Canvas *obj, Efl_Canvas_Object *stop, int x, int y) EINA_WARN_UNUSED_RESULT;
/**
* @brief Enables or turns on programmatically the lock key with name
@@ -400,9 +397,9 @@ EAPI Eina_List *evas_tree_objects_at_xy_get(Evas_Canvas *obj, Efl_Canvas_Object
* @param[in] obj The object.
* @param[in] keyname The name of the lock to enable.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_key_lock_on(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNULL(2);
+EVAS_API void evas_key_lock_on(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNULL(2);
/**
* @brief Enables or turns on programmatically the lock key with name
@@ -422,9 +419,9 @@ EAPI void evas_key_lock_on(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNU
*
* @since 1.19
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_seat_key_lock_on(Evas_Canvas *obj, const char *keyname, Evas_Device *seat) EINA_ARG_NONNULL(2);
+EVAS_API void evas_seat_key_lock_on(Evas_Canvas *obj, const char *keyname, Evas_Device *seat) EINA_ARG_NONNULL(2);
/**
* @brief Disables or turns off programmatically the lock key with name
@@ -443,9 +440,9 @@ EAPI void evas_seat_key_lock_on(Evas_Canvas *obj, const char *keyname, Evas_Devi
*
* @since 1.19
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_seat_key_lock_off(Evas_Canvas *obj, const char *keyname, Evas_Device *seat) EINA_ARG_NONNULL(2);
+EVAS_API void evas_seat_key_lock_off(Evas_Canvas *obj, const char *keyname, Evas_Device *seat) EINA_ARG_NONNULL(2);
/**
* @brief Adds the @c keyname key to the current list of modifier keys.
@@ -469,9 +466,9 @@ EAPI void evas_seat_key_lock_off(Evas_Canvas *obj, const char *keyname, Evas_Dev
* @param[in] keyname The name of the modifier key to add to the list of Evas
* modifiers.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_key_modifier_add(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNULL(2);
+EVAS_API void evas_key_modifier_add(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNULL(2);
/**
* @brief Disables or turns off programmatically the modifier key with name
@@ -485,9 +482,9 @@ EAPI void evas_key_modifier_add(Evas_Canvas *obj, const char *keyname) EINA_ARG_
* @param[in] obj The object.
* @param[in] keyname The name of the modifier to disable.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_key_modifier_off(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNULL(2);
+EVAS_API void evas_key_modifier_off(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNULL(2);
/**
* @brief Render the given Evas canvas asynchronously.
@@ -510,15 +507,15 @@ EAPI void evas_key_modifier_off(Evas_Canvas *obj, const char *keyname) EINA_ARG_
*
* @since 1.8
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI Eina_Bool evas_render_async(Evas_Canvas *obj);
+EVAS_API Eina_Bool evas_render_async(Evas_Canvas *obj);
/** Inform the evas that it lost the focus from the default seat.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_focus_out(Evas_Canvas *obj);
+EVAS_API void evas_focus_out(Evas_Canvas *obj);
/**
* @brief Update the canvas internal objects but not triggering immediate
@@ -529,9 +526,24 @@ EAPI void evas_focus_out(Evas_Canvas *obj);
* used.
* @param[in] obj The object.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_norender(Evas_Canvas *obj);
+EVAS_API void evas_norender(Evas_Canvas *obj);
+
+/**
+ * @brief Update the canvas internal objects but not triggering immediate
+ * renderization and producing update regions in post-render event.
+ *
+ * This function updates the canvas internal objects not triggering
+ * renderization. To force renderization function @ref evas_render should be
+ * used.
+ * @param[in] eo_e The object.
+ *
+ * @since 1.24
+ *
+ * @ingroup Evas_Canvas
+ */
+EVAS_API void evas_norender_with_updates(Eo *eo_e);
/**
* @brief Pop the nochange flag down 1.
@@ -543,9 +555,9 @@ EAPI void evas_norender(Evas_Canvas *obj);
* with "changed" state.
* @param[in] obj The object.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_nochange_pop(Evas_Canvas *obj);
+EVAS_API void evas_nochange_pop(Evas_Canvas *obj);
/**
* @brief Disables or turns off programmatically the lock key with name
@@ -560,9 +572,9 @@ EAPI void evas_nochange_pop(Evas_Canvas *obj);
* @param[in] obj The object.
* @param[in] keyname The name of the lock to disable.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_key_lock_off(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNULL(2);
+EVAS_API void evas_key_lock_off(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNULL(2);
/**
* @brief Push the nochange flag up 1
@@ -574,15 +586,15 @@ EAPI void evas_key_lock_off(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONN
* with "changed" state.
* @param[in] obj The object.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_nochange_push(Evas_Canvas *obj);
+EVAS_API void evas_nochange_push(Evas_Canvas *obj);
/** Force the given evas and associated engine to flush its font cache.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_font_cache_flush(Evas_Canvas *obj);
+EVAS_API void evas_font_cache_flush(Evas_Canvas *obj);
/**
* @brief Enables or turns on programmatically the modifier key with name
@@ -597,9 +609,9 @@ EAPI void evas_font_cache_flush(Evas_Canvas *obj);
* @param[in] obj The object.
* @param[in] keyname The name of the modifier to enable.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_key_modifier_on(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNULL(2);
+EVAS_API void evas_key_modifier_on(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNULL(2);
/**
* @brief Enables or turns on programmatically the modifier key with name
@@ -618,9 +630,9 @@ EAPI void evas_key_modifier_on(Evas_Canvas *obj, const char *keyname) EINA_ARG_N
*
* @since 1.19
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_seat_key_modifier_on(Evas_Canvas *obj, const char *keyname, Evas_Device *seat) EINA_ARG_NONNULL(2);
+EVAS_API void evas_seat_key_modifier_on(Evas_Canvas *obj, const char *keyname, Evas_Device *seat) EINA_ARG_NONNULL(2);
/**
* @brief Disables or turns off programmatically the modifier key with name
@@ -638,9 +650,9 @@ EAPI void evas_seat_key_modifier_on(Evas_Canvas *obj, const char *keyname, Evas_
*
* @since 1.19
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_seat_key_modifier_off(Evas_Canvas *obj, const char *keyname, Evas_Device *seat) EINA_ARG_NONNULL(2);
+EVAS_API void evas_seat_key_modifier_off(Evas_Canvas *obj, const char *keyname, Evas_Device *seat) EINA_ARG_NONNULL(2);
/**
* @brief List of available font descriptions known or found by this evas.
@@ -654,9 +666,9 @@ EAPI void evas_seat_key_modifier_off(Evas_Canvas *obj, const char *keyname, Evas
* @return A newly allocated list of strings. Do not change the strings. Be
* sure to call @ref evas_font_available_list_free after you're done.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI Eina_List *evas_font_available_list(const Evas_Canvas *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Eina_List *evas_font_available_list(const Evas_Canvas *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Retrieves the object on the given evas with the given name.
@@ -672,9 +684,9 @@ EAPI Eina_List *evas_font_available_list(const Evas_Canvas *obj) EINA_WARN_UNUSE
* @return If successful, the Evas object with the given name. Otherwise,
* @c null.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI Efl_Canvas_Object *evas_object_name_find(const Evas_Canvas *obj, const char *name) EINA_WARN_UNUSED_RESULT;
+EVAS_API Efl_Canvas_Object *evas_object_name_find(const Evas_Canvas *obj, const char *name) EINA_WARN_UNUSED_RESULT;
/**
* @brief Appends a font path to the list of font paths used by the given evas.
@@ -682,15 +694,15 @@ EAPI Efl_Canvas_Object *evas_object_name_find(const Evas_Canvas *obj, const char
* @param[in] obj The object.
* @param[in] path The new font path.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_font_path_append(Evas_Canvas *obj, const char *path) EINA_ARG_NONNULL(2);
+EVAS_API void evas_font_path_append(Evas_Canvas *obj, const char *path) EINA_ARG_NONNULL(2);
/** Removes all font paths loaded into memory for the given evas.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_font_path_clear(Evas_Canvas *obj);
+EVAS_API void evas_font_path_clear(Evas_Canvas *obj);
/**
@@ -700,9 +712,9 @@ EAPI void evas_font_path_clear(Evas_Canvas *obj);
* @param[in] obj The object.
* @param[in] keyname The name of the key to remove from the locks list.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_key_lock_del(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNULL(2);
+EVAS_API void evas_key_lock_del(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNULL(2);
/**
* @brief Add a damage rectangle.
@@ -719,15 +731,15 @@ EAPI void evas_key_lock_del(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONN
* @param[in] w The rectangle's width.
* @param[in] h The rectangle's height.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_damage_rectangle_add(Evas_Canvas *obj, int x, int y, int w, int h);
+EVAS_API void evas_damage_rectangle_add(Evas_Canvas *obj, int x, int y, int w, int h);
/** Sync evas canvas
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_sync(Evas_Canvas *obj);
+EVAS_API void evas_sync(Evas_Canvas *obj);
/**
* @brief Retrieves the list of font paths used by the given evas.
@@ -736,9 +748,9 @@ EAPI void evas_sync(Evas_Canvas *obj);
*
* @return The list of font paths used.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI const Eina_List *evas_font_path_list(const Evas_Canvas *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API const Eina_List *evas_font_path_list(const Evas_Canvas *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Reload the image cache.
@@ -746,9 +758,9 @@ EAPI const Eina_List *evas_font_path_list(const Evas_Canvas *obj) EINA_WARN_UNUS
* This function reloads the image cache of canvas.
* @param[in] obj The object.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_image_cache_reload(Evas_Canvas *obj);
+EVAS_API void evas_image_cache_reload(Evas_Canvas *obj);
/**
* @brief Convert/scale a canvas coordinate into output screen coordinates.
@@ -763,9 +775,9 @@ EAPI void evas_image_cache_reload(Evas_Canvas *obj);
*
* @return The output/screen coordinate translated to output coordinates.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI int evas_coord_world_x_to_screen(const Evas_Canvas *obj, int x) EINA_WARN_UNUSED_RESULT;
+EVAS_API int evas_coord_world_x_to_screen(const Evas_Canvas *obj, int x) EINA_WARN_UNUSED_RESULT;
/**
* @brief Force immediate renderization of the given Evas canvas.
@@ -785,11 +797,11 @@ EAPI int evas_coord_world_x_to_screen(const Evas_Canvas *obj, int x) EINA_WARN_U
* @param[in] obj The object.
*
* @return A newly allocated list of updated rectangles of the canvas
- * (@Eina.Rect structs). Free this list with @ref evas_render_updates_free.
+ * (@ref Eina_Rect structs). Free this list with @ref evas_render_updates_free.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI Eina_List *evas_render_updates(Evas_Canvas *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Eina_List *evas_render_updates(Evas_Canvas *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Flush the image cache of the canvas.
@@ -797,9 +809,9 @@ EAPI Eina_List *evas_render_updates(Evas_Canvas *obj) EINA_WARN_UNUSED_RESULT;
* This function flushes image cache of canvas.
* @param[in] obj The object.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_image_cache_flush(Evas_Canvas *obj);
+EVAS_API void evas_image_cache_flush(Evas_Canvas *obj);
/**
* @brief Convert/scale an output screen coordinate into canvas coordinates.
@@ -814,9 +826,9 @@ EAPI void evas_image_cache_flush(Evas_Canvas *obj);
*
* @return The screen coordinate translated to canvas unit coordinates.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI int evas_coord_screen_y_to_world(const Evas_Canvas *obj, int y) EINA_WARN_UNUSED_RESULT;
+EVAS_API int evas_coord_screen_y_to_world(const Evas_Canvas *obj, int y) EINA_WARN_UNUSED_RESULT;
/**
* @brief Removes the @c keyname key from the current list of modifier keys on
@@ -827,15 +839,15 @@ EAPI int evas_coord_screen_y_to_world(const Evas_Canvas *obj, int y) EINA_WARN_U
* @param[in] obj The object.
* @param[in] keyname The name of the key to remove from the modifiers list.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_key_modifier_del(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNULL(2);
+EVAS_API void evas_key_modifier_del(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNULL(2);
/** Inform to the evas that it got the focus from the default seat.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_focus_in(Evas_Canvas *obj);
+EVAS_API void evas_focus_in(Evas_Canvas *obj);
@@ -876,9 +888,9 @@ EAPI void evas_focus_in(Evas_Canvas *obj);
* @param[in] w The rectangle's width.
* @param[in] h The rectangle's height.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_obscured_rectangle_add(Evas_Canvas *obj, int x, int y, int w, int h);
+EVAS_API void evas_obscured_rectangle_add(Evas_Canvas *obj, int x, int y, int w, int h);
/**
* @brief Make the canvas discard as much data as possible used by the engine
@@ -891,15 +903,15 @@ EAPI void evas_obscured_rectangle_add(Evas_Canvas *obj, int x, int y, int w, int
* too.
* @param[in] obj The object.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_render_dump(Evas_Canvas *obj);
+EVAS_API void evas_render_dump(Evas_Canvas *obj);
/** Force renderization of the given canvas.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_render(Evas_Canvas *obj);
+EVAS_API void evas_render(Evas_Canvas *obj);
/**
* @brief Prepends a font path to the list of font paths used by the given
@@ -908,9 +920,9 @@ EAPI void evas_render(Evas_Canvas *obj);
* @param[in] obj The object.
* @param[in] path The new font path.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_font_path_prepend(Evas_Canvas *obj, const char *path) EINA_ARG_NONNULL(2);
+EVAS_API void evas_font_path_prepend(Evas_Canvas *obj, const char *path) EINA_ARG_NONNULL(2);
/**
* @brief Remove all "obscured regions" from an Evas canvas.
@@ -928,9 +940,9 @@ EAPI void evas_font_path_prepend(Evas_Canvas *obj, const char *path) EINA_ARG_NO
* "damage" regions yourself (see @ref evas_damage_rectangle_add).
* @param[in] obj The object.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_obscured_clear(Evas_Canvas *obj);
+EVAS_API void evas_obscured_clear(Evas_Canvas *obj);
/**
* @brief Convert/scale an output screen coordinate into canvas coordinates.
@@ -945,9 +957,9 @@ EAPI void evas_obscured_clear(Evas_Canvas *obj);
*
* @return The screen coordinate translated to canvas unit coordinates.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI int evas_coord_screen_x_to_world(const Evas_Canvas *obj, int x) EINA_WARN_UNUSED_RESULT;
+EVAS_API int evas_coord_screen_x_to_world(const Evas_Canvas *obj, int x) EINA_WARN_UNUSED_RESULT;
/**
* @brief Adds the @c keyname key to the current list of lock keys.
@@ -971,9 +983,9 @@ EAPI int evas_coord_screen_x_to_world(const Evas_Canvas *obj, int x) EINA_WARN_U
* @param[in] obj The object.
* @param[in] keyname The name of the key to add to the locks list.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_key_lock_add(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNULL(2);
+EVAS_API void evas_key_lock_add(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONNULL(2);
/**
* @brief Make the canvas discard internally cached data used for rendering.
@@ -983,9 +995,9 @@ EAPI void evas_key_lock_add(Evas_Canvas *obj, const char *keyname) EINA_ARG_NONN
* buffers, cached data to avoid re-compute of that data etc.
* @param[in] obj The object.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI void evas_render_idle_flush(Evas_Canvas *obj);
+EVAS_API void evas_render_idle_flush(Evas_Canvas *obj);
/**
* @brief Return the default device of a given type.
@@ -999,9 +1011,9 @@ EAPI void evas_render_idle_flush(Evas_Canvas *obj);
*
* @since 1.19
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI Evas_Device *evas_default_device_get(const Evas_Canvas *obj, Evas_Device_Class type);
+EVAS_API Evas_Device *evas_default_device_get(const Evas_Canvas *obj, Evas_Device_Class type);
/**
* @brief Convert/scale a canvas coordinate into output screen coordinates.
@@ -1016,8 +1028,8 @@ EAPI Evas_Device *evas_default_device_get(const Evas_Canvas *obj, Evas_Device_Cl
*
* @return The output/screen coordinate translated to output coordinates.
*
- * @ingroup Evas_Group
+ * @ingroup Evas_Canvas
*/
-EAPI int evas_coord_world_y_to_screen(const Evas_Canvas *obj, int y) EINA_WARN_UNUSED_RESULT;
+EVAS_API int evas_coord_world_y_to_screen(const Evas_Canvas *obj, int y) EINA_WARN_UNUSED_RESULT;
#endif
diff --git a/src/lib/evas/canvas/evas_clip.c b/src/lib/evas/canvas/evas_clip.c
index 476183d55d..1c3206e8a0 100644
--- a/src/lib/evas/canvas/evas_clip.c
+++ b/src/lib/evas/canvas/evas_clip.c
@@ -58,7 +58,7 @@ evas_object_recalc_clippees(Evas_Object_Protected_Data *obj)
* or any change in clipper of an object or any change in smart object
* membership needs to walk the obj tree both up and down from the changed
* object and probably walk entire object trees to find these and mark them.
- * thats silly-expensive and i was about to fix it that way but it has since
+ * that's silly-expensive and i was about to fix it that way but it has since
* dawned on me that that is just going to kill performance in some critical
* areas like during object setup and manipulation, as well as teardown.
*
@@ -74,30 +74,30 @@ evas_object_recalc_clippees(Evas_Object_Protected_Data *obj)
#define MAP_ACROSS 1
static void
-evas_object_child_map_across_mark(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object *map_obj, Eina_Bool force, Eina_Hash *visited)
+evas_object_child_map_across_mark(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object *map_obj, Eina_Bool force, Eina_Array* visited)
{
#ifdef MAP_ACROSS
Eina_Bool clear_visited = EINA_FALSE;
-
if (!visited)
{
- visited = eina_hash_pointer_new(NULL);
+ visited = &obj->layer->evas->map_clip_objects;
clear_visited = EINA_TRUE;
}
- if (eina_hash_find(visited, &eo_obj) == (void *)1) goto end;
- else eina_hash_add(visited, &eo_obj, (void *)1);
-
+
+ if (eina_array_find(visited, (void*) eo_obj, NULL)) goto end;
+ else eina_array_push(visited, (void*) eo_obj);
+
if ((obj->map->cur.map_parent != map_obj) || force)
{
EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
map_write->cur.map_parent = map_obj;
EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
- EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
- {
- state_write->cache.clip.dirty = 1;
- }
- EINA_COW_STATE_WRITE_END(obj, state_write, cur);
+ EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
+ {
+ state_write->cache.clip.dirty = 1;
+ }
+ EINA_COW_STATE_WRITE_END(obj, state_write, cur);
evas_object_clip_recalc(obj);
if (obj->is_smart)
@@ -125,8 +125,9 @@ evas_object_child_map_across_mark(Evas_Object *eo_obj, Evas_Object_Protected_Dat
}
}
}
-end:
- if (clear_visited) eina_hash_free(visited);
+
+end:
+ if (clear_visited) eina_array_clean(visited);
#endif
}
@@ -458,12 +459,10 @@ _clip_unset(Eo *eo_obj, Evas_Object_Protected_Data *obj)
evas_object_clip_across_check(eo_obj, obj);
}
-EAPI void
+EVAS_API void
evas_object_clip_unset(Evas_Object *eo_obj)
{
- Evas_Object_Protected_Data *obj = EVAS_OBJECT_DATA_SAFE_GET(eo_obj);
- EVAS_OBJECT_DATA_ALIVE_CHECK(obj);
- _clip_unset(eo_obj, obj);
+ efl_canvas_object_clipper_set(eo_obj, NULL);
}
static void
@@ -503,7 +502,7 @@ _efl_canvas_object_clipper_prev_reset(Evas_Object_Protected_Data *obj, Eina_Bool
}
}
-EAPI const Eina_List *
+EVAS_API const Eina_List *
evas_object_clipees_get(const Evas_Object *eo_obj)
{
const Evas_Object_Protected_Data *tmp;
@@ -520,7 +519,7 @@ evas_object_clipees_get(const Evas_Object *eo_obj)
return answer;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_clipees_has(const Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj, EINA_FALSE);
diff --git a/src/lib/evas/canvas/evas_data.c b/src/lib/evas/canvas/evas_data.c
index f6b83e7215..a2282b20ea 100644
--- a/src/lib/evas/canvas/evas_data.c
+++ b/src/lib/evas/canvas/evas_data.c
@@ -1,21 +1,21 @@
#include "evas_common_private.h"
#include "evas_private.h"
-EAPI void
+EVAS_API void
evas_object_data_set(Evas_Object *eo_obj, const char *key, const void *data)
{
if (!efl_isa(eo_obj, EFL_CANVAS_OBJECT_CLASS)) return;
efl_key_data_set(eo_obj, key, data);
}
-EAPI void *
+EVAS_API void *
evas_object_data_get(const Evas_Object *eo_obj, const char *key)
{
if (!efl_isa(eo_obj, EFL_CANVAS_OBJECT_CLASS)) return NULL;
return efl_key_data_get(eo_obj, key);
}
-EAPI void *
+EVAS_API void *
evas_object_data_del(Evas_Object *eo_obj, const char *key)
{
void *data;
diff --git a/src/lib/evas/canvas/evas_device.c b/src/lib/evas/canvas/evas_device.c
index 112132574d..baad7522a2 100644
--- a/src/lib/evas/canvas/evas_device.c
+++ b/src/lib/evas/canvas/evas_device.c
@@ -38,7 +38,7 @@ _new_default_device_find(Evas_Public_Data *e, Evas_Device *old_dev)
{
Eina_List *l;
Evas_Device *dev, *def, *old_parent;
- Evas_Device_Class old_class;
+ Efl_Input_Device_Type old_class;
if (e->cleanup) return NULL;
old_class = efl_input_device_type_get(old_dev);
@@ -47,7 +47,7 @@ _new_default_device_find(Evas_Public_Data *e, Evas_Device *old_dev)
EINA_LIST_FOREACH(e->devices, l, dev)
{
- if ((Evas_Device_Class)efl_input_device_type_get(dev) != old_class)
+ if (efl_input_device_type_get(dev) != old_class)
continue;
def = dev;
@@ -59,9 +59,9 @@ _new_default_device_find(Evas_Public_Data *e, Evas_Device *old_dev)
if (!def)
{
const char *class_str;
- if (old_class == EVAS_DEVICE_CLASS_SEAT)
+ if (old_class == EFL_INPUT_DEVICE_TYPE_SEAT)
class_str = "seat";
- else if (old_class == EVAS_DEVICE_CLASS_KEYBOARD)
+ else if (old_class == EFL_INPUT_DEVICE_TYPE_KEYBOARD)
class_str = "keyboard";
else
class_str = "mouse";
@@ -108,7 +108,9 @@ _del_cb(void *data, const Efl_Event *ev)
}
if (devtype == EFL_INPUT_DEVICE_TYPE_MOUSE)
- _evas_pointer_data_remove(e, ev->object);
+ {
+ _evas_pointer_data_remove(e, ev->object, EINA_TRUE);
+ }
eina_hash_del_by_key(e->locks.masks, &ev->object);
eina_hash_del_by_key(e->modifiers.masks, &ev->object);
efl_event_callback_call(e->evas, EFL_CANVAS_SCENE_EVENT_DEVICE_REMOVED,
@@ -135,7 +137,7 @@ _evas_canvas_efl_canvas_scene_device_get(Evas *eo_e EINA_UNUSED, Evas_Public_Dat
return NULL;
}
-EAPI Evas_Device *
+EVAS_API Evas_Device *
evas_device_get(Evas *eo_e, const char *name)
{
return efl_canvas_scene_device_get(eo_e, name);
@@ -165,13 +167,13 @@ _evas_canvas_efl_canvas_scene_seat_get(Evas *eo_e EINA_UNUSED, Evas_Public_Data
return NULL;
}
-EAPI Evas_Device *
+EVAS_API Evas_Device *
evas_device_get_by_seat_id(Evas *eo_e, unsigned int id)
{
return efl_canvas_scene_seat_get(eo_e, id);
}
-EAPI Evas_Device *
+EVAS_API Evas_Device *
evas_device_add(Evas *eo_e)
{
return evas_device_add_full(eo_e, NULL, NULL, NULL, NULL,
@@ -179,7 +181,7 @@ evas_device_add(Evas *eo_e)
EVAS_DEVICE_SUBCLASS_NONE);
}
-EAPI Evas_Device *
+EVAS_API Evas_Device *
evas_device_add_full(Evas *eo_e, const char *name, const char *desc,
Evas_Device *parent_dev, Evas_Device *emulation_dev,
Evas_Device_Class clas, Evas_Device_Subclass sub_clas)
@@ -192,7 +194,7 @@ evas_device_add_full(Evas *eo_e, const char *name, const char *desc,
dev = efl_add_ref(EFL_INPUT_DEVICE_CLASS, parent_dev ?: eo_e,
efl_name_set(efl_added, name),
efl_comment_set(efl_added, desc),
- efl_input_device_type_set(efl_added, clas),
+ efl_input_device_type_set(efl_added, (Efl_Input_Device_Type)clas),
efl_input_device_source_set(efl_added, emulation_dev),
efl_input_device_evas_set(efl_added, eo_e),
efl_input_device_subclass_set(efl_added, sub_clas));
@@ -261,7 +263,7 @@ evas_device_add_full(Evas *eo_e, const char *name, const char *desc,
return dev;
}
-EAPI void
+EVAS_API void
evas_device_del(Evas_Device *dev)
{
if (!efl_invalidated_get(dev))
@@ -269,7 +271,7 @@ evas_device_del(Evas_Device *dev)
efl_unref(dev);
}
-EAPI void
+EVAS_API void
evas_device_push(Evas *eo_e, Evas_Device *dev)
{
Evas_Public_Data *e = efl_data_scope_safe_get(eo_e, EVAS_CANVAS_CLASS);
@@ -283,7 +285,7 @@ evas_device_push(Evas *eo_e, Evas_Device *dev)
eina_array_push(e->cur_device, dev);
}
-EAPI void
+EVAS_API void
evas_device_pop(Evas *eo_e)
{
Evas_Device *dev;
@@ -294,7 +296,7 @@ evas_device_pop(Evas *eo_e)
if (dev) efl_unref(dev);
}
-EAPI const Eina_List *
+EVAS_API const Eina_List *
evas_device_list(Evas *eo_e, const Evas_Device *dev)
{
if (dev) return efl_input_device_children_get(dev);
@@ -303,33 +305,33 @@ evas_device_list(Evas *eo_e, const Evas_Device *dev)
return e ? e->devices : NULL;
}
-EAPI void
+EVAS_API void
evas_device_name_set(Evas_Device *dev, const char *name)
{
efl_name_set(dev, name);
evas_event_callback_call(efl_input_device_evas_get(dev), EVAS_CALLBACK_DEVICE_CHANGED, dev);
}
-EAPI const char *
+EVAS_API const char *
evas_device_name_get(const Evas_Device *dev)
{
return efl_name_get(dev);
}
-EAPI void
+EVAS_API void
evas_device_description_set(Evas_Device *dev, const char *desc)
{
efl_comment_set(dev, desc);
evas_event_callback_call(efl_input_device_evas_get(dev), EVAS_CALLBACK_DEVICE_CHANGED, dev);
}
-EAPI const char *
+EVAS_API const char *
evas_device_description_get(const Evas_Device *dev)
{
return efl_comment_get(dev);
}
-EAPI void
+EVAS_API void
evas_device_parent_set(Evas_Device *dev EINA_UNUSED, Evas_Device *parent EINA_UNUSED)
{
// Note: This function should be deprecated. parent_set doesn't make sense
@@ -338,7 +340,7 @@ evas_device_parent_set(Evas_Device *dev EINA_UNUSED, Evas_Device *parent EINA_UN
ERR("It is not advised and possible anymore to changed the parent of an Evas_Device.");
}
-EAPI const Evas_Device *
+EVAS_API const Evas_Device *
evas_device_parent_get(const Evas_Device *dev)
{
Eo *parent = efl_parent_get(dev);
@@ -349,7 +351,7 @@ evas_device_parent_get(const Evas_Device *dev)
return parent;
}
-EAPI void
+EVAS_API void
evas_device_class_set(Evas_Device *dev, Evas_Device_Class clas)
{
EINA_SAFETY_ON_TRUE_RETURN(efl_finalized_get(dev));
@@ -362,10 +364,10 @@ evas_device_class_set(Evas_Device *dev, Evas_Device_Class clas)
if ((Evas_Device_Class)klass == clas)
return;
- if (_is_pointer(klass))
- _evas_pointer_data_remove(edata, dev);
+ if (_is_pointer((Evas_Device_Class)klass))
+ _evas_pointer_data_remove(edata, dev, EINA_FALSE);
- efl_input_device_type_set(dev, clas);
+ efl_input_device_type_set(dev, (Efl_Input_Device_Type)clas);
if (_is_pointer(clas))
_evas_pointer_data_add(edata, dev);
@@ -373,45 +375,45 @@ evas_device_class_set(Evas_Device *dev, Evas_Device_Class clas)
evas_event_callback_call(efl_input_device_evas_get(dev), EVAS_CALLBACK_DEVICE_CHANGED, dev);
}
-EAPI Evas_Device_Class
+EVAS_API Evas_Device_Class
evas_device_class_get(const Evas_Device *dev)
{
- return efl_input_device_type_get(dev);
+ return (Evas_Device_Class)efl_input_device_type_get(dev);
}
-EAPI void
+EVAS_API void
evas_device_subclass_set(Evas_Device *dev, Evas_Device_Subclass clas)
{
efl_input_device_subclass_set(dev, clas);
evas_event_callback_call(efl_input_device_evas_get(dev), EVAS_CALLBACK_DEVICE_CHANGED, dev);
}
-EAPI Evas_Device_Subclass
+EVAS_API Evas_Device_Subclass
evas_device_subclass_get(const Evas_Device *dev)
{
return efl_input_device_subclass_get(dev);
}
-EAPI void
+EVAS_API void
evas_device_emulation_source_set(Evas_Device *dev, Evas_Device *src)
{
efl_input_device_source_set(dev, src);
evas_event_callback_call(efl_input_device_evas_get(dev), EVAS_CALLBACK_DEVICE_CHANGED, dev);
}
-EAPI const Evas_Device *
+EVAS_API const Evas_Device *
evas_device_emulation_source_get(const Evas_Device *dev)
{
return efl_input_device_source_get(dev);
}
-EAPI void
+EVAS_API void
evas_device_seat_id_set(Evas_Device *dev, unsigned int id)
{
efl_input_device_seat_id_set(dev, id);
}
-EAPI unsigned int
+EVAS_API unsigned int
evas_device_seat_id_get(const Evas_Device *dev)
{
return efl_input_device_seat_id_get(dev);
@@ -469,7 +471,7 @@ Evas_Device *
_evas_device_top_get(const Evas *eo_e)
{
int num;
-
+
Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
if (!e->cur_device) return NULL;
num = eina_array_count(e->cur_device);
@@ -496,7 +498,7 @@ _evas_canvas_efl_canvas_scene_pointer_position_get(const Eo *eo_e, Evas_Public_D
EINA_SAFETY_ON_NULL_RETURN_VAL(it, EINA_FALSE);
EINA_ITERATOR_FOREACH(it, child)
- if (_is_pointer(efl_input_device_type_get(child)))
+ if (_is_pointer((Evas_Device_Class)efl_input_device_type_get(child)))
break;
if (child)
*pos = efl_input_pointer_position_get(child);
diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c
index 12b38f1621..c76fb52de1 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -87,7 +87,7 @@ _evas_event_havemap_adjust_f(Evas_Object_Protected_Data *obj, Eina_Vector2 *cur_
if (!_evas_event_havemap_adjust_f_inline(obj, &tmp_pt, mouse_grabbed)) return;
prev_pt->x += (tmp_pt.x - cur_pt->x);
- prev_pt->y += (tmp_pt.x - cur_pt->y);
+ prev_pt->y += (tmp_pt.y - cur_pt->y);
*cur_pt = tmp_pt;
}
@@ -815,7 +815,7 @@ _evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas *eo_e,
ev->action = EFL_POINTER_ACTION_IN;
evas_object_event_callback_call(eo_child, child, EVAS_CALLBACK_MOUSE_IN, evt,
event_id2, EFL_EVENT_POINTER_IN);
- if ((cur_pt.x != prev_pt.x) && (cur_pt.y != prev_pt.y))
+ if (!EINA_DBL_EQ(cur_pt.x, prev_pt.x) || !EINA_DBL_EQ(cur_pt.y, prev_pt.y))
{
ev->action = EFL_POINTER_ACTION_MOVE;
evas_object_event_callback_call(eo_child, child, EVAS_CALLBACK_MOUSE_MOVE, evt,
@@ -1037,7 +1037,35 @@ _evas_event_source_multi_down_events(Evas_Object_Protected_Data *obj, Evas_Publi
if (pdata->seat->mouse_grabbed == 0)
{
- if (pdata->seat->downs > 1) addgrab = pdata->seat->downs - 1;
+ if (pdata->seat->downs > 1)
+ addgrab = pdata->seat->downs - 1;
+ else /* this is the first touch, which means it's also a move event, which means we need to redo this */
+ {
+ Eina_List *ins = NULL;
+
+ if (src->is_smart)
+ {
+ int no_rep = 0;
+ ins = _evas_event_object_list_raw_in_get
+ (e->evas, ins, evas_object_smart_members_get_direct(eo_src), NULL, NULL,
+ ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE, EINA_FALSE);
+ }
+ if (src->is_event_parent)
+ {
+ int no_rep = 0;
+ ins = _evas_event_object_list_raw_in_get
+ (e->evas, ins, NULL, evas_object_event_grabber_members_list(eo_src), NULL,
+ ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE, EINA_FALSE);
+ }
+ else
+ ins = eina_list_append(ins, eo_src);
+ EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, src->proxy, Evas_Object_Proxy_Data, proxy_write)
+ {
+ eina_list_free(proxy_write->src_event_in);
+ proxy_write->src_event_in = ins;
+ }
+ EINA_COW_WRITE_END(evas_object_proxy_cow, src->proxy, proxy_write);
+ }
}
EINA_LIST_FOREACH(src->proxy->src_event_in, l, eo_child)
@@ -1340,7 +1368,7 @@ _evas_event_source_mouse_in_events(Evas_Object *eo_obj, Evas *eo_e,
ev->action = EFL_POINTER_ACTION_IN;
evas_object_event_callback_call(eo_child, child, EVAS_CALLBACK_MOUSE_IN, evt,
event_id, EFL_EVENT_POINTER_IN);
- if ((cur_pt.x != prev_pt.x) || (cur_pt.y != prev_pt.y))
+ if (!EINA_DBL_EQ(cur_pt.x, prev_pt.x) || !EINA_DBL_EQ(cur_pt.y, prev_pt.y))
{
ev->action = EFL_POINTER_ACTION_MOVE;
evas_object_event_callback_call(eo_child, child, EVAS_CALLBACK_MOUSE_MOVE, evt,
@@ -1508,13 +1536,13 @@ _canvas_event_thaw_eval_internal(Eo *eo_e, Evas_Public_Data *e)
e->last_timestamp, NULL);
}
-EAPI void
+EVAS_API void
evas_event_freeze(Evas *eo_e)
{
efl_event_freeze(eo_e);
}
-EAPI void
+EVAS_API void
evas_event_thaw(Evas *eo_e)
{
efl_event_thaw(eo_e);
@@ -1553,13 +1581,13 @@ _evas_canvas_efl_object_event_thaw(Eo *eo_e, Evas_Public_Data *e)
}
}
-EAPI int
+EVAS_API int
evas_event_freeze_get(const Evas *eo_e)
{
return efl_event_freeze_count_get(eo_e);
}
-EAPI void
+EVAS_API void
evas_event_thaw_eval(Evas *eo_e)
{
if (!evas_event_freeze_get(eo_e))
@@ -1614,7 +1642,7 @@ _canvas_event_feed_mouse_down_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da
ev->cur.y = pdata->seat->y;
ev->modifiers = &(e->modifiers);
ev->locks = &(e->locks);
- ev->event_flags = e->default_event_flags;
+ ev->event_flags = (Efl_Input_Flags)e->default_event_flags;
ev->touch_id = 0;
ev->action = EFL_POINTER_ACTION_DOWN;
ev->value_flags |= value_flags;
@@ -1885,7 +1913,7 @@ _canvas_event_feed_mouse_up_internal(Evas_Public_Data *e, Efl_Input_Pointer_Data
ev->cur.y = pdata->seat->y;
ev->modifiers = &(e->modifiers);
ev->locks = &(e->locks);
- ev->event_flags = e->default_event_flags;
+ ev->event_flags = (Efl_Input_Flags)e->default_event_flags;
ev->touch_id = 0;
ev->value_flags |= value_flags;
if (ev->device) efl_ref(ev->device);
@@ -2020,7 +2048,7 @@ _canvas_event_feed_mouse_updown(Eo *eo_e, int b, Evas_Button_Flags flags,
else
ev->action = down ? EFL_POINTER_ACTION_DOWN : EFL_POINTER_ACTION_UP;
ev->button = b;
- ev->button_flags = flags;
+ ev->button_flags = (Efl_Pointer_Flags)flags;
ev->radius = 1;
ev->radius_x = 1;
ev->radius_y = 1;
@@ -2054,14 +2082,14 @@ _canvas_event_feed_mouse_updown_legacy(Eo *eo_e, int b, Evas_Button_Flags flags,
_canvas_event_feed_mouse_updown(eo_e, b, flags, timestamp, data, down, NULL, EINA_FALSE);
}
-EAPI void
+EVAS_API void
evas_event_feed_mouse_down(Eo *eo_e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
_canvas_event_feed_mouse_updown_legacy(eo_e, b, flags, timestamp, data, 1);
}
-EAPI void
+EVAS_API void
evas_event_feed_mouse_up(Eo *eo_e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -2107,7 +2135,7 @@ _canvas_event_feed_mouse_cancel_internal(Evas_Public_Data *e, Efl_Input_Pointer_
ev->action = EFL_POINTER_ACTION_CANCEL;
ev->value_flags |= value_flags;
- ev->event_flags = flags;
+ ev->event_flags = (Efl_Input_Flags)flags;
EINA_LIST_FOREACH_SAFE(e->touch_points, l, ll, point)
{
if ((point->state == EVAS_TOUCH_POINT_DOWN) ||
@@ -2127,7 +2155,7 @@ _canvas_event_feed_mouse_cancel_internal(Evas_Public_Data *e, Efl_Input_Pointer_
*ev = save;
}
-EAPI void
+EVAS_API void
evas_event_feed_mouse_cancel(Eo *eo_e, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -2184,7 +2212,7 @@ _canvas_event_feed_mouse_wheel_internal(Eo *eo_e, Efl_Input_Pointer_Data *pe)
ev->cur.y = pdata->seat->y;
ev->modifiers = &(e->modifiers);
ev->locks = &(e->locks);
- ev->event_flags = e->default_event_flags;
+ ev->event_flags = (Efl_Input_Flags)e->default_event_flags;
ev->action = EFL_POINTER_ACTION_WHEEL;
ev->value_flags |= value_flags;
@@ -2225,7 +2253,7 @@ _canvas_event_feed_mouse_wheel_internal(Eo *eo_e, Efl_Input_Pointer_Data *pe)
_evas_unwalk(e);
}
-EAPI void
+EVAS_API void
evas_event_feed_mouse_wheel(Eo *eo_e, int direction, int z, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -2314,7 +2342,7 @@ _canvas_event_feed_mouse_move_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da
evt = ev->eo;
ev->modifiers = &(e->modifiers);
ev->locks = &(e->locks);
- ev->event_flags = e->default_event_flags;
+ ev->event_flags = (Efl_Input_Flags)e->default_event_flags;
ev->pressed_buttons = pdata->button;
ev->touch_id = 0;
ev->value_flags |= value_flags;
@@ -2322,7 +2350,7 @@ _canvas_event_feed_mouse_move_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da
_evas_walk(e);
/* update moved touch point */
- if ((prev_pt.x != cur_pt.x) || (prev_pt.y != cur_pt.y))
+ if (!EINA_DBL_EQ(cur_pt.x, prev_pt.x) || !EINA_DBL_EQ(cur_pt.y, prev_pt.y))
_evas_touch_point_update(eo_e, 0, pdata->seat->x, pdata->seat->y, EVAS_TOUCH_POINT_MOVE);
/* if our mouse button is grabbed to any objects */
if (pdata->seat->mouse_grabbed > 0)
@@ -2359,7 +2387,7 @@ _canvas_event_feed_mouse_move_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da
ev->cur = cur_pt;
ev->prev = prev_pt;
- if ((prev_pt.x != cur_pt.x) || (prev_pt.y != cur_pt.y))
+ if (!EINA_DBL_EQ(cur_pt.x, prev_pt.x) || !EINA_DBL_EQ(cur_pt.y, prev_pt.y))
{
_evas_event_havemap_adjust_f(obj, &ev->cur, &ev->prev, obj_pdata->mouse_grabbed);
@@ -2457,7 +2485,7 @@ _canvas_event_feed_mouse_move_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da
_evas_event_object_pointer_allow_precise(eo_obj, obj, ev->cur.x, ev->cur.y, ins) &&
(obj_pdata->mouse_grabbed || !evas_object_is_source_invisible(eo_obj, obj)))
{
- if ((prev_pt.x != cur_pt.x) || (prev_pt.y != cur_pt.y))
+ if (!EINA_DBL_EQ(cur_pt.x, prev_pt.x) || !EINA_DBL_EQ(cur_pt.y, prev_pt.y))
{
ev->action = EFL_POINTER_ACTION_MOVE;
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, evt,
@@ -2512,7 +2540,7 @@ _canvas_event_feed_mouse_move_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da
ev->action = EFL_POINTER_ACTION_IN;
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_IN, evt,
event_id, EFL_EVENT_POINTER_IN);
- if ((prev_pt.x != cur_pt.x) || (prev_pt.y != cur_pt.y))
+ if (!EINA_DBL_EQ(cur_pt.x, prev_pt.x) || !EINA_DBL_EQ(cur_pt.y, prev_pt.y))
{
ev->action = EFL_POINTER_ACTION_MOVE;
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, evt,
@@ -2605,7 +2633,7 @@ nogrep:
_evas_event_object_pointer_allow_precise(eo_obj, obj, ev->cur.x, ev->cur.y, newin) &&
(obj_pdata->mouse_grabbed || !evas_object_is_source_invisible(eo_obj, obj)))
{
- if ((prev_pt.x != cur_pt.x) || (prev_pt.y != cur_pt.y))
+ if (!EINA_DBL_EQ(cur_pt.x, prev_pt.x) || !EINA_DBL_EQ(cur_pt.y, prev_pt.y))
{
ev->action = EFL_POINTER_ACTION_MOVE;
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, evt,
@@ -2659,7 +2687,7 @@ nogrep:
ev->action = EFL_POINTER_ACTION_IN;
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_IN, evt,
event_id, EFL_EVENT_POINTER_IN);
- if ((prev_pt.x != cur_pt.x) || (prev_pt.y != cur_pt.y))
+ if (!EINA_DBL_EQ(cur_pt.x, prev_pt.x) || !EINA_DBL_EQ(cur_pt.y, prev_pt.y))
{
ev->action = EFL_POINTER_ACTION_MOVE;
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, evt,
@@ -2703,7 +2731,7 @@ _canvas_event_feed_mouse_move_legacy(Evas *eo_e, Evas_Public_Data *e, int x, int
efl_unref(evt);
}
-EAPI void
+EVAS_API void
evas_event_input_mouse_move(Eo *eo_e, int x, int y, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -2711,7 +2739,7 @@ evas_event_input_mouse_move(Eo *eo_e, int x, int y, unsigned int timestamp, cons
_canvas_event_feed_mouse_move_legacy(eo_e, e, x - e->framespace.x, y - e->framespace.y, timestamp, data);
}
-EAPI void
+EVAS_API void
evas_event_feed_mouse_move(Eo *eo_e, int x, int y, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -2767,7 +2795,7 @@ _canvas_event_feed_mouse_in_internal(Evas *eo_e, Efl_Input_Pointer_Data *ev)
ev->cur.y = pdata->seat->y;
ev->modifiers = &(e->modifiers);
ev->locks = &(e->locks);
- ev->event_flags = e->default_event_flags;
+ ev->event_flags = (Efl_Input_Flags)e->default_event_flags;
ev->value_flags |= value_flags;
if (ev->device) efl_ref(ev->device);
@@ -2803,8 +2831,8 @@ _canvas_event_feed_mouse_in_internal(Evas *eo_e, Efl_Input_Pointer_Data *ev)
efl_ref(eo_obj);
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_IN, evt,
event_id, EFL_EVENT_POINTER_IN);
- if ((pdata->seat->x != ev->prev.x) &&
- (pdata->seat->y != ev->prev.y))
+ if (!EINA_DBL_EQ(pdata->seat->x, ev->prev.x) &&
+ !EINA_DBL_EQ(pdata->seat->y, ev->prev.y))
{
ev->action = EFL_POINTER_ACTION_MOVE;
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_MOVE, evt,
@@ -2873,7 +2901,7 @@ _canvas_event_feed_mouse_out_internal(Evas *eo_e, Efl_Input_Pointer_Data *ev)
ev->cur.y = pdata->seat->y;
ev->modifiers = &(e->modifiers);
ev->locks = &(e->locks);
- ev->event_flags = e->default_event_flags;
+ ev->event_flags = (Efl_Input_Flags)e->default_event_flags;
ev->value_flags |= value_flags;
if (ev->device) efl_ref(ev->device);
@@ -2944,14 +2972,14 @@ _canvas_event_feed_mouse_inout_legacy(Eo *eo_e, unsigned int timestamp,
efl_unref(evt);
}
-EAPI void
+EVAS_API void
evas_event_feed_mouse_in(Eo *eo_e, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
_canvas_event_feed_mouse_inout_legacy(eo_e, timestamp, data, EINA_TRUE);
}
-EAPI void
+EVAS_API void
evas_event_feed_mouse_out(Eo *eo_e, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -2997,7 +3025,7 @@ _canvas_event_feed_multi_down_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da
ev->action = EFL_POINTER_ACTION_DOWN;
ev->modifiers = &(e->modifiers);
ev->locks = &(e->locks);
- ev->event_flags = e->default_event_flags;
+ ev->event_flags = (Efl_Input_Flags)e->default_event_flags;
ev->value_flags |= value_flags;
if (ev->device) efl_ref(ev->device);
@@ -3006,7 +3034,17 @@ _canvas_event_feed_multi_down_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da
_evas_touch_point_append(eo_e, ev->touch_id, ev->cur.x, ev->cur.y);
if (pdata->seat->mouse_grabbed == 0)
{
- if (pdata->seat->downs > 1) addgrab = pdata->seat->downs - 1;
+ if (pdata->seat->downs > 1)
+ addgrab = pdata->seat->downs - 1;
+ else /* this is the first touch, which means it's also a move event, which means we need to redo this */
+ {
+ /* get all new in objects */
+ Eina_List *ins = evas_event_objects_event_list(eo_e, NULL, ev->cur.x, ev->cur.y);
+ /* free our old list of ins */
+ eina_list_free(pdata->seat->object.in);
+ /* and set up the new one */
+ pdata->seat->object.in = ins;
+ }
}
copy = evas_event_list_copy(pdata->seat->object.in);
EINA_LIST_FOREACH(copy, l, eo_obj)
@@ -3093,7 +3131,7 @@ _canvas_event_feed_multi_up_internal(Evas_Public_Data *e, Efl_Input_Pointer_Data
ev->action = EFL_POINTER_ACTION_UP;
ev->modifiers = &(e->modifiers);
ev->locks = &(e->locks);
- ev->event_flags = e->default_event_flags;
+ ev->event_flags = (Efl_Input_Flags)e->default_event_flags;
ev->value_flags |= value_flags;
if (ev->device) efl_ref(ev->device);
@@ -3173,7 +3211,7 @@ _canvas_event_feed_multi_internal(Evas *eo_e, Evas_Public_Data *e,
ev->radius = rad;
ev->radius_x = radx;
ev->radius_y = rady;
- ev->button_flags = flags;
+ ev->button_flags = (Efl_Pointer_Flags)flags;
ev->timestamp = timestamp;
ev->data = (void *) data;
ev->device = efl_ref(_evas_event_legacy_device_get(eo_e, EINA_TRUE));
@@ -3198,7 +3236,7 @@ _canvas_event_feed_multi_internal(Evas *eo_e, Evas_Public_Data *e,
efl_unref(evt);
}
-EAPI void
+EVAS_API void
evas_event_input_multi_down(Eo *eo_e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -3209,7 +3247,7 @@ evas_event_input_multi_down(Eo *eo_e, int d, int x, int y, double rad, double ra
fx, fy, flags, timestamp, data, EFL_POINTER_ACTION_DOWN);
}
-EAPI void
+EVAS_API void
evas_event_feed_multi_down(Eo *eo_e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -3218,7 +3256,7 @@ evas_event_feed_multi_down(Eo *eo_e, int d, int x, int y, double rad, double rad
fx, fy, flags, timestamp, data, EFL_POINTER_ACTION_DOWN);
}
-EAPI void
+EVAS_API void
evas_event_input_multi_up(Eo *eo_e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -3229,7 +3267,7 @@ evas_event_input_multi_up(Eo *eo_e, int d, int x, int y, double rad, double radx
fx, fy, flags, timestamp, data, EFL_POINTER_ACTION_UP);
}
-EAPI void
+EVAS_API void
evas_event_feed_multi_up(Eo *eo_e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -3273,7 +3311,7 @@ _canvas_event_feed_multi_move_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da
evt = ev->eo;
ev->modifiers = &(e->modifiers);
ev->locks = &(e->locks);
- ev->event_flags = e->default_event_flags;
+ ev->event_flags = (Efl_Input_Flags)e->default_event_flags;
ev->action = EFL_POINTER_ACTION_MOVE;
ev->value_flags |= value_flags;
if (ev->device) efl_ref(ev->device);
@@ -3377,7 +3415,7 @@ _canvas_event_feed_multi_move_internal(Evas_Public_Data *e, Efl_Input_Pointer_Da
if (ev->device) efl_unref(ev->device);
}
-EAPI void
+EVAS_API void
evas_event_input_multi_move(Eo *eo_e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -3388,7 +3426,7 @@ evas_event_input_multi_move(Eo *eo_e, int d, int x, int y, double rad, double ra
EFL_POINTER_ACTION_MOVE);
}
-EAPI void
+EVAS_API void
evas_event_feed_multi_move(Eo *eo_e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -3463,7 +3501,7 @@ _canvas_event_feed_key_down_internal(Evas_Public_Data *e, Efl_Input_Key_Data *ev
evt = ev->eo;
ev->modifiers = &(e->modifiers);
ev->locks = &(e->locks);
- ev->event_flags = e->default_event_flags;
+ ev->event_flags = (Efl_Input_Flags)e->default_event_flags;
if (ev->device) efl_ref(ev->device);
if (e->grabs)
@@ -3556,7 +3594,7 @@ _canvas_event_feed_key_up_internal(Evas_Public_Data *e, Efl_Input_Key_Data *ev)
evt = ev->eo;
ev->modifiers = &(e->modifiers);
ev->locks = &(e->locks);
- ev->event_flags = e->default_event_flags;
+ ev->event_flags = (Efl_Input_Flags)e->default_event_flags;
if (ev->device) efl_ref(ev->device);
if (e->grabs)
@@ -3664,7 +3702,7 @@ _canvas_event_feed_key_legacy(Eo *eo_e, Evas_Public_Data *e,
efl_unref(evt);
}
-EAPI void
+EVAS_API void
evas_event_feed_key_down(Eo *eo_e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -3673,7 +3711,7 @@ evas_event_feed_key_down(Eo *eo_e, const char *keyname, const char *key, const c
compose, timestamp, data, 0, 1);
}
-EAPI void
+EVAS_API void
evas_event_feed_key_up(Eo *eo_e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -3682,7 +3720,7 @@ evas_event_feed_key_up(Eo *eo_e, const char *keyname, const char *key, const cha
compose, timestamp, data, 0, 0);
}
-EAPI void
+EVAS_API void
evas_event_feed_key_down_with_keycode(Eo *eo_e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data, unsigned int keycode)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -3691,7 +3729,7 @@ evas_event_feed_key_down_with_keycode(Eo *eo_e, const char *keyname, const char
compose, timestamp, data, keycode, 1);
}
-EAPI void
+EVAS_API void
evas_event_feed_key_up_with_keycode(Eo *eo_e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data, unsigned int keycode)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -3700,7 +3738,7 @@ evas_event_feed_key_up_with_keycode(Eo *eo_e, const char *keyname, const char *k
compose, timestamp, data, keycode, 0);
}
-EAPI void
+EVAS_API void
evas_event_feed_hold(Eo *eo_e, int hold, unsigned int timestamp, const void *data)
{
Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
@@ -3723,7 +3761,7 @@ evas_event_feed_hold(Eo *eo_e, int hold, unsigned int timestamp, const void *dat
ev->hold = !!hold;
ev->data = (void *) data;
ev->timestamp = timestamp;
- ev->event_flags = e->default_event_flags;
+ ev->event_flags = (Efl_Input_Flags)e->default_event_flags;
ev->device = efl_ref(_evas_event_legacy_device_get(eo_e, EINA_TRUE));
pdata = _evas_pointer_data_by_device_get(e, ev->device);
@@ -3802,7 +3840,7 @@ _canvas_event_feed_axis_update_internal(Evas_Public_Data *e, Efl_Input_Pointer_D
if (ev->device) efl_unref(ev->device);
}
-EAPI void
+EVAS_API void
evas_event_feed_axis_update(Evas *eo_e, unsigned int timestamp, int device, int toolid, int naxis, const Evas_Axis *axes, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
@@ -3966,7 +4004,7 @@ _efl_canvas_object_efl_object_event_thaw(Eo *obj, Evas_Object_Protected_Data *pd
efl_event_thaw(efl_super(obj, EFL_CANVAS_OBJECT_CLASS));
}
-EAPI void
+EVAS_API void
evas_object_freeze_events_set(Eo *eo_obj, Eina_Bool freeze)
{
Evas_Object_Protected_Data *pd = EVAS_OBJECT_DATA_SAFE_GET(eo_obj);
@@ -3984,7 +4022,7 @@ evas_object_freeze_events_set(Eo *eo_obj, Eina_Bool freeze)
efl_event_thaw(eo_obj);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_freeze_events_get(const Eo *eo_obj EINA_UNUSED)
{
return (efl_event_freeze_count_get(eo_obj) > 0);
@@ -4197,7 +4235,7 @@ _efl_canvas_object_efl_canvas_pointer_pointer_inside_get(const Eo *eo_obj,
return EINA_FALSE;
}
-EAPI void
+EVAS_API void
evas_event_refeed_event(Eo *eo_e, void *event_copy, Evas_Callback_Type event_type)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
diff --git a/src/lib/evas/canvas/evas_events_legacy.c b/src/lib/evas/canvas/evas_events_legacy.c
index 1204800631..5511741dc3 100644
--- a/src/lib/evas/canvas/evas_events_legacy.c
+++ b/src/lib/evas/canvas/evas_events_legacy.c
@@ -34,15 +34,18 @@ efl_input_pointer_legacy_info_fill(Evas *eo_evas, Efl_Input_Key *eo_ev, Evas_Cal
{
Efl_Input_Pointer_Data *ev = efl_data_scope_get(eo_ev, EFL_INPUT_POINTER_CLASS);
Evas_Public_Data *evas;
+ Evas_Pointer_Data *pdata;
if (!ev) return NULL;
if (!eo_evas) eo_evas = efl_provider_find(eo_ev, EVAS_CANVAS_CLASS);
evas = efl_data_scope_get(eo_evas, EVAS_CANVAS_CLASS);
if (!evas) return NULL;
+ pdata = _evas_pointer_data_by_device_get(evas, ev->device);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(pdata, NULL);
-#define COORD_DUP(e) do { (e)->output.x = (e)->canvas.x; (e)->output.y = (e)->canvas.y; } while (0)
-#define COORD_DUP_CUR(e) do { (e)->cur.output.x = (e)->cur.canvas.x; (e)->cur.output.y = (e)->cur.canvas.y; } while (0)
-#define COORD_DUP_PREV(e) do { (e)->prev.output.x = (e)->prev.canvas.x; (e)->prev.output.y = (e)->prev.canvas.y; } while (0)
+#define COORD_DUP(e) do { (e)->output.x = pdata->seat->x; (e)->output.y = pdata->seat->y; } while (0)
+#define COORD_DUP_CUR(e) do { (e)->cur.output.x = pdata->seat->x; (e)->cur.output.y = pdata->seat->y; } while (0)
+#define COORD_DUP_PREV(e) do { (e)->prev.output.x = pdata->seat->prev.x; (e)->prev.output.y = pdata->seat->prev.y; } while (0)
#define TYPE_CHK(typ) do { if ((type != EVAS_CALLBACK_LAST) && (type != EVAS_CALLBACK_ ## typ)) return NULL; } while (0)
switch (ev->action)
@@ -56,7 +59,7 @@ efl_input_pointer_legacy_info_fill(Evas *eo_evas, Efl_Input_Key *eo_ev, Evas_Cal
COORD_DUP(e);
e->data = ev->data;
e->timestamp = ev->timestamp;
- e->event_flags = ev->event_flags;
+ e->event_flags = (Evas_Event_Flags)ev->event_flags;
e->dev = ev->device;
e->event_src = ev->source;
e->modifiers = ev->modifiers;
@@ -75,7 +78,7 @@ efl_input_pointer_legacy_info_fill(Evas *eo_evas, Efl_Input_Key *eo_ev, Evas_Cal
COORD_DUP(e);
e->data = ev->data;
e->timestamp = ev->timestamp;
- e->event_flags = ev->event_flags;
+ e->event_flags = (Evas_Event_Flags)ev->event_flags;
e->dev = ev->device;
e->event_src = ev->source;
e->modifiers = ev->modifiers;
@@ -98,9 +101,9 @@ efl_input_pointer_legacy_info_fill(Evas *eo_evas, Efl_Input_Key *eo_ev, Evas_Cal
e->canvas.y = ev->cur.y;
COORD_DUP(e);
e->data = ev->data;
- e->flags = ev->button_flags;
+ e->flags = (Evas_Button_Flags)ev->button_flags;
e->timestamp = ev->timestamp;
- e->event_flags = ev->event_flags;
+ e->event_flags = (Evas_Event_Flags)ev->event_flags;
e->dev = ev->device;
e->event_src = ev->source;
e->modifiers = ev->modifiers;
@@ -125,9 +128,9 @@ efl_input_pointer_legacy_info_fill(Evas *eo_evas, Efl_Input_Key *eo_ev, Evas_Cal
e->canvas.y = ev->cur.y;
COORD_DUP(e);
e->data = ev->data;
- e->flags = ev->button_flags;
+ e->flags = (Evas_Button_Flags)ev->button_flags;
e->timestamp = ev->timestamp;
- e->event_flags = ev->event_flags;
+ e->event_flags = (Evas_Event_Flags)ev->event_flags;
e->dev = ev->device;
e->modifiers = ev->modifiers;
e->locks = ev->locks;
@@ -149,9 +152,9 @@ efl_input_pointer_legacy_info_fill(Evas *eo_evas, Efl_Input_Key *eo_ev, Evas_Cal
e->canvas.y = ev->cur.y;
COORD_DUP(e);
e->data = ev->data;
- e->flags = ev->button_flags;
+ e->flags = (Evas_Button_Flags)ev->button_flags;
e->timestamp = ev->timestamp;
- e->event_flags = ev->event_flags;
+ e->event_flags = (Evas_Event_Flags)ev->event_flags;
e->dev = ev->device;
e->event_src = ev->source;
e->modifiers = ev->modifiers;
@@ -176,9 +179,9 @@ efl_input_pointer_legacy_info_fill(Evas *eo_evas, Efl_Input_Key *eo_ev, Evas_Cal
e->canvas.y = ev->cur.y;
COORD_DUP(e);
e->data = ev->data;
- e->flags = ev->button_flags;
+ e->flags = (Evas_Button_Flags)ev->button_flags;
e->timestamp = ev->timestamp;
- e->event_flags = ev->event_flags;
+ e->event_flags = (Evas_Event_Flags)ev->event_flags;
e->dev = ev->device;
e->modifiers = ev->modifiers;
e->locks = ev->locks;
@@ -204,7 +207,7 @@ efl_input_pointer_legacy_info_fill(Evas *eo_evas, Efl_Input_Key *eo_ev, Evas_Cal
COORD_DUP_PREV(e);
e->data = ev->data;
e->timestamp = ev->timestamp;
- e->event_flags = ev->event_flags;
+ e->event_flags = (Evas_Event_Flags)ev->event_flags;
e->dev = ev->device;
e->event_src = ev->source;
e->modifiers = ev->modifiers;
@@ -230,7 +233,7 @@ efl_input_pointer_legacy_info_fill(Evas *eo_evas, Efl_Input_Key *eo_ev, Evas_Cal
COORD_DUP_CUR(e);
e->data = ev->data;
e->timestamp = ev->timestamp;
- e->event_flags = ev->event_flags;
+ e->event_flags = (Evas_Event_Flags)ev->event_flags;
e->dev = ev->device;
e->modifiers = ev->modifiers;
e->locks = ev->locks;
@@ -250,7 +253,7 @@ efl_input_pointer_legacy_info_fill(Evas *eo_evas, Efl_Input_Key *eo_ev, Evas_Cal
COORD_DUP(e);
e->data = ev->data;
e->timestamp = ev->timestamp;
- e->event_flags = ev->event_flags;
+ e->event_flags = (Evas_Event_Flags)ev->event_flags;
e->dev = ev->device;
e->modifiers = ev->modifiers;
e->locks = ev->locks;
@@ -359,7 +362,7 @@ efl_input_key_legacy_info_fill(Efl_Input_Key *evt, Evas_Event_Flags **pflags)
e->data = ev->data;
e->modifiers = ev->modifiers;
e->locks = ev->locks;
- e->event_flags = ev->event_flags;
+ e->event_flags = (Evas_Event_Flags)ev->event_flags;
e->dev = ev->device;
if (pflags) *pflags = &e->event_flags;
ev->legacy = e;
@@ -377,7 +380,7 @@ efl_input_key_legacy_info_fill(Efl_Input_Key *evt, Evas_Event_Flags **pflags)
e->data = ev->data;
e->modifiers = ev->modifiers;
e->locks = ev->locks;
- e->event_flags = ev->event_flags;
+ e->event_flags = (Evas_Event_Flags)ev->event_flags;
e->dev = ev->device;
if (pflags) *pflags = &e->event_flags;
ev->legacy = e;
@@ -397,7 +400,7 @@ efl_input_hold_legacy_info_fill(Efl_Input_Hold *evt, Evas_Event_Flags **pflags)
e->timestamp = ev->timestamp;
e->dev = ev->device;
e->hold = ev->hold;
- e->event_flags = ev->event_flags;
+ e->event_flags = (Evas_Event_Flags)ev->event_flags;
if (pflags) *pflags = &e->event_flags;
ev->legacy = e;
diff --git a/src/lib/evas/canvas/evas_filter_mixin.c b/src/lib/evas/canvas/evas_filter_mixin.c
index 00942628f1..11a3fe45b5 100644
--- a/src/lib/evas/canvas/evas_filter_mixin.c
+++ b/src/lib/evas/canvas/evas_filter_mixin.c
@@ -1,9 +1,7 @@
#define EFL_CANVAS_FILTER_INTERNAL_PROTECTED
-#include "evas_common_private.h"
-#include "evas_private.h"
-#include "../../lib/efl/interfaces/efl_gfx_filter.eo.h"
-#include "efl_canvas_filter_internal.eo.h"
+#include <Evas.h>
+
#include "evas_filter.h"
#define MY_CLASS EFL_CANVAS_FILTER_INTERNAL_MIXIN
diff --git a/src/lib/evas/canvas/evas_font_dir.c b/src/lib/evas/canvas/evas_font_dir.c
index 5b945dcb27..2d98916ee6 100644
--- a/src/lib/evas/canvas/evas_font_dir.c
+++ b/src/lib/evas/canvas/evas_font_dir.c
@@ -187,6 +187,9 @@ evas_font_set_get(const char *name)
Eina_List *fonts = NULL;
char *p;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(name, NULL);
+ if (!*name) return NULL;
+
p = strchr(name, ',');
if (!p)
{
@@ -751,6 +754,13 @@ evas_font_load(const Eina_List *font_paths, int hinting, Evas_Font_Description *
{
if (l == fonts || !font) /* First iteration OR no font */
{
+ /*This will suppress warnings for resource leak*/
+ if (font)
+ {
+ evas_common_font_free((RGBA_Font*)font);
+ font = NULL;
+ }
+
if (source) /* Load Font from "eet" source */
{
Eet_File *ef;
@@ -1415,7 +1425,7 @@ evas_object_text_font_string_parse(char *buffer, char dest[14][256])
return n;
}
-EAPI void
+EVAS_API void
evas_font_path_global_append(const char *path)
{
if (!path) return;
@@ -1426,7 +1436,7 @@ evas_font_path_global_append(const char *path)
#endif
}
-EAPI void
+EVAS_API void
evas_font_path_global_prepend(const char *path)
{
if (!path) return;
@@ -1437,7 +1447,7 @@ evas_font_path_global_prepend(const char *path)
#endif
}
-EAPI void
+EVAS_API void
evas_font_path_global_clear(void)
{
while (global_font_path)
@@ -1451,13 +1461,13 @@ evas_font_path_global_clear(void)
#endif
}
-EAPI const Eina_List *
+EVAS_API const Eina_List *
evas_font_path_global_list(void)
{
return global_font_path;
}
-EAPI void
+EVAS_API void
evas_font_reinit(void)
{
#ifdef HAVE_FONTCONFIG
diff --git a/src/lib/evas/canvas/evas_gl.c b/src/lib/evas/canvas/evas_gl.c
index 62b7a3fa0f..db4066a0e6 100644
--- a/src/lib/evas/canvas/evas_gl.c
+++ b/src/lib/evas/canvas/evas_gl.c
@@ -121,7 +121,7 @@ _evas_gl_internal_error_get(Evas_GL *evas_gl)
return tls_data->error_state;
}
-EAPI Evas_GL *
+EVAS_API Evas_GL *
evas_gl_new(Evas *e)
{
Evas_GL *evas_gl;
@@ -171,7 +171,7 @@ evas_gl_new(Evas *e)
return evas_gl;
}
-EAPI void
+EVAS_API void
evas_gl_free(Evas_GL *evas_gl)
{
MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
@@ -199,7 +199,7 @@ evas_gl_free(Evas_GL *evas_gl)
free(evas_gl);
}
-EAPI Evas_GL_Config *
+EVAS_API Evas_GL_Config *
evas_gl_config_new(void)
{
Evas_GL_Config *cfg;
@@ -211,13 +211,13 @@ evas_gl_config_new(void)
return cfg;
}
-EAPI void
+EVAS_API void
evas_gl_config_free(Evas_GL_Config *cfg)
{
if (cfg) free(cfg);
}
-EAPI Evas_GL_Surface *
+EVAS_API Evas_GL_Surface *
evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int height)
{
Evas_GL_Surface *surf;
@@ -265,7 +265,7 @@ evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int
return surf;
}
-EAPI Evas_GL_Surface *
+EVAS_API Evas_GL_Surface *
evas_gl_pbuffer_surface_create(Evas_GL *evas_gl, Evas_GL_Config *cfg,
int w, int h, const int *attrib_list)
{
@@ -321,7 +321,7 @@ evas_gl_pbuffer_surface_create(Evas_GL *evas_gl, Evas_GL_Config *cfg,
return surf;
}
-EAPI void
+EVAS_API void
evas_gl_surface_destroy(Evas_GL *evas_gl, Evas_GL_Surface *surf)
{
// Magic
@@ -369,7 +369,7 @@ evas_gl_engine_data_get(void *evgl)
return _evas_engine_context(evasgl->evas);
}
-EAPI Evas_GL_Context *
+EVAS_API Evas_GL_Context *
evas_gl_context_version_create(Evas_GL *evas_gl, Evas_GL_Context *share_ctx,
Evas_GL_Context_Version version)
{
@@ -419,13 +419,13 @@ evas_gl_context_version_create(Evas_GL *evas_gl, Evas_GL_Context *share_ctx,
return ctx;
}
-EAPI Evas_GL_Context *
+EVAS_API Evas_GL_Context *
evas_gl_context_create(Evas_GL *evas_gl, Evas_GL_Context *share_ctx)
{
return evas_gl_context_version_create(evas_gl, share_ctx, EVAS_GL_GLES_2_X);
}
-EAPI void
+EVAS_API void
evas_gl_context_destroy(Evas_GL *evas_gl, Evas_GL_Context *ctx)
{
@@ -453,7 +453,7 @@ evas_gl_context_destroy(Evas_GL *evas_gl, Evas_GL_Context *ctx)
ctx = NULL;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_gl_make_current(Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_GL_Context *ctx)
{
Eina_Bool ret;
@@ -481,7 +481,7 @@ evas_gl_make_current(Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_GL_Context *c
return ret;
}
-EAPI Evas_GL_Context *
+EVAS_API Evas_GL_Context *
evas_gl_current_context_get(Evas_GL *evas_gl)
{
Evas_GL_Context *comp;
@@ -519,7 +519,7 @@ evas_gl_current_context_get(Evas_GL *evas_gl)
return NULL;
}
-EAPI Evas_GL_Surface *
+EVAS_API Evas_GL_Surface *
evas_gl_current_surface_get(Evas_GL *evas_gl)
{
Evas_GL_Surface *comp;
@@ -557,7 +557,7 @@ evas_gl_current_surface_get(Evas_GL *evas_gl)
return NULL;
}
-EAPI Evas_GL *
+EVAS_API Evas_GL *
evas_gl_current_evas_gl_get(Evas_GL_Context **context, Evas_GL_Surface **surface)
{
Evas_GL *evasgl = NULL;
@@ -577,7 +577,7 @@ evas_gl_current_evas_gl_get(Evas_GL_Context **context, Evas_GL_Surface **surface
return evasgl;
}
-EAPI const char *
+EVAS_API const char *
evas_gl_string_query(Evas_GL *evas_gl, int name)
{
MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
@@ -587,7 +587,7 @@ evas_gl_string_query(Evas_GL *evas_gl, int name)
return evas_gl->evas->engine.func->gl_string_query(_evas_engine_context(evas_gl->evas), name);
}
-EAPI Evas_GL_Func
+EVAS_API Evas_GL_Func
evas_gl_proc_address_get(Evas_GL *evas_gl, const char *name)
{
MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
@@ -597,7 +597,7 @@ evas_gl_proc_address_get(Evas_GL *evas_gl, const char *name)
return (Evas_GL_Func)evas_gl->evas->engine.func->gl_proc_address_get(_evas_engine_context(evas_gl->evas), name);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_gl_native_surface_get(Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_Native_Surface *ns)
{
MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
@@ -622,7 +622,7 @@ evas_gl_native_surface_get(Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_Native_
}
-EAPI Evas_GL_API *
+EVAS_API Evas_GL_API *
evas_gl_api_get(Evas_GL *evas_gl)
{
MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
@@ -632,7 +632,7 @@ evas_gl_api_get(Evas_GL *evas_gl)
return (Evas_GL_API*)evas_gl->evas->engine.func->gl_api_get(_evas_engine_context(evas_gl->evas), EVAS_GL_GLES_2_X);
}
-EAPI Evas_GL_API *
+EVAS_API Evas_GL_API *
evas_gl_context_api_get(Evas_GL *evas_gl, Evas_GL_Context *ctx)
{
MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
@@ -648,7 +648,7 @@ evas_gl_context_api_get(Evas_GL *evas_gl, Evas_GL_Context *ctx)
return (Evas_GL_API*)evas_gl->evas->engine.func->gl_api_get(_evas_engine_context(evas_gl->evas), ctx->version);
}
-EAPI int
+EVAS_API int
evas_gl_rotation_get(Evas_GL *evas_gl)
{
MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
@@ -661,7 +661,7 @@ evas_gl_rotation_get(Evas_GL *evas_gl)
return evas_gl->evas->engine.func->gl_rotation_angle_get(_evas_engine_context(evas_gl->evas));
}
-EAPI int
+EVAS_API int
evas_gl_error_get(Evas_GL *evas_gl)
{
int err;
@@ -684,7 +684,7 @@ end:
return err;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_gl_surface_query(Evas_GL *evas_gl, Evas_GL_Surface *surface, int attribute, void *value)
{
if (!evas_gl) return EINA_FALSE;
diff --git a/src/lib/evas/canvas/evas_grid_eo.c b/src/lib/evas/canvas/evas_grid_eo.c
index 331cd0f9ef..0a6218a865 100644
--- a/src/lib/evas/canvas/evas_grid_eo.c
+++ b/src/lib/evas/canvas/evas_grid_eo.c
@@ -1,43 +1,43 @@
void _evas_grid_grid_size_set(Eo *obj, Evas_Grid_Data *pd, int w, int h);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_grid_size_set, EFL_FUNC_CALL(w, h), int w, int h);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_grid_size_set, EFL_FUNC_CALL(w, h), int w, int h);
void _evas_grid_grid_size_get(const Eo *obj, Evas_Grid_Data *pd, int *w, int *h);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_grid_size_get, EFL_FUNC_CALL(w, h), int *w, int *h);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_obj_grid_size_get, EFL_FUNC_CALL(w, h), int *w, int *h);
Eina_List *_evas_grid_children_get(const Eo *obj, Evas_Grid_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_grid_children_get, Eina_List *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_grid_children_get, Eina_List *, NULL);
Eina_Accessor *_evas_grid_accessor_new(const Eo *obj, Evas_Grid_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_grid_accessor_new, Eina_Accessor *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_grid_accessor_new, Eina_Accessor *, NULL);
void _evas_grid_clear(Eo *obj, Evas_Grid_Data *pd, Eina_Bool clear);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_grid_clear, EFL_FUNC_CALL(clear), Eina_Bool clear);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_grid_clear, EFL_FUNC_CALL(clear), Eina_Bool clear);
Eina_Iterator *_evas_grid_iterator_new(const Eo *obj, Evas_Grid_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_grid_iterator_new, Eina_Iterator *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_grid_iterator_new, Eina_Iterator *, NULL);
Efl_Canvas_Object *_evas_grid_add_to(Eo *obj, Evas_Grid_Data *pd);
-EOAPI EFL_FUNC_BODY(evas_obj_grid_add_to, Efl_Canvas_Object *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY(evas_obj_grid_add_to, Efl_Canvas_Object *, NULL);
Eina_Bool _evas_grid_unpack(Eo *obj, Evas_Grid_Data *pd, Efl_Canvas_Object *child);
-EOAPI EFL_FUNC_BODYV(evas_obj_grid_unpack, Eina_Bool, 0, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_grid_unpack, Eina_Bool, 0, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
Eina_Bool _evas_grid_pack_get(const Eo *obj, Evas_Grid_Data *pd, Efl_Canvas_Object *child, int *x, int *y, int *w, int *h);
-EOAPI EFL_FUNC_BODYV_CONST(evas_obj_grid_pack_get, Eina_Bool, 0, EFL_FUNC_CALL(child, x, y, w, h), Efl_Canvas_Object *child, int *x, int *y, int *w, int *h);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_obj_grid_pack_get, Eina_Bool, 0, EFL_FUNC_CALL(child, x, y, w, h), Efl_Canvas_Object *child, int *x, int *y, int *w, int *h);
Eina_Bool _evas_grid_pack(Eo *obj, Evas_Grid_Data *pd, Efl_Canvas_Object *child, int x, int y, int w, int h);
-EOAPI EFL_FUNC_BODYV(evas_obj_grid_pack, Eina_Bool, 0, EFL_FUNC_CALL(child, x, y, w, h), Efl_Canvas_Object *child, int x, int y, int w, int h);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_grid_pack, Eina_Bool, 0, EFL_FUNC_CALL(child, x, y, w, h), Efl_Canvas_Object *child, int x, int y, int w, int h);
Efl_Object *_evas_grid_efl_object_constructor(Eo *obj, Evas_Grid_Data *pd);
@@ -90,6 +90,6 @@ static const Efl_Class_Description _evas_grid_class_desc = {
NULL
};
-EFL_DEFINE_CLASS(evas_grid_class_get, &_evas_grid_class_desc, EFL_CANVAS_GROUP_CLASS, NULL);
+EFL_DEFINE_CLASS(evas_grid_class_get, &_evas_grid_class_desc, EFL_CANVAS_GROUP_CLASS, EFL_UI_I18N_INTERFACE, NULL);
#include "evas_grid_eo.legacy.c"
diff --git a/src/lib/evas/canvas/evas_grid_eo.h b/src/lib/evas/canvas/evas_grid_eo.h
index 4064c62e1d..f6ce03d5b5 100644
--- a/src/lib/evas/canvas/evas_grid_eo.h
+++ b/src/lib/evas/canvas/evas_grid_eo.h
@@ -19,7 +19,7 @@ typedef Eo Evas_Grid;
*/
#define EVAS_GRID_CLASS evas_grid_class_get()
-EWAPI const Efl_Class *evas_grid_class_get(void);
+EVAS_API EVAS_API_WEAK const Efl_Class *evas_grid_class_get(void) EINA_CONST;
/**
* @brief Set the virtual resolution for the grid
@@ -32,7 +32,7 @@ EWAPI const Efl_Class *evas_grid_class_get(void);
*
* @ingroup Evas_Grid
*/
-EOAPI void evas_obj_grid_size_set(Eo *obj, int w, int h);
+EVAS_API EVAS_API_WEAK void evas_obj_grid_size_set(Eo *obj, int w, int h);
/**
* @brief Get the current virtual resolution
@@ -47,7 +47,7 @@ EOAPI void evas_obj_grid_size_set(Eo *obj, int w, int h);
*
* @ingroup Evas_Grid
*/
-EOAPI void evas_obj_grid_size_get(const Eo *obj, int *w, int *h);
+EVAS_API EVAS_API_WEAK void evas_obj_grid_size_get(const Eo *obj, int *w, int *h);
/**
* @brief Get the list of children for the grid.
@@ -65,7 +65,7 @@ EOAPI void evas_obj_grid_size_get(const Eo *obj, int *w, int *h);
*
* @ingroup Evas_Grid
*/
-EOAPI Eina_List *evas_obj_grid_children_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Eina_List *evas_obj_grid_children_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Get an accessor to get random access to the list of children for the
@@ -81,7 +81,7 @@ EOAPI Eina_List *evas_obj_grid_children_get(const Eo *obj) EINA_WARN_UNUSED_RESU
*
* @ingroup Evas_Grid
*/
-EOAPI Eina_Accessor *evas_obj_grid_accessor_new(const Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Eina_Accessor *evas_obj_grid_accessor_new(const Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Faster way to remove all child objects from a grid object.
@@ -93,7 +93,7 @@ EOAPI Eina_Accessor *evas_obj_grid_accessor_new(const Eo *obj) EINA_WARN_UNUSED_
*
* @ingroup Evas_Grid
*/
-EOAPI void evas_obj_grid_clear(Eo *obj, Eina_Bool clear);
+EVAS_API EVAS_API_WEAK void evas_obj_grid_clear(Eo *obj, Eina_Bool clear);
/**
* @brief Get an iterator to walk the list of children for the grid.
@@ -108,7 +108,7 @@ EOAPI void evas_obj_grid_clear(Eo *obj, Eina_Bool clear);
*
* @ingroup Evas_Grid
*/
-EOAPI Eina_Iterator *evas_obj_grid_iterator_new(const Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Eina_Iterator *evas_obj_grid_iterator_new(const Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Create a grid that is child of a given element parent.
@@ -123,7 +123,7 @@ EOAPI Eina_Iterator *evas_obj_grid_iterator_new(const Eo *obj) EINA_WARN_UNUSED_
*
* @ingroup Evas_Grid
*/
-EOAPI Efl_Canvas_Object *evas_obj_grid_add_to(Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Efl_Canvas_Object *evas_obj_grid_add_to(Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Remove child from grid.
@@ -141,7 +141,7 @@ EOAPI Efl_Canvas_Object *evas_obj_grid_add_to(Eo *obj) EINA_WARN_UNUSED_RESULT;
*
* @ingroup Evas_Grid
*/
-EOAPI Eina_Bool evas_obj_grid_unpack(Eo *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK Eina_Bool evas_obj_grid_unpack(Eo *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
/**
* @brief Get the pack options for a grid child
@@ -162,7 +162,7 @@ EOAPI Eina_Bool evas_obj_grid_unpack(Eo *obj, Efl_Canvas_Object *child) EINA_ARG
*
* @ingroup Evas_Grid
*/
-EOAPI Eina_Bool evas_obj_grid_pack_get(const Eo *obj, Efl_Canvas_Object *child, int *x, int *y, int *w, int *h);
+EVAS_API EVAS_API_WEAK Eina_Bool evas_obj_grid_pack_get(const Eo *obj, Efl_Canvas_Object *child, int *x, int *y, int *w, int *h);
/**
* @brief Add a new child to a grid object.
@@ -180,6 +180,6 @@ EOAPI Eina_Bool evas_obj_grid_pack_get(const Eo *obj, Efl_Canvas_Object *child,
*
* @ingroup Evas_Grid
*/
-EOAPI Eina_Bool evas_obj_grid_pack(Eo *obj, Efl_Canvas_Object *child, int x, int y, int w, int h) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK Eina_Bool evas_obj_grid_pack(Eo *obj, Efl_Canvas_Object *child, int x, int y, int w, int h) EINA_ARG_NONNULL(2);
#endif
diff --git a/src/lib/evas/canvas/evas_grid_eo.legacy.c b/src/lib/evas/canvas/evas_grid_eo.legacy.c
index 5447f1c390..44738579ef 100644
--- a/src/lib/evas/canvas/evas_grid_eo.legacy.c
+++ b/src/lib/evas/canvas/evas_grid_eo.legacy.c
@@ -1,59 +1,59 @@
-EAPI void
+EVAS_API void
evas_object_grid_size_set(Evas_Grid *obj, int w, int h)
{
evas_obj_grid_size_set(obj, w, h);
}
-EAPI void
+EVAS_API void
evas_object_grid_size_get(const Evas_Grid *obj, int *w, int *h)
{
evas_obj_grid_size_get(obj, w, h);
}
-EAPI Eina_List *
+EVAS_API Eina_List *
evas_object_grid_children_get(const Evas_Grid *obj)
{
return evas_obj_grid_children_get(obj);
}
-EAPI Eina_Accessor *
+EVAS_API Eina_Accessor *
evas_object_grid_accessor_new(const Evas_Grid *obj)
{
return evas_obj_grid_accessor_new(obj);
}
-EAPI void
+EVAS_API void
evas_object_grid_clear(Evas_Grid *obj, Eina_Bool clear)
{
evas_obj_grid_clear(obj, clear);
}
-EAPI Eina_Iterator *
+EVAS_API Eina_Iterator *
evas_object_grid_iterator_new(const Evas_Grid *obj)
{
return evas_obj_grid_iterator_new(obj);
}
-EAPI Efl_Canvas_Object *
+EVAS_API Efl_Canvas_Object *
evas_object_grid_add_to(Evas_Grid *obj)
{
return evas_obj_grid_add_to(obj);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_grid_unpack(Evas_Grid *obj, Efl_Canvas_Object *child)
{
return evas_obj_grid_unpack(obj, child);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_grid_pack_get(const Evas_Grid *obj, Efl_Canvas_Object *child, int *x, int *y, int *w, int *h)
{
return evas_obj_grid_pack_get(obj, child, x, y, w, h);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_grid_pack(Evas_Grid *obj, Efl_Canvas_Object *child, int x, int y, int w, int h)
{
return evas_obj_grid_pack(obj, child, x, y, w, h);
diff --git a/src/lib/evas/canvas/evas_grid_eo.legacy.h b/src/lib/evas/canvas/evas_grid_eo.legacy.h
index 9b48bf9b18..4b1e89c32e 100644
--- a/src/lib/evas/canvas/evas_grid_eo.legacy.h
+++ b/src/lib/evas/canvas/evas_grid_eo.legacy.h
@@ -25,7 +25,7 @@ typedef Eo Evas_Grid;
*
* @ingroup Evas_Object_Grid_Group
*/
-EAPI void evas_object_grid_size_set(Evas_Grid *obj, int w, int h);
+EVAS_API void evas_object_grid_size_set(Evas_Grid *obj, int w, int h);
/**
* @brief Get the current virtual resolution
@@ -40,7 +40,7 @@ EAPI void evas_object_grid_size_set(Evas_Grid *obj, int w, int h);
*
* @ingroup Evas_Object_Grid_Group
*/
-EAPI void evas_object_grid_size_get(const Evas_Grid *obj, int *w, int *h);
+EVAS_API void evas_object_grid_size_get(const Evas_Grid *obj, int *w, int *h);
/**
* @brief Get the list of children for the grid.
@@ -58,7 +58,7 @@ EAPI void evas_object_grid_size_get(const Evas_Grid *obj, int *w, int *h);
*
* @ingroup Evas_Object_Grid_Group
*/
-EAPI Eina_List *evas_object_grid_children_get(const Evas_Grid *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Eina_List *evas_object_grid_children_get(const Evas_Grid *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Get an accessor to get random access to the list of children for the
@@ -74,7 +74,7 @@ EAPI Eina_List *evas_object_grid_children_get(const Evas_Grid *obj) EINA_WARN_UN
*
* @ingroup Evas_Object_Grid_Group
*/
-EAPI Eina_Accessor *evas_object_grid_accessor_new(const Evas_Grid *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Eina_Accessor *evas_object_grid_accessor_new(const Evas_Grid *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Faster way to remove all child objects from a grid object.
@@ -86,7 +86,7 @@ EAPI Eina_Accessor *evas_object_grid_accessor_new(const Evas_Grid *obj) EINA_WAR
*
* @ingroup Evas_Object_Grid_Group
*/
-EAPI void evas_object_grid_clear(Evas_Grid *obj, Eina_Bool clear);
+EVAS_API void evas_object_grid_clear(Evas_Grid *obj, Eina_Bool clear);
/**
* @brief Get an iterator to walk the list of children for the grid.
@@ -101,7 +101,7 @@ EAPI void evas_object_grid_clear(Evas_Grid *obj, Eina_Bool clear);
*
* @ingroup Evas_Object_Grid_Group
*/
-EAPI Eina_Iterator *evas_object_grid_iterator_new(const Evas_Grid *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Eina_Iterator *evas_object_grid_iterator_new(const Evas_Grid *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Create a grid that is child of a given element parent.
@@ -116,7 +116,7 @@ EAPI Eina_Iterator *evas_object_grid_iterator_new(const Evas_Grid *obj) EINA_WAR
*
* @ingroup Evas_Object_Grid_Group
*/
-EAPI Efl_Canvas_Object *evas_object_grid_add_to(Evas_Grid *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Efl_Canvas_Object *evas_object_grid_add_to(Evas_Grid *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Remove child from grid.
@@ -134,7 +134,7 @@ EAPI Efl_Canvas_Object *evas_object_grid_add_to(Evas_Grid *obj) EINA_WARN_UNUSED
*
* @ingroup Evas_Object_Grid_Group
*/
-EAPI Eina_Bool evas_object_grid_unpack(Evas_Grid *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
+EVAS_API Eina_Bool evas_object_grid_unpack(Evas_Grid *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
/**
* @brief Get the pack options for a grid child
@@ -155,7 +155,7 @@ EAPI Eina_Bool evas_object_grid_unpack(Evas_Grid *obj, Efl_Canvas_Object *child)
*
* @ingroup Evas_Object_Grid_Group
*/
-EAPI Eina_Bool evas_object_grid_pack_get(const Evas_Grid *obj, Efl_Canvas_Object *child, int *x, int *y, int *w, int *h);
+EVAS_API Eina_Bool evas_object_grid_pack_get(const Evas_Grid *obj, Efl_Canvas_Object *child, int *x, int *y, int *w, int *h);
/**
* @brief Add a new child to a grid object.
@@ -173,6 +173,6 @@ EAPI Eina_Bool evas_object_grid_pack_get(const Evas_Grid *obj, Efl_Canvas_Object
*
* @ingroup Evas_Object_Grid_Group
*/
-EAPI Eina_Bool evas_object_grid_pack(Evas_Grid *obj, Efl_Canvas_Object *child, int x, int y, int w, int h) EINA_ARG_NONNULL(2);
+EVAS_API Eina_Bool evas_object_grid_pack(Evas_Grid *obj, Efl_Canvas_Object *child, int x, int y, int w, int h) EINA_ARG_NONNULL(2);
#endif
diff --git a/src/lib/evas/canvas/evas_image_eo.c b/src/lib/evas/canvas/evas_image_eo.c
index 2d4f39ff39..4eeac15542 100644
--- a/src/lib/evas/canvas/evas_image_eo.c
+++ b/src/lib/evas/canvas/evas_image_eo.c
@@ -14,6 +14,8 @@ _evas_image_class_initializer(Efl_Class *klass)
#endif
EFL_OPS_DEFINE(ops,
+ EFL_OBJECT_OP_FUNC(efl_file_loaded_get, _evas_image_efl_file_loaded_get),
+ EFL_OBJECT_OP_FUNC(efl_file_mmap_get, _evas_image_efl_file_mmap_get),
EFL_OBJECT_OP_FUNC(efl_file_load, _evas_image_efl_file_load),
EFL_OBJECT_OP_FUNC(efl_file_unload, _evas_image_efl_file_unload),
EVAS_IMAGE_EXTRA_OPS
diff --git a/src/lib/evas/canvas/evas_image_eo.h b/src/lib/evas/canvas/evas_image_eo.h
index af9f1a038a..6b75ffa11d 100644
--- a/src/lib/evas/canvas/evas_image_eo.h
+++ b/src/lib/evas/canvas/evas_image_eo.h
@@ -19,6 +19,6 @@ typedef Eo Evas_Image;
*/
#define EVAS_IMAGE_CLASS evas_image_class_get()
-EWAPI const Efl_Class *evas_image_class_get(void);
+EVAS_API EVAS_API_WEAK const Efl_Class *evas_image_class_get(void) EINA_CONST;
#endif
diff --git a/src/lib/evas/canvas/evas_image_legacy.c b/src/lib/evas/canvas/evas_image_legacy.c
index dca17462b9..d02cd3220b 100644
--- a/src/lib/evas/canvas/evas_image_legacy.c
+++ b/src/lib/evas/canvas/evas_image_legacy.c
@@ -21,7 +21,7 @@ struct _Evas_Image_Legacy_Pixels_Entry
void *image;
};
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_image_add(Evas *eo_e)
{
eo_e = evas_find(eo_e);
@@ -31,7 +31,7 @@ evas_object_image_add(Evas *eo_e)
efl_canvas_object_legacy_ctor(efl_added));
}
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_image_filled_add(Evas *eo_e)
{
eo_e = evas_find(eo_e);
@@ -40,7 +40,7 @@ evas_object_image_filled_add(Evas *eo_e)
efl_canvas_object_legacy_ctor(efl_added));
}
-EAPI void
+EVAS_API void
evas_object_image_memfile_set(Evas_Object *eo_obj, void *data, int size, char *format EINA_UNUSED, char *key)
{
Eina_File *f;
@@ -53,7 +53,7 @@ evas_object_image_memfile_set(Evas_Object *eo_obj, void *data, int size, char *f
eina_file_close(f); // close matching open OK
}
-EAPI void
+EVAS_API void
evas_object_image_fill_set(Evas_Object *obj,
Evas_Coord x, Evas_Coord y,
Evas_Coord w, Evas_Coord h)
@@ -62,7 +62,7 @@ evas_object_image_fill_set(Evas_Object *obj,
_evas_image_fill_set(obj, efl_data_scope_get(obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS), x, y, w, h);
}
-EAPI void
+EVAS_API void
evas_object_image_preload(Evas_Object *eo_obj, Eina_Bool cancel)
{
EVAS_IMAGE_API(eo_obj);
@@ -70,21 +70,21 @@ evas_object_image_preload(Evas_Object *eo_obj, Eina_Bool cancel)
else _evas_image_load_async_start(eo_obj);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_filled_get(const Evas_Object *eo_obj)
{
EVAS_IMAGE_API(eo_obj, EINA_FALSE);
return efl_gfx_fill_auto_get(eo_obj);
}
-EAPI void
+EVAS_API void
evas_object_image_filled_set(Evas_Object *eo_obj, Eina_Bool value)
{
EVAS_IMAGE_API(eo_obj);
efl_gfx_fill_auto_set(eo_obj, value);
}
-EAPI void
+EVAS_API void
evas_object_image_fill_get(const Evas_Object *obj,
Evas_Coord *x, Evas_Coord *y,
Evas_Coord *w, Evas_Coord *h)
@@ -99,63 +99,63 @@ evas_object_image_fill_get(const Evas_Object *obj,
if (h) *h = r.h;
}
-EAPI void
+EVAS_API void
evas_object_image_alpha_set(Evas_Object *obj, Eina_Bool alpha)
{
EVAS_IMAGE_API(obj);
efl_gfx_buffer_alpha_set(obj, alpha);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_alpha_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, EINA_FALSE);
return efl_gfx_buffer_alpha_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_image_border_set(Evas_Object *obj, int l, int r, int t, int b)
{
EVAS_IMAGE_API(obj);
efl_gfx_image_border_insets_set(obj, l, r, t, b);
}
-EAPI void
+EVAS_API void
evas_object_image_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b)
{
EVAS_IMAGE_API(obj);
efl_gfx_image_border_insets_get(obj, l, r, t, b);
}
-EAPI void
+EVAS_API void
evas_object_image_border_scale_set(Evas_Object *obj, double scale)
{
EVAS_IMAGE_API(obj);
efl_gfx_image_border_insets_scale_set(obj, scale);
}
-EAPI double
+EVAS_API double
evas_object_image_border_scale_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, 0.0);
return efl_gfx_image_border_insets_scale_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_image_border_center_fill_set(Evas_Object *obj, Evas_Border_Fill_Mode fill)
{
EVAS_IMAGE_API(obj);
efl_gfx_image_center_fill_mode_set(obj, (Efl_Gfx_Center_Fill_Mode) fill);
}
-EAPI Evas_Border_Fill_Mode
+EVAS_API Evas_Border_Fill_Mode
evas_object_image_border_center_fill_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, EVAS_BORDER_FILL_NONE);
return (Evas_Border_Fill_Mode) efl_gfx_image_center_fill_mode_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_image_size_get(const Evas_Object *obj, int *w, int *h)
{
Eina_Size2D sz;
@@ -165,14 +165,14 @@ evas_object_image_size_get(const Evas_Object *obj, int *w, int *h)
if (h) *h = sz.h;
}
-EAPI Evas_Colorspace
+EVAS_API Evas_Colorspace
evas_object_image_colorspace_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, EVAS_COLORSPACE_ARGB8888);
return (Evas_Colorspace) efl_gfx_buffer_colorspace_get(obj);
}
-EAPI int
+EVAS_API int
evas_object_image_stride_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, 0);
@@ -180,7 +180,7 @@ evas_object_image_stride_get(const Evas_Object *obj)
return o->cur->image.stride;
}
-EAPI void
+EVAS_API void
evas_object_image_data_update_add(Evas_Object *obj, int x, int y, int w, int h)
{
Eina_Rect r;
@@ -190,35 +190,35 @@ evas_object_image_data_update_add(Evas_Object *obj, int x, int y, int w, int h)
efl_gfx_buffer_update_add(obj, &r);
}
-EAPI void
+EVAS_API void
evas_object_image_file_set(Evas_Object *obj, const char *file, const char *key)
{
EVAS_IMAGE_API(obj);
efl_file_simple_load(obj, file, key);
}
-EAPI void
+EVAS_API void
evas_object_image_file_get(const Evas_Object *obj, const char **file, const char **key)
{
EVAS_IMAGE_API(obj);
efl_file_simple_get(obj, file, key);
}
-EAPI void
+EVAS_API void
evas_object_image_mmap_set(Evas_Object *obj, const Eina_File *f, const char *key)
{
EVAS_IMAGE_API(obj);
efl_file_simple_mmap_load(obj, f, key);
}
-EAPI void
+EVAS_API void
evas_object_image_mmap_get(const Evas_Object *obj, const Eina_File **f, const char **key)
{
EVAS_IMAGE_API(obj);
efl_file_simple_mmap_get(obj, f, key);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_save(const Evas_Object *obj, const char *file, const char *key, const char *flags)
{
char *encoding = NULL;
@@ -226,7 +226,7 @@ evas_object_image_save(const Evas_Object *obj, const char *file, const char *key
Eina_Error ret;
EVAS_IMAGE_API(obj, EINA_FALSE);
-
+
if (flags)
{
char *p, *pp;
@@ -256,161 +256,168 @@ evas_object_image_save(const Evas_Object *obj, const char *file, const char *key
return ret;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_animated_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, EINA_FALSE);
return _evas_image_animated_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_image_animated_frame_set(Evas_Object *obj, int frame_index)
{
EVAS_IMAGE_API(obj);
_evas_image_animated_frame_set(obj, frame_index);
}
-EAPI int
+EVAS_API int
+evas_object_image_animated_frame_get(Evas_Object *obj)
+{
+ EVAS_IMAGE_API(obj, 0);
+ return _evas_image_animated_frame_get(obj);
+}
+
+EVAS_API int
evas_object_image_animated_frame_count_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, 0);
return _evas_image_animated_frame_count_get(obj);
}
-EAPI Evas_Image_Animated_Loop_Hint
+EVAS_API Evas_Image_Animated_Loop_Hint
evas_object_image_animated_loop_type_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, EVAS_IMAGE_ANIMATED_HINT_NONE);
return (Evas_Image_Animated_Loop_Hint) _evas_image_animated_loop_type_get(obj);
}
-EAPI int
+EVAS_API int
evas_object_image_animated_loop_count_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, 0);
return _evas_image_animated_loop_count_get(obj);
}
-EAPI double
+EVAS_API double
evas_object_image_animated_frame_duration_get(const Evas_Object *obj, int start_frame, int frame_num)
{
EVAS_IMAGE_API(obj, 0.0);
return _evas_image_animated_frame_duration_get(obj, start_frame, frame_num);
}
-EAPI void
+EVAS_API void
evas_object_image_load_size_set(Evas_Object *obj, int w, int h)
{
EVAS_IMAGE_API(obj);
_evas_image_load_size_set(obj, w, h);
}
-EAPI void
+EVAS_API void
evas_object_image_load_size_get(const Evas_Object *obj, int *w, int *h)
{
EVAS_IMAGE_API(obj);
_evas_image_load_size_get(obj, w, h);
}
-EAPI void
+EVAS_API void
evas_object_image_load_dpi_set(Evas_Object *obj, double dpi)
{
EVAS_IMAGE_API(obj);
_evas_image_load_dpi_set(obj, dpi);
}
-EAPI double
+EVAS_API double
evas_object_image_load_dpi_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, 0.0);
return _evas_image_load_dpi_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_image_load_region_set(Evas_Object *obj, int x, int y, int w, int h)
{
EVAS_IMAGE_API(obj);
_evas_image_load_region_set(obj, x, y, w, h);
}
-EAPI void
+EVAS_API void
evas_object_image_load_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h)
{
EVAS_IMAGE_API(obj);
_evas_image_load_region_get(obj, x, y, w, h);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_region_support_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, EINA_FALSE);
return _evas_image_load_region_support_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_image_load_orientation_set(Evas_Object *obj, Eina_Bool enable)
{
EVAS_IMAGE_API(obj);
_evas_image_load_orientation_set(obj, enable);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_load_orientation_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, EINA_FALSE);
return _evas_image_load_orientation_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_image_load_scale_down_set(Evas_Object *obj, int scale_down)
{
EVAS_IMAGE_API(obj);
_evas_image_load_scale_down_set(obj, scale_down);
}
-EAPI int
+EVAS_API int
evas_object_image_load_scale_down_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, 1);
return _evas_image_load_scale_down_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_image_load_head_skip_set(Evas_Object *obj, Eina_Bool skip)
{
EVAS_IMAGE_API(obj);
_evas_image_load_head_skip_set(obj, skip);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_load_head_skip_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, EINA_FALSE);
return _evas_image_load_head_skip_get(obj);
}
-EAPI Evas_Load_Error
+EVAS_API Evas_Load_Error
evas_object_image_load_error_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, EVAS_LOAD_ERROR_GENERIC);
return _efl_gfx_image_load_error_to_evas_load_error(efl_gfx_image_load_error_get(obj));
}
-EAPI void
+EVAS_API void
evas_object_image_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth_scale)
{
EVAS_IMAGE_API(obj);
efl_gfx_image_smooth_scale_set(obj, smooth_scale);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_smooth_scale_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, EINA_FALSE);
return efl_gfx_image_smooth_scale_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_image_orient_set(Evas_Object *obj, Evas_Image_Orient orient)
{
EVAS_IMAGE_API(obj);
@@ -419,7 +426,7 @@ evas_object_image_orient_set(Evas_Object *obj, Evas_Image_Orient orient)
_evas_image_orientation_set(obj, o, orient);
}
-EAPI Evas_Image_Orient
+EVAS_API Evas_Image_Orient
evas_object_image_orient_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, EVAS_IMAGE_ORIENT_NONE);
@@ -429,7 +436,7 @@ evas_object_image_orient_get(const Evas_Object *obj)
return o->cur->orient;
}
-EAPI void
+EVAS_API void
evas_object_image_snapshot_set(Evas_Object *eo, Eina_Bool s)
{
EVAS_IMAGE_API(eo);
@@ -443,7 +450,7 @@ evas_object_image_snapshot_set(Evas_Object *eo, Eina_Bool s)
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_snapshot_get(const Evas_Object *eo)
{
EVAS_IMAGE_API(eo, EINA_FALSE);
@@ -452,84 +459,84 @@ evas_object_image_snapshot_get(const Evas_Object *eo)
return obj->cur->snapshot;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_source_set(Evas_Object *eo, Evas_Object *src)
{
EVAS_IMAGE_API(eo, EINA_FALSE);
return _evas_image_proxy_source_set(eo, src);
}
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_image_source_get(const Evas_Object *eo)
{
EVAS_IMAGE_API(eo, NULL);
return _evas_image_proxy_source_get(eo);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_source_unset(Evas_Object *eo_obj)
{
EVAS_IMAGE_API(eo_obj, EINA_FALSE);
return _evas_image_proxy_source_set(eo_obj, NULL);
}
-EAPI void
+EVAS_API void
evas_object_image_source_clip_set(Evas_Object *eo, Eina_Bool source_clip)
{
EVAS_IMAGE_API(eo);
_evas_image_proxy_source_clip_set(eo, source_clip);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_source_clip_get(const Evas_Object *eo)
{
EVAS_IMAGE_API(eo, EINA_FALSE);
return _evas_image_proxy_source_clip_get(eo);
}
-EAPI void
+EVAS_API void
evas_object_image_source_events_set(Evas_Object *eo, Eina_Bool repeat)
{
EVAS_IMAGE_API(eo);
_evas_image_proxy_source_events_set(eo, repeat);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_source_events_get(const Evas_Object *eo)
{
EVAS_IMAGE_API(eo, EINA_FALSE);
return _evas_image_proxy_source_events_get(eo);
}
-EAPI void
+EVAS_API void
evas_object_image_content_hint_set(Evas_Object *obj, Evas_Image_Content_Hint hint)
{
EVAS_IMAGE_API(obj);
- return efl_gfx_image_content_hint_set(obj, hint);
+ efl_gfx_image_content_hint_set(obj, (Efl_Gfx_Image_Content_Hint)hint);
}
-EAPI Evas_Image_Content_Hint
+EVAS_API Evas_Image_Content_Hint
evas_object_image_content_hint_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, EVAS_IMAGE_CONTENT_HINT_NONE);
- return efl_gfx_image_content_hint_get(obj);
+ return (Evas_Image_Content_Hint)efl_gfx_image_content_hint_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_image_scale_hint_set(Evas_Object *obj, Evas_Image_Scale_Hint hint)
{
EVAS_IMAGE_API(obj);
return efl_gfx_image_scale_hint_set(obj, (Efl_Gfx_Image_Scale_Hint) hint);
}
-EAPI Evas_Image_Scale_Hint
+EVAS_API Evas_Image_Scale_Hint
evas_object_image_scale_hint_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, EVAS_IMAGE_SCALE_HINT_NONE);
return (Evas_Image_Scale_Hint) efl_gfx_image_scale_hint_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_image_native_surface_set(Evas_Object *eo_obj, Evas_Native_Surface *surf)
{
EVAS_IMAGE_API(eo_obj);
@@ -546,14 +553,14 @@ evas_object_image_native_surface_set(Evas_Object *eo_obj, Evas_Native_Surface *s
}
}
-EAPI Evas_Native_Surface *
+EVAS_API Evas_Native_Surface *
evas_object_image_native_surface_get(const Evas_Object *eo_obj)
{
EVAS_IMAGE_API(eo_obj, NULL);
return _evas_image_native_surface_get(eo_obj);
}
-EAPI void
+EVAS_API void
evas_object_image_pixels_get_callback_set(Eo *eo_obj, Evas_Object_Image_Pixels_Get_Cb func, void *data)
{
EVAS_IMAGE_API(eo_obj);
@@ -570,7 +577,7 @@ evas_object_image_pixels_get_callback_set(Eo *eo_obj, Evas_Object_Image_Pixels_G
EINA_COW_PIXEL_WRITE_END(o, pixi_write);
}
-EAPI void
+EVAS_API void
evas_object_image_pixels_dirty_set(Eo *eo_obj, Eina_Bool dirty)
{
EVAS_IMAGE_API(eo_obj);
@@ -589,7 +596,7 @@ evas_object_image_pixels_dirty_set(Eo *eo_obj, Eina_Bool dirty)
evas_object_change(eo_obj, obj);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_pixels_dirty_get(const Eo *eo_obj)
{
EVAS_IMAGE_API(eo_obj, EINA_FALSE);
@@ -599,7 +606,7 @@ evas_object_image_pixels_dirty_get(const Eo *eo_obj)
return (o->dirty_pixels ? 1 : 0);
}
-EAPI void
+EVAS_API void
evas_object_image_data_set(Eo *eo_obj, void *data)
{
EVAS_IMAGE_API(eo_obj);
@@ -666,6 +673,7 @@ evas_object_image_data_set(Eo *eo_obj, void *data)
if (o->engine_data)
{
ENFN->image_free(ENC, o->engine_data);
+ o->engine_data = NULL;
o->changed = EINA_TRUE;
evas_object_change(eo_obj, obj);
}
@@ -680,8 +688,6 @@ evas_object_image_data_set(Eo *eo_obj, void *data)
state_write->image.stride = 0;
}
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
-
- o->engine_data = NULL;
}
/* FIXME - in engine call above
if (o->engine_data)
@@ -707,7 +713,7 @@ _image_to_free_del_cb(void *data)
free(px_entry);
}
-EAPI void*
+EVAS_API void*
evas_object_image_data_get(const Eo *eo_obj, Eina_Bool for_writing)
{
EVAS_IMAGE_API(eo_obj, NULL);
@@ -789,7 +795,7 @@ error:
return NULL;
}
-EAPI void
+EVAS_API void
evas_object_image_data_copy_set(Eo *eo_obj, void *data)
{
EVAS_IMAGE_API(eo_obj);
@@ -837,7 +843,7 @@ evas_object_image_data_copy_set(Eo *eo_obj, void *data)
}
/* Evas_Object equivalent: pixels_set(null, w, h, cspace) to (re)allocate an image */
-EAPI void
+EVAS_API void
evas_object_image_size_set(Evas_Object *eo_obj, int w, int h)
{
EVAS_IMAGE_API(eo_obj);
@@ -846,8 +852,6 @@ evas_object_image_size_set(Evas_Object *eo_obj, int w, int h)
Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
int stride = 0;
- if (o->cur->scene) return;
-
evas_object_async_block(obj);
_evas_image_cleanup(eo_obj, obj, o);
if (w < 1) w = 1;
@@ -904,7 +908,7 @@ evas_object_image_size_set(Evas_Object *eo_obj, int w, int h)
}
/* Evas_Object equivalent: pixels_set(null, w, h, cspace) to (re)allocate an image */
-EAPI void
+EVAS_API void
evas_object_image_colorspace_set(Evas_Object *eo_obj, Evas_Colorspace cspace)
{
EVAS_IMAGE_API(eo_obj);
@@ -925,7 +929,7 @@ evas_object_image_colorspace_set(Evas_Object *eo_obj, Evas_Colorspace cspace)
/* old video surfaces */
-EAPI void
+EVAS_API void
evas_object_image_video_surface_set(Evas_Object *eo_obj, Evas_Video_Surface *surf)
{
EVAS_IMAGE_LEGACY_API(eo_obj);
@@ -986,7 +990,7 @@ evas_object_image_video_surface_set(Evas_Object *eo_obj, Evas_Video_Surface *sur
}
}
-EAPI const Evas_Video_Surface*
+EVAS_API const Evas_Video_Surface*
evas_object_image_video_surface_get(const Evas_Object *eo_obj)
{
EVAS_IMAGE_LEGACY_API(eo_obj, NULL);
@@ -995,7 +999,7 @@ evas_object_image_video_surface_get(const Evas_Object *eo_obj)
return (!o->video_surface ? NULL : &o->pixels->video);
}
-EAPI void
+EVAS_API void
evas_object_image_video_surface_caps_set(Evas_Object *eo_obj, unsigned int caps)
{
EVAS_IMAGE_LEGACY_API(eo_obj);
@@ -1014,7 +1018,7 @@ evas_object_image_video_surface_caps_set(Evas_Object *eo_obj, unsigned int caps)
EINA_COW_PIXEL_WRITE_END(o, pixi_write)
}
-EAPI unsigned int
+EVAS_API unsigned int
evas_object_image_video_surface_caps_get(const Evas_Object *eo_obj)
{
EVAS_IMAGE_LEGACY_API(eo_obj, 0);
@@ -1028,7 +1032,7 @@ evas_object_image_video_surface_caps_get(const Evas_Object *eo_obj)
}
/* deprecated */
-EAPI void
+EVAS_API void
evas_object_image_fill_spread_set(Evas_Object *obj EINA_UNUSED, Evas_Fill_Spread spread)
{
/* not implemented! */
@@ -1037,14 +1041,14 @@ evas_object_image_fill_spread_set(Evas_Object *obj EINA_UNUSED, Evas_Fill_Spread
}
/* deprecated */
-EAPI Evas_Fill_Spread
+EVAS_API Evas_Fill_Spread
evas_object_image_fill_spread_get(const Evas_Object *obj EINA_UNUSED)
{
return EFL_GFX_FILL_REPEAT;
}
/* deprecated */
-EAPI void
+EVAS_API void
evas_object_image_source_visible_set(Evas_Object *eo, Eina_Bool visible)
{
/* FIXME: I'd love to remove this feature and replace by no_render.
@@ -1081,7 +1085,7 @@ evas_object_image_source_visible_set(Evas_Object *eo, Eina_Bool visible)
}
/* deprecated */
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_source_visible_get(const Evas_Object *eo)
{
/* FIXME: see evas_object_image_source_visible_set */
@@ -1102,7 +1106,7 @@ evas_object_image_source_visible_get(const Evas_Object *eo)
}
/* deprecated */
-EAPI void*
+EVAS_API void*
evas_object_image_data_convert(Evas_Object *eo_obj, Evas_Colorspace to_cspace)
{
EVAS_IMAGE_LEGACY_API(eo_obj, NULL);
@@ -1117,7 +1121,7 @@ evas_object_image_data_convert(Evas_Object *eo_obj, Evas_Colorspace to_cspace)
static int warned = 0;
if (!warned)
{
- ERR("%s is deprecated and shouldn't be called", __FUNCTION__);
+ ERR("%s is deprecated and shouldn't be called", __func__);
warned = 1;
}
@@ -1143,7 +1147,7 @@ evas_object_image_data_convert(Evas_Object *eo_obj, Evas_Colorspace to_cspace)
}
/* deprecated */
-EAPI void
+EVAS_API void
evas_object_image_reload(Evas_Object *eo_obj)
{
EVAS_IMAGE_LEGACY_API(eo_obj);
@@ -1181,7 +1185,7 @@ evas_object_image_reload(Evas_Object *eo_obj)
}
/* deprecated */
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_pixels_import(Evas_Object *eo_obj, Evas_Pixel_Import_Source *pixels)
{
EVAS_IMAGE_LEGACY_API(eo_obj, EINA_FALSE);
@@ -1193,7 +1197,7 @@ evas_object_image_pixels_import(Evas_Object *eo_obj, Evas_Pixel_Import_Source *p
static int warned = 0;
if (!warned)
{
- ERR("%s is deprecated and shouldn't be called", __FUNCTION__);
+ ERR("%s is deprecated and shouldn't be called", __func__);
warned = 1;
}
@@ -1258,7 +1262,7 @@ evas_object_image_pixels_import(Evas_Object *eo_obj, Evas_Pixel_Import_Source *p
return EINA_TRUE;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_image_max_size_get(Eo *eo_e, int *w, int *h)
{
Eina_Size2D size;
@@ -1274,19 +1278,41 @@ evas_image_max_size_get(Eo *eo_e, int *w, int *h)
}
/* deprecated */
-EAPI void
+EVAS_API void
evas_object_image_alpha_mask_set(Evas_Object *eo_obj EINA_UNUSED, Eina_Bool ismask EINA_UNUSED)
{
WRN("This function is not implemented, has never been and never will be.");
EVAS_IMAGE_LEGACY_API(eo_obj);
}
+EOLIAN static Eina_Bool
+_evas_image_efl_file_loaded_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
+{
+ Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
+ if (!o->skip_head)
+ return efl_file_loaded_get(efl_super(eo_obj, EVAS_IMAGE_CLASS));
+ return !!o->cur->f;
+}
+
+EOLIAN static const Eina_File *
+_evas_image_efl_file_mmap_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
+{
+ Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
+ if (!o->skip_head)
+ return efl_file_mmap_get(efl_super(eo_obj, EVAS_IMAGE_CLASS));
+ return o->cur->f;
+}
+
EOLIAN static Eina_Error
_evas_image_efl_file_load(Eo *obj, void *pd EINA_UNUSED)
{
EVAS_IMAGE_API(obj, EINA_FALSE);
if (efl_file_loaded_get(obj)) return 0;
- Eina_Error err = efl_file_load(efl_super(obj, EVAS_IMAGE_CLASS));
+ Evas_Image_Data *o = efl_data_scope_get(obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
+ Eina_Error err = 0;
+
+ if (!o->skip_head)
+ err = efl_file_load(efl_super(obj, EVAS_IMAGE_CLASS));
if (err)
{
if (err == ENOENT)
@@ -1299,7 +1325,7 @@ _evas_image_efl_file_load(Eo *obj, void *pd EINA_UNUSED)
_efl_canvas_image_load_error_set(obj, EFL_GFX_IMAGE_LOAD_ERROR_GENERIC);
return err;
}
- if (_evas_image_file_load(obj))
+ if (_evas_image_file_load(obj, o))
return 0;
return EFL_GFX_IMAGE_LOAD_ERROR_DOES_NOT_EXIST;
}
diff --git a/src/lib/evas/canvas/evas_image_private.h b/src/lib/evas/canvas/evas_image_private.h
index 6d18205d1f..693125fb84 100644
--- a/src/lib/evas/canvas/evas_image_private.h
+++ b/src/lib/evas/canvas/evas_image_private.h
@@ -82,7 +82,6 @@ struct _Evas_Object_Image_State
Evas_Object *source;
Evas_Map *defmap;
- Evas_Canvas3D_Scene *scene;
Eina_File *f;
const char *key;
@@ -168,7 +167,7 @@ void *_evas_image_pixels_get(Eo *eo_obj, Evas_Object_Protected_Data *obj, void *
void _evas_image_fill_set(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h);
/* Efl.File */
-Eina_Bool _evas_image_file_load(Eo *eo_obj);
+Eina_Bool _evas_image_file_load(Eo *eo_obj, Evas_Image_Data *o);
void _evas_image_file_unload(Eo *eo_obj);
const Eina_File *_evas_image_mmap_get(const Eo *eo_obj);
const char *_evas_image_key_get(const Eo *eo_obj);
@@ -213,11 +212,6 @@ Eina_Bool _evas_image_proxy_source_clip_get(const Eo *eo_obj);
void _evas_image_proxy_source_events_set(Eo *eo_obj, Eina_Bool source_events);
Eina_Bool _evas_image_proxy_source_events_get(const Eo *eo_obj);
-/* Efl.Canvas.Scene3d */
-void _evas_image_3d_render(Evas *eo_e, Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o, Evas_Canvas3D_Scene *scene, void *engine, void *output);
-void _evas_image_3d_set(Evas_Object *eo_obj, Evas_Canvas3D_Scene *scene);
-void _evas_image_3d_unset(Evas_Object *eo_obj, Evas_Object_Protected_Data *image, Evas_Image_Data *o);
-
/* Efl.Canvas.Surface */
Eina_Bool _evas_image_native_surface_set(Eo *eo_obj, Evas_Native_Surface *surf);
Evas_Native_Surface *_evas_image_native_surface_get(const Evas_Object *eo_obj);
diff --git a/src/lib/evas/canvas/evas_key.c b/src/lib/evas/canvas/evas_key.c
index 5a86a92ea7..624899d910 100644
--- a/src/lib/evas/canvas/evas_key.c
+++ b/src/lib/evas/canvas/evas_key.c
@@ -31,14 +31,14 @@ evas_key_lock_number(const Evas_Lock *l, const char *keyname)
/* public calls */
-EAPI const Evas_Modifier*
+EVAS_API const Evas_Modifier*
evas_key_modifier_get(const Evas *eo_e)
{
EVAS_LEGACY_API(eo_e, e, NULL);
return &(e->modifiers);
}
-EAPI const Evas_Lock*
+EVAS_API const Evas_Lock*
evas_key_lock_get(const Evas *eo_e)
{
EVAS_LEGACY_API(eo_e, e, NULL);
@@ -60,7 +60,7 @@ _key_is_set(int n, Eina_Hash *masks, const Evas_Device *seat)
return 0;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_seat_key_modifier_is_set(const Evas_Modifier *m, const char *keyname,
const Evas_Device *seat)
{
@@ -72,21 +72,21 @@ evas_seat_key_modifier_is_set(const Evas_Modifier *m, const char *keyname,
return _key_is_set(evas_key_modifier_number(m, keyname), m->masks, seat);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_key_modifier_is_set(const Evas_Modifier *m, const char *keyname)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(m, EINA_FALSE);
return evas_seat_key_modifier_is_set(m, keyname, NULL);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_key_lock_is_set(const Evas_Lock *l, const char *keyname)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(l, EINA_FALSE);
return evas_seat_key_lock_is_set(l, keyname, NULL);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_seat_key_lock_is_set(const Evas_Lock *l, const char *keyname,
const Evas_Device *seat)
{
@@ -267,7 +267,7 @@ _evas_canvas_key_lock_off(Eo *eo_e, Evas_Public_Data *e, const char *keyname)
/* errr need to add key grabbing/ungrabbing calls - missing modifier stuff. */
-EAPI Evas_Modifier_Mask
+EVAS_API Evas_Modifier_Mask
evas_key_modifier_mask_get(const Evas *eo_e, const char *keyname)
{
int n;
diff --git a/src/lib/evas/canvas/evas_key_grab.c b/src/lib/evas/canvas/evas_key_grab.c
index 5c8969ccb4..82292666a6 100644
--- a/src/lib/evas/canvas/evas_key_grab.c
+++ b/src/lib/evas/canvas/evas_key_grab.c
@@ -106,7 +106,7 @@ evas_object_grabs_cleanup(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected
while (obj->grabs)
{
Evas_Key_Grab *g = obj->grabs->data;
- obj->layer->evas->grabs =
+ obj->layer->evas->grabs =
eina_list_remove(obj->layer->evas->grabs, g);
obj->grabs = eina_list_remove(obj->grabs, g);
if (g->keyname) free(g->keyname);
@@ -243,7 +243,7 @@ _efl_canvas_object_key_ungrab(Eo *eo_obj, Evas_Object_Protected_Data *obj,
// Legacy API
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_key_grab(Evas_Object *eo_obj, const char *keyname,
Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers,
Eina_Bool exclusive)
@@ -256,7 +256,7 @@ evas_object_key_grab(Evas_Object *eo_obj, const char *keyname,
return _object_key_grab(eo_obj, obj, keyname, modifiers, not_modifiers, exclusive);
}
-EAPI void
+EVAS_API void
evas_object_key_ungrab(Efl_Canvas_Object *eo_obj, const char *keyname,
Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers)
{
diff --git a/src/lib/evas/canvas/evas_layer.c b/src/lib/evas/canvas/evas_layer.c
index d4e2eb3469..3c0898d0ab 100644
--- a/src/lib/evas/canvas/evas_layer.c
+++ b/src/lib/evas/canvas/evas_layer.c
@@ -208,7 +208,7 @@ _evas_object_layer_set_child(Evas_Object_Protected_Data *obj, Evas_Object_Protec
/* public functions */
-EAPI void
+EVAS_API void
evas_object_layer_set(Evas_Object *obj, short l)
{
efl_gfx_stack_layer_set((Evas_Object *)obj, l);
@@ -265,7 +265,7 @@ _efl_canvas_object_efl_gfx_stack_layer_set(Eo *eo_obj, Evas_Object_Protected_Dat
evas_object_inform_call_restack(eo_obj, obj);
}
-EAPI short
+EVAS_API short
evas_object_layer_get(const Evas_Object *obj)
{
return efl_gfx_stack_layer_get((Evas_Object *)obj);
diff --git a/src/lib/evas/canvas/evas_line_eo.c b/src/lib/evas/canvas/evas_line_eo.c
index 3199d53e2d..8b6ff5ca21 100644
--- a/src/lib/evas/canvas/evas_line_eo.c
+++ b/src/lib/evas/canvas/evas_line_eo.c
@@ -1,11 +1,11 @@
void _evas_line_xy_set(Eo *obj, Evas_Line_Data *pd, int x1, int y1, int x2, int y2);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_line_xy_set, EFL_FUNC_CALL(x1, y1, x2, y2), int x1, int y1, int x2, int y2);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_line_xy_set, EFL_FUNC_CALL(x1, y1, x2, y2), int x1, int y1, int x2, int y2);
void _evas_line_xy_get(const Eo *obj, Evas_Line_Data *pd, int *x1, int *y1, int *x2, int *y2);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_line_xy_get, EFL_FUNC_CALL(x1, y1, x2, y2), int *x1, int *y1, int *x2, int *y2);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_obj_line_xy_get, EFL_FUNC_CALL(x1, y1, x2, y2), int *x1, int *y1, int *x2, int *y2);
Efl_Object *_evas_line_efl_object_constructor(Eo *obj, Evas_Line_Data *pd);
diff --git a/src/lib/evas/canvas/evas_line_eo.h b/src/lib/evas/canvas/evas_line_eo.h
index bcdebcddef..9504881ced 100644
--- a/src/lib/evas/canvas/evas_line_eo.h
+++ b/src/lib/evas/canvas/evas_line_eo.h
@@ -19,7 +19,7 @@ typedef Eo Evas_Line;
*/
#define EVAS_LINE_CLASS evas_line_class_get()
-EWAPI const Efl_Class *evas_line_class_get(void);
+EVAS_API EVAS_API_WEAK const Efl_Class *evas_line_class_get(void) EINA_CONST;
/**
* @brief Sets the coordinates of the end points of the given evas line object.
@@ -34,7 +34,7 @@ EWAPI const Efl_Class *evas_line_class_get(void);
*
* @ingroup Evas_Line
*/
-EOAPI void evas_obj_line_xy_set(Eo *obj, int x1, int y1, int x2, int y2);
+EVAS_API EVAS_API_WEAK void evas_obj_line_xy_set(Eo *obj, int x1, int y1, int x2, int y2);
/**
* @brief Retrieves the coordinates of the end points of the given evas line
@@ -48,6 +48,6 @@ EOAPI void evas_obj_line_xy_set(Eo *obj, int x1, int y1, int x2, int y2);
*
* @ingroup Evas_Line
*/
-EOAPI void evas_obj_line_xy_get(const Eo *obj, int *x1, int *y1, int *x2, int *y2);
+EVAS_API EVAS_API_WEAK void evas_obj_line_xy_get(const Eo *obj, int *x1, int *y1, int *x2, int *y2);
#endif
diff --git a/src/lib/evas/canvas/evas_line_eo.legacy.c b/src/lib/evas/canvas/evas_line_eo.legacy.c
index 5c879056ed..9307c34526 100644
--- a/src/lib/evas/canvas/evas_line_eo.legacy.c
+++ b/src/lib/evas/canvas/evas_line_eo.legacy.c
@@ -1,11 +1,11 @@
-EAPI void
+EVAS_API void
evas_object_line_xy_set(Evas_Line *obj, int x1, int y1, int x2, int y2)
{
evas_obj_line_xy_set(obj, x1, y1, x2, y2);
}
-EAPI void
+EVAS_API void
evas_object_line_xy_get(const Evas_Line *obj, int *x1, int *y1, int *x2, int *y2)
{
evas_obj_line_xy_get(obj, x1, y1, x2, y2);
diff --git a/src/lib/evas/canvas/evas_line_eo.legacy.h b/src/lib/evas/canvas/evas_line_eo.legacy.h
index 556174c8b2..9fc3218338 100644
--- a/src/lib/evas/canvas/evas_line_eo.legacy.h
+++ b/src/lib/evas/canvas/evas_line_eo.legacy.h
@@ -27,7 +27,7 @@ typedef Eo Evas_Line;
*
* @ingroup Evas_Object_Line_Group
*/
-EAPI void evas_object_line_xy_set(Evas_Line *obj, int x1, int y1, int x2, int y2);
+EVAS_API void evas_object_line_xy_set(Evas_Line *obj, int x1, int y1, int x2, int y2);
/**
* @brief Retrieves the coordinates of the end points of the given evas line
@@ -41,6 +41,6 @@ EAPI void evas_object_line_xy_set(Evas_Line *obj, int x1, int y1, int x2, int y2
*
* @ingroup Evas_Object_Line_Group
*/
-EAPI void evas_object_line_xy_get(const Evas_Line *obj, int *x1, int *y1, int *x2, int *y2);
+EVAS_API void evas_object_line_xy_get(const Evas_Line *obj, int *x1, int *y1, int *x2, int *y2);
#endif
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 86a7881473..4bdc7e36dd 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -19,24 +19,24 @@
#define MY_CLASS EVAS_CANVAS_CLASS
#ifdef LKDEBUG
-EAPI Eina_Bool lockdebug = EINA_FALSE;
-EAPI int lockmax = 0;
+EVAS_API Eina_Bool lockdebug = EINA_FALSE;
+EVAS_API int lockmax = 0;
#endif
static int _evas_init_count = 0;
int _evas_log_dom_global = -1;
-EAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_NONE = 0;
-EAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_GENERIC = 0;
-EAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_DOES_NOT_EXIST = 0;
-EAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_PERMISSION_DENIED = 0;
-EAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 0;
-EAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_CORRUPT_FILE = 0;
-EAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_UNKNOWN_FORMAT = 0;
-EAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_CANCELLED = 0;
-EAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_INCOMPATIBLE_FILE = 0;
-EAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_UNKNOWN_COLLECTION = 0;
-EAPI Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_RECURSIVE_REFERENCE = 0;
+EVAS_API Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_NONE = 0;
+EVAS_API Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_GENERIC = 0;
+EVAS_API Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_DOES_NOT_EXIST = 0;
+EVAS_API Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_PERMISSION_DENIED = 0;
+EVAS_API Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 0;
+EVAS_API Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_CORRUPT_FILE = 0;
+EVAS_API Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_UNKNOWN_FORMAT = 0;
+EVAS_API Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_CANCELLED = 0;
+EVAS_API Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_INCOMPATIBLE_FILE = 0;
+EVAS_API Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_UNKNOWN_COLLECTION = 0;
+EVAS_API Eina_Error EFL_GFX_IMAGE_LOAD_ERROR_RECURSIVE_REFERENCE = 0;
#define NUM_ERRORS 11
@@ -51,7 +51,7 @@ const char *efl_gfx_image_load_error_msgs[] = {
"Reading operation has been cancelled during decoding" ,
"(Edje only) The file pointed to is incompatible, i.e., it doesn't match the library's current version's format." ,
"(Edje only) The group/collection set to load from was not found in the file" ,
- "(Edje only) The group/collection set to load from had recursive references on its components"
+ "(Edje only) The group/collection set to load from had recursive references on its components"
};
static void
@@ -120,8 +120,35 @@ _efl_gfx_image_load_error_to_evas_load_error(Eina_Error err)
return EVAS_LOAD_ERROR_GENERIC;
}
+static Eina_Content*
+_markup_to_utf8(Eina_Content *from, const char *to_type)
+{
+ Eina_Content *ret = NULL;
+ Eina_Slice slice = eina_content_data_get(from);
+ char *utf8 = evas_textblock_text_markup_to_utf8(NULL, slice.mem);
+ if (utf8)
+ {
+ ret = eina_content_new((Eina_Slice)EINA_SLICE_STR_FULL(utf8), to_type);
+ free(utf8);
+ }
+ return ret;
+}
-EAPI int
+static Eina_Content*
+_utf8_to_markup(Eina_Content *from, const char *to_type)
+{
+ Eina_Content *ret = NULL;
+ Eina_Slice slice = eina_content_data_get(from);
+ char *markup = evas_textblock_text_utf8_to_markup(NULL, slice.mem);
+ if (markup)
+ {
+ ret = eina_content_new((Eina_Slice)EINA_SLICE_STR_FULL(markup), to_type);
+ free(markup);
+ }
+ return ret;
+}
+
+EVAS_API int
evas_init(void)
{
if (++_evas_init_count != 1)
@@ -179,6 +206,9 @@ evas_init(void)
_efl_gfx_image_load_error_init();
+ eina_content_converter_conversion_register("application/x-elementary-markup", "text/plain;charset=utf-8", _markup_to_utf8);
+ eina_content_converter_conversion_register("text/plain;charset=utf-8", "application/x-elementary-markup", _utf8_to_markup);
+
return _evas_init_count;
shutdown_filter:
@@ -205,7 +235,7 @@ shutdown_evil:
return --_evas_init_count;
}
-EAPI int
+EVAS_API int
evas_shutdown(void)
{
if (_evas_init_count <= 0)
@@ -222,6 +252,8 @@ evas_shutdown(void)
evas_focus_shutdown();
+ evas_fonts_zero_free();
+
evas_cache_vg_shutdown();
evas_font_path_global_clear();
@@ -273,7 +305,7 @@ evas_shutdown(void)
}
-EAPI Evas *
+EVAS_API Evas *
evas_new(void)
{
Evas_Object *eo_obj = efl_add(EVAS_CANVAS_CLASS, efl_main_loop_get());
@@ -331,6 +363,9 @@ _evas_canvas_efl_object_constructor(Eo *eo_obj, Evas_Public_Data *e)
EVAS_ARRAY_SET(e, glyph_unref_queue);
EVAS_ARRAY_SET(e, texts_unref_queue);
+ eina_array_step_set(&e->render_post_change_objects, sizeof(e->render_post_change_objects), 10);
+ eina_array_step_set(&e->map_clip_objects, sizeof(e->map_clip_objects), 64);
+
e->active_objects.version = EINA_ARRAY_VERSION;
eina_inarray_step_set(&e->active_objects,
sizeof(Eina_Inarray),
@@ -352,7 +387,7 @@ _evas_canvas_efl_object_constructor(Eo *eo_obj, Evas_Public_Data *e)
return eo_obj;
}
-EAPI void
+EVAS_API void
evas_free(Evas *eo_e)
{
if (!eo_e) return;
@@ -612,7 +647,9 @@ _evas_canvas_efl_object_destructor(Eo *eo_e, Evas_Public_Data *e)
eina_array_flush(&e->image_unref_queue);
eina_array_flush(&e->glyph_unref_queue);
eina_array_flush(&e->texts_unref_queue);
+ eina_array_flush(&e->map_clip_objects);
eina_hash_free(e->focused_objects);
+ eina_array_flush(&e->render_post_change_objects);
SLKL(e->post_render.lock);
EINA_INLIST_FREE(e->post_render.jobs, job)
@@ -636,7 +673,7 @@ _evas_canvas_efl_object_destructor(Eo *eo_e, Evas_Public_Data *e)
// It is now expected that the first output in the list is the default one
// manipulated by this set of legacy API
-EAPI Evas_Engine_Info *
+EVAS_API Evas_Engine_Info *
evas_engine_info_get(const Evas *obj)
{
if (!obj) return NULL;
@@ -655,7 +692,7 @@ evas_engine_info_get(const Evas *obj)
return efl_canvas_output_engine_info_get(output);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_engine_info_set(Evas *obj, Evas_Engine_Info *info)
{
if (!obj) return EINA_FALSE;
@@ -713,7 +750,7 @@ _evas_canvas_default_device_get(const Eo *eo_e EINA_UNUSED,
return NULL;
}
-EAPI int
+EVAS_API int
evas_render_method_lookup(const char *name)
{
Evas_Module *em;
@@ -726,13 +763,13 @@ evas_render_method_lookup(const char *name)
return em->id_engine;
}
-EAPI Eina_List *
+EVAS_API Eina_List *
evas_render_method_list(void)
{
return evas_module_engine_list();
}
-EAPI void
+EVAS_API void
evas_render_method_list_free(Eina_List *list)
{
const char *s;
@@ -740,7 +777,7 @@ evas_render_method_list_free(Eina_List *list)
EINA_LIST_FREE(list, s) eina_stringshare_del(s);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_extension_can_load_get(const char *file)
{
const char *tmp;
@@ -753,7 +790,7 @@ evas_object_image_extension_can_load_get(const char *file)
return result;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_image_extension_can_load_fast_get(const char *file)
{
return evas_common_extension_can_load_get(file);
@@ -933,7 +970,7 @@ _evas_unwalk(Evas_Public_Data *e)
efl_unref(e->evas);
}
-EAPI const char *
+EVAS_API const char *
evas_load_error_str(Evas_Load_Error error)
{
switch (error)
@@ -957,38 +994,38 @@ evas_load_error_str(Evas_Load_Error error)
}
}
-EAPI void
+EVAS_API void
evas_color_hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b)
{
evas_common_convert_color_hsv_to_rgb(h, s, v, r, g, b);
}
-EAPI void
+EVAS_API void
evas_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v)
{
evas_common_convert_color_rgb_to_hsv(r, g, b, h, s, v);
}
-EAPI void
+EVAS_API void
evas_color_argb_premul(int a, int *r, int *g, int *b)
{
evas_common_convert_color_argb_premul(a, r, g, b);
}
-EAPI void
+EVAS_API void
evas_color_argb_unpremul(int a, int *r, int *g, int *b)
{
evas_common_convert_color_argb_unpremul(a, r, g, b);
}
-EAPI void
+EVAS_API void
evas_data_argb_premul(unsigned int *data, unsigned int len)
{
if (!data || (len < 1)) return;
evas_common_convert_argb_premul(data, len);
}
-EAPI void
+EVAS_API void
evas_data_argb_unpremul(unsigned int *data, unsigned int len)
{
if (!data || (len < 1)) return;
@@ -1023,13 +1060,13 @@ evas_ector_get(Evas_Public_Data *e)
return e->ector;
}
-EAPI Evas_BiDi_Direction
+EVAS_API Evas_BiDi_Direction
evas_language_direction_get(void)
{
return evas_common_language_direction_get();
}
-EAPI void
+EVAS_API void
evas_language_reinit(void)
{
evas_common_language_reinit();
@@ -1059,16 +1096,13 @@ _image_data_unset(Evas_Object_Protected_Data *obj, Eina_List **list)
data->engine_data =
obj->layer->evas->engine.func->polygon_points_clear(ENC,
data->engine_data))
- else CHECK(EVAS_CANVAS3D_TEXTURE_CLASS, Evas_Canvas3D_Texture_Data,
- if (obj->layer->evas->engine.func->texture_free)
- obj->layer->evas->engine.func->texture_free(ENC, data->engine_data))
else return;
#undef CHECK
evas_object_ref(obj->object);
*list = eina_list_append(*list, obj->object);
}
-EAPI Eina_List *
+EVAS_API Eina_List *
_evas_canvas_image_data_unset(Evas *eo_e)
{
Evas_Public_Data *e = efl_data_scope_get(eo_e, MY_CLASS);
@@ -1118,13 +1152,11 @@ _image_data_regenerate(Evas_Object *eo_obj)
}
CHECK(EFL_CANVAS_IMAGE_INTERNAL_CLASS, Evas_Image_Data, _image_image_data_regenerate(eo_obj, obj, data))
else CHECK(EFL_CANVAS_IMAGE_CLASS, Evas_Image_Data, _image_image_data_regenerate(eo_obj, obj, data))
- else CHECK(EFL_CANVAS_SCENE3D_CLASS, Evas_Image_Data, _image_image_data_regenerate(eo_obj, obj, data))
//else CHECK(EFL_CANVAS_VG_OBJECT_CLASS, Efl_Canvas_Vg_Object_Data,)
//else CHECK(EFL_CANVAS_POLYGON_CLASS, Efl_Canvas_Polygon_Data,)
- //else CHECK(EVAS_CANVAS3D_TEXTURE_CLASS, Evas_Canvas3D_Texture_Data,
}
-EAPI void
+EVAS_API void
_evas_canvas_image_data_regenerate(Eina_List *list)
{
Evas_Object *eo_obj;
@@ -1224,7 +1256,7 @@ _evas_canvas_efl_canvas_scene_image_max_size_get(const Eo *eo_e EINA_UNUSED, Eva
/* Legacy deprecated functions */
-EAPI void
+EVAS_API void
evas_output_framespace_set(Evas *eo_e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
{
EVAS_TYPE_CHECK(eo_e);
@@ -1243,7 +1275,7 @@ evas_output_framespace_set(Evas *eo_e, Evas_Coord x, Evas_Coord y, Evas_Coord w,
e->changed = 1;
}
-EAPI void
+EVAS_API void
evas_output_framespace_get(const Evas *eo_e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
{
EVAS_TYPE_CHECK(eo_e);
@@ -1256,7 +1288,7 @@ evas_output_framespace_get(const Evas *eo_e, Evas_Coord *x, Evas_Coord *y, Evas_
if (h) *h = e->framespace.h;
}
-EAPI void
+EVAS_API void
evas_output_method_set(Evas *eo_e, int render_method)
{
EVAS_TYPE_CHECK(eo_e);
@@ -1328,7 +1360,7 @@ evas_output_method_set(Evas *eo_e, int render_method)
EVAS_DEVICE_SUBCLASS_NONE);
}
-EAPI int
+EVAS_API int
evas_output_method_get(const Evas *eo_e)
{
EVAS_TYPE_CHECK(eo_e, RENDER_METHOD_INVALID);
@@ -1338,7 +1370,7 @@ evas_output_method_get(const Evas *eo_e)
return e->output.render_method;
}
-EAPI void
+EVAS_API void
evas_output_size_set(Evas *eo_e, int w, int h)
{
EVAS_TYPE_CHECK(eo_e);
@@ -1366,7 +1398,7 @@ evas_output_size_set(Evas *eo_e, int w, int h)
evas_render_invalidate(eo_e);
}
-EAPI void
+EVAS_API void
evas_output_size_get(const Evas *eo_e, int *w, int *h)
{
EVAS_TYPE_CHECK(eo_e);
@@ -1377,7 +1409,7 @@ evas_output_size_get(const Evas *eo_e, int *w, int *h)
if (h) *h = e->output.h;
}
-EAPI void
+EVAS_API void
evas_output_viewport_set(Evas *eo_e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
{
EVAS_TYPE_CHECK(eo_e);
@@ -1405,7 +1437,7 @@ evas_output_viewport_set(Evas *eo_e, Evas_Coord x, Evas_Coord y, Evas_Coord w, E
evas_event_callback_call(e->evas, EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE, NULL);
}
-EAPI void
+EVAS_API void
evas_output_viewport_get(const Evas *eo_e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
{
EVAS_TYPE_CHECK(eo_e);
@@ -1480,7 +1512,7 @@ _evas_pointer_data_add(Evas_Public_Data *edata, Evas_Device *pointer)
}
void
-_evas_pointer_data_remove(Evas_Public_Data *edata, Evas_Device *pointer)
+_evas_pointer_data_remove(Evas_Public_Data *edata, Evas_Device *pointer, Eina_Bool nofree)
{
Evas_Pointer_Data *pdata;
Evas_Pointer_Seat *pseat;
@@ -1491,17 +1523,23 @@ _evas_pointer_data_remove(Evas_Public_Data *edata, Evas_Device *pointer)
EINA_INLIST_FOREACH(pseat->pointers, pdata)
if (pdata->pointer == pointer)
{
- pseat->pointers = eina_inlist_remove(pseat->pointers, EINA_INLIST_GET(pdata));
- free(pdata);
+ if (!nofree)
+ {
+ pseat->pointers = eina_inlist_remove(pseat->pointers, EINA_INLIST_GET(pdata));
+ free(pdata);
+ }
hit = pseat;
break;
}
}
EINA_SAFETY_ON_NULL_RETURN(hit);
if (hit->pointers) return;
- eina_list_free(hit->object.in);
- edata->seats = eina_inlist_remove(edata->seats, EINA_INLIST_GET(hit));
- free(hit);
+ hit->object.in = eina_list_free(hit->object.in);
+ if (!nofree)
+ {
+ edata->seats = eina_inlist_remove(edata->seats, EINA_INLIST_GET(hit));
+ free(hit);
+ }
}
Eina_List *
@@ -1568,7 +1606,7 @@ _efl_canvas_iterator_free(Efl_Canvas_Iterator *it)
free(it);
}
-EAPI Eina_Iterator *
+EVAS_API Eina_Iterator *
efl_canvas_iterator_create(Eo *obj, Eina_Iterator *real_iterator, Eina_List *list)
{
Efl_Canvas_Iterator *it;
@@ -1624,14 +1662,14 @@ _evas_canvas_efl_canvas_scene_object_top_at_xy_get(const Eo *eo_e EINA_UNUSED, E
return NULL;
}
-EAPI Evas_Object*
+EVAS_API Evas_Object*
evas_object_top_at_xy_get(Eo *eo_e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
{
Eina_Position2D pos = {x, y};
return efl_canvas_scene_object_top_at_xy_get(eo_e, pos, include_pass_events_objects, include_hidden_objects);
}
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_top_at_pointer_get(const Evas *eo_e)
{
Evas_Public_Data *e = efl_isa(eo_e, EVAS_CANVAS_CLASS) ?
@@ -1683,7 +1721,7 @@ _evas_canvas_efl_canvas_scene_object_top_in_rectangle_get(const Eo *eo_e EINA_UN
return NULL;
}
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_top_in_rectangle_get(const Eo *obj, int x, int y, int w, int h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
{
return efl_canvas_scene_object_top_in_rectangle_get(obj, EINA_RECT(x, y, w, h), include_pass_events_objects, include_hidden_objects);
@@ -1810,7 +1848,7 @@ _evas_canvas_efl_canvas_scene_objects_in_rectangle_get(Eo *eo_e EINA_UNUSED, Eva
return efl_canvas_iterator_create(eo_e, eina_list_iterator_new(l), l);
}
-EAPI Eina_List *
+EVAS_API Eina_List *
evas_objects_in_rectangle_get(const Evas_Canvas *eo_e, int x, int y, int w, int h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
{
EVAS_LEGACY_API(eo_e, e, NULL);
@@ -1903,7 +1941,7 @@ evas_font_object_rehint(Evas_Object *eo_obj)
}
}
-EAPI void
+EVAS_API void
evas_font_hinting_set(Eo *eo_e, Evas_Font_Hinting_Flags hinting)
{
Evas_Layer *lay;
@@ -1922,14 +1960,14 @@ evas_font_hinting_set(Eo *eo_e, Evas_Font_Hinting_Flags hinting)
}
}
-EAPI Evas_Font_Hinting_Flags
+EVAS_API Evas_Font_Hinting_Flags
evas_font_hinting_get(const Evas *eo_e)
{
EVAS_LEGACY_API(eo_e, e, EVAS_FONT_HINTING_NONE);
return e->hinting;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_font_hinting_can_hint(const Evas *eo_e, Evas_Font_Hinting_Flags hinting)
{
EVAS_LEGACY_API(eo_e, e, EINA_FALSE);
@@ -1939,7 +1977,7 @@ evas_font_hinting_can_hint(const Evas *eo_e, Evas_Font_Hinting_Flags hinting)
else return EINA_FALSE;
}
-EAPI void
+EVAS_API void
evas_font_available_list_free(Evas *eo_e, Eina_List *available)
{
EVAS_TYPE_CHECK(eo_e);
@@ -1954,7 +1992,7 @@ _evas_canvas_efl_canvas_scene_group_objects_calculate(Eo *eo_e, Evas_Public_Data
evas_call_smarts_calculate(eo_e);
}
-EAPI void
+EVAS_API void
evas_smart_objects_calculate(Eo *eo_e)
{
EVAS_TYPE_CHECK(eo_e);
@@ -1967,7 +2005,7 @@ _evas_canvas_efl_canvas_scene_group_objects_calculating_get(const Eo *eo_e EINA_
return !!e->in_smart_calc;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_smart_objects_calculating_get(const Eo *obj)
{
EVAS_TYPE_CHECK(obj, EINA_FALSE);
@@ -1979,23 +2017,23 @@ _evas_canvas_smart_objects_calculate_count_get(const Eo *eo_e EINA_UNUSED, Evas_
{
return e->smart_calc_count;
}
-/* Legacy EAPI */
+/* Legacy EVAS_API */
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_pointer_inside_get(const Evas *obj)
{
EVAS_TYPE_CHECK(obj, EINA_FALSE);
return efl_canvas_pointer_inside_get(obj, NULL);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_pointer_inside_by_device_get(const Evas *obj, Eo *dev)
{
EVAS_TYPE_CHECK(obj, EINA_FALSE);
return efl_canvas_pointer_inside_get(obj, dev);
}
-EAPI Eina_List*
+EVAS_API Eina_List*
evas_objects_at_xy_get(Eo *eo_e, int x, int y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
{
EVAS_TYPE_CHECK(eo_e, NULL);
@@ -2003,13 +2041,13 @@ evas_objects_at_xy_get(Eo *eo_e, int x, int y, Eina_Bool include_pass_events_obj
}
/* Internal EO APIs */
-EWAPI const Efl_Event_Description _EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE =
+EVAS_API EVAS_API_WEAK const Efl_Event_Description _EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE =
EFL_EVENT_DESCRIPTION("render,flush,pre");
-EWAPI const Efl_Event_Description _EVAS_CANVAS_EVENT_RENDER_FLUSH_POST =
+EVAS_API EVAS_API_WEAK const Efl_Event_Description _EVAS_CANVAS_EVENT_RENDER_FLUSH_POST =
EFL_EVENT_DESCRIPTION("render,flush,post");
-EWAPI const Efl_Event_Description _EVAS_CANVAS_EVENT_AXIS_UPDATE =
+EVAS_API EVAS_API_WEAK const Efl_Event_Description _EVAS_CANVAS_EVENT_AXIS_UPDATE =
EFL_EVENT_DESCRIPTION("axis,update");
-EWAPI const Efl_Event_Description _EVAS_CANVAS_EVENT_VIEWPORT_RESIZE =
+EVAS_API EVAS_API_WEAK const Efl_Event_Description _EVAS_CANVAS_EVENT_VIEWPORT_RESIZE =
EFL_EVENT_DESCRIPTION("viewport,resize");
#define CHECK_ADD(var, ev, member) \
diff --git a/src/lib/evas/canvas/evas_map.c b/src/lib/evas/canvas/evas_map.c
index 0ac75c7a07..4669595c7c 100644
--- a/src/lib/evas/canvas/evas_map.c
+++ b/src/lib/evas/canvas/evas_map.c
@@ -38,7 +38,7 @@ _evas_map_calc_map_geometry(Evas_Object *eo_obj)
if (obj->map->prev.map->count == obj->map->cur.map->count)
{
const Evas_Map_Point *p2;
-
+
p = obj->map->cur.map->points;
p2 = obj->map->prev.map->points;
if (memcmp(p, p2, sizeof(Evas_Map_Point) *
@@ -48,7 +48,7 @@ _evas_map_calc_map_geometry(Evas_Object *eo_obj)
{
EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
{
- if (map_write->cache_map) evas_map_free(map_write->cache_map);
+ if (map_write->cache_map) evas_map_free(map_write->cache_map);
map_write->cache_map = map_write->cur.map;
map_write->cur.map = map_write->prev.map;
}
@@ -61,7 +61,7 @@ _evas_map_calc_map_geometry(Evas_Object *eo_obj)
}
else
ch = EINA_TRUE;
-
+
p = obj->map->cur.map->points;
p_end = p + obj->map->cur.map->count;
x1 = x2 = lround(p->x);
@@ -70,7 +70,7 @@ _evas_map_calc_map_geometry(Evas_Object *eo_obj)
for (; p < p_end; p++)
{
Evas_Coord x, y;
-
+
x = lround(p->x);
y = lround(p->y);
if (x < x1) x1 = x;
@@ -78,7 +78,7 @@ _evas_map_calc_map_geometry(Evas_Object *eo_obj)
if (y < yy1) yy1 = y;
if (y > yy2) yy2 = y;
}
-// this causes clip-out bugs now mapped objs canbe opaque!!!
+// this causes clip-out bugs now mapped objs canbe opaque!!!
// // add 1 pixel of fuzz around the map region to ensure updates are correct
// x1 -= 1; yy1 -= 1;
// x2 += 1; yy2 += 1;
@@ -238,13 +238,13 @@ _evas_map_free(Evas_Object *eo_obj, Evas_Map *m)
map_write->spans = NULL;
}
EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
- }
+ }
}
m->magic = 0;
free(m);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_map_coords_get(const Evas_Map *m, double x, double y,
double *mx, double *my, int grab)
{
@@ -512,7 +512,7 @@ _evas_object_map_enable_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
}
}
-EAPI void
+EVAS_API void
evas_object_map_enable_set(Eo *eo_obj, Eina_Bool enabled)
{
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj);
@@ -520,7 +520,7 @@ evas_object_map_enable_set(Eo *eo_obj, Eina_Bool enabled)
_evas_object_map_enable_set(eo_obj, obj, enabled);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_map_enable_get(const Eo *eo_obj)
{
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj, EINA_FALSE);
@@ -528,7 +528,7 @@ evas_object_map_enable_get(const Eo *eo_obj)
return obj->map->cur.usemap;
}
-EAPI void
+EVAS_API void
evas_object_map_set(Evas_Object *eo_obj, const Evas_Map *map)
{
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj);
@@ -552,7 +552,7 @@ evas_object_map_set(Evas_Object *eo_obj, const Evas_Map *map)
return;
}
/* changed_pchange means map's change.
- * This flag will be used to decide whether to redraw the map surface.
+ * This flag will be used to decide whether to redraw the map surface.
* And value of flag would be EINA_FALSE after rendering. */
obj->changed_pchange = EINA_TRUE;
@@ -645,7 +645,7 @@ evas_object_map_set(Evas_Object *eo_obj, const Evas_Map *map)
_evas_map_calc_map_geometry(eo_obj);
}
-EAPI const Evas_Map *
+EVAS_API const Evas_Map *
evas_object_map_get(const Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN((Eo *) eo_obj, NULL);
@@ -654,7 +654,7 @@ evas_object_map_get(const Evas_Object *eo_obj)
return obj->map->cur.map;
}
-EAPI Evas_Map *
+EVAS_API Evas_Map *
evas_map_new(int count)
{
if ((count <= 0) || (count % 4 != 0))
@@ -666,7 +666,7 @@ evas_map_new(int count)
return _evas_map_new(count, EINA_FALSE);
}
-EAPI void
+EVAS_API void
evas_map_smooth_set(Evas_Map *m, Eina_Bool enabled)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -676,7 +676,7 @@ evas_map_smooth_set(Evas_Map *m, Eina_Bool enabled)
m->smooth = enabled;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_map_smooth_get(const Evas_Map *m)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -686,7 +686,7 @@ evas_map_smooth_get(const Evas_Map *m)
return m->smooth;
}
-EAPI void
+EVAS_API void
evas_map_alpha_set(Evas_Map *m, Eina_Bool enabled)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -696,7 +696,7 @@ evas_map_alpha_set(Evas_Map *m, Eina_Bool enabled)
m->alpha = enabled;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_map_alpha_get(const Evas_Map *m)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -706,7 +706,7 @@ evas_map_alpha_get(const Evas_Map *m)
return m->alpha;
}
-EAPI void
+EVAS_API void
evas_map_util_object_move_sync_set(Evas_Map *m, Eina_Bool enabled)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -721,7 +721,7 @@ evas_map_util_object_move_sync_set(Evas_Map *m, Eina_Bool enabled)
m->move_sync.enabled = !!enabled;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_map_util_object_move_sync_get(const Evas_Map *m)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -731,7 +731,7 @@ evas_map_util_object_move_sync_get(const Evas_Map *m)
return m->move_sync.enabled;
}
-EAPI Evas_Map *
+EVAS_API Evas_Map *
evas_map_dup(const Evas_Map *m)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -741,14 +741,14 @@ evas_map_dup(const Evas_Map *m)
return _evas_map_dup(m);
}
-EAPI void
+EVAS_API void
evas_map_free(Evas_Map *m)
{
if (!m) return;
_evas_map_free(NULL, m);
}
-EAPI int
+EVAS_API int
evas_map_count_get(const Evas_Map *m)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -762,7 +762,7 @@ evas_map_count_get(const Evas_Map *m)
Rotation center position will be flickered by rounding problem.
Now fixed in EO APIs.
*/
-EAPI void
+EVAS_API void
evas_map_point_coord_set(Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -772,7 +772,7 @@ evas_map_point_coord_set(Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_
_map_point_coord_set(m, idx, x, y, z);
}
-EAPI void
+EVAS_API void
evas_map_point_coord_get(const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z)
{
double dx, dy, dz;
@@ -783,7 +783,7 @@ evas_map_point_coord_get(const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *
if (z) *z = lround(dz);
}
-EAPI void
+EVAS_API void
evas_map_point_image_uv_set(Evas_Map *m, int idx, double u, double v)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -798,7 +798,7 @@ evas_map_point_image_uv_set(Evas_Map *m, int idx, double u, double v)
p->v = v;
}
-EAPI void
+EVAS_API void
evas_map_point_image_uv_get(const Evas_Map *m, int idx, double *u, double *v)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -818,7 +818,7 @@ evas_map_point_image_uv_get(const Evas_Map *m, int idx, double *u, double *v)
if (v) *v = 0.0;
}
-EAPI void
+EVAS_API void
evas_map_point_color_set(Evas_Map *m, int idx, int r, int g, int b, int a)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -835,7 +835,7 @@ evas_map_point_color_set(Evas_Map *m, int idx, int r, int g, int b, int a)
p->a = a;
}
-EAPI void
+EVAS_API void
evas_map_point_color_get(const Evas_Map *m, int idx, int *r, int *g, int *b, int *a)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -859,7 +859,7 @@ error:
if (a) *a = 255;
}
-EAPI void
+EVAS_API void
evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *eo_obj, Evas_Coord z)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -881,7 +881,7 @@ evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *e
obj->cur->geometry.w, obj->cur->geometry.h, z);
}
-EAPI void
+EVAS_API void
evas_map_util_points_populate_from_object(Evas_Map *m, const Evas_Object *eo_obj)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -903,7 +903,7 @@ evas_map_util_points_populate_from_object(Evas_Map *m, const Evas_Object *eo_obj
obj->cur->geometry.w, obj->cur->geometry.h, 0);
}
-EAPI void
+EVAS_API void
evas_map_util_points_populate_from_geometry(Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Coord z)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -918,7 +918,7 @@ evas_map_util_points_populate_from_geometry(Evas_Map *m, Evas_Coord x, Evas_Coor
_evas_map_util_points_populate(m, x, y, w, h, z);
}
-EAPI void
+EVAS_API void
evas_map_util_points_color_set(Evas_Map *m, int r, int g, int b, int a)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -964,7 +964,7 @@ _map_util_rotate(Evas_Map *m, double degrees, double cx, double cy)
}
}
-EAPI void
+EVAS_API void
evas_map_util_rotate(Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -997,7 +997,7 @@ _map_util_zoom(Evas_Map *m, double zoomx, double zoomy, double cx, double cy)
}
}
-EAPI void
+EVAS_API void
evas_map_util_zoom(Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
@@ -1073,7 +1073,7 @@ _map_util_3d_rotate(Evas_Map *m, double dx, double dy, double dz,
}
}
-EAPI void
+EVAS_API void
evas_map_util_3d_rotate(Evas_Map *m, double dx, double dy, double dz,
Evas_Coord cx, Evas_Coord cy, Evas_Coord cz)
{
@@ -1125,7 +1125,7 @@ _map_util_quat_rotate(Evas_Map *m, double qx, double qy, double qz,
}
}
-EAPI void
+EVAS_API void
evas_map_util_quat_rotate(Evas_Map *m, double qx, double qy, double qz,
double qw, double cx, double cy, double cz)
{
@@ -1211,7 +1211,7 @@ _map_util_3d_lighting(Evas_Map *m,
}
}
-EAPI void
+EVAS_API void
evas_map_util_3d_lighting(Evas_Map *m,
Evas_Coord lx, Evas_Coord ly, Evas_Coord lz,
int lr, int lg, int lb, int ar, int ag, int ab)
@@ -1259,7 +1259,7 @@ _map_util_3d_perspective(Evas_Map *m, double px, double py, double z0, double fo
}
}
-EAPI void
+EVAS_API void
evas_map_util_3d_perspective(Evas_Map *m,
Evas_Coord px, Evas_Coord py,
Evas_Coord z0, Evas_Coord foc)
@@ -1271,7 +1271,7 @@ evas_map_util_3d_perspective(Evas_Map *m,
_map_util_3d_perspective(m, (double) px, (double) py, (double) z0, (double) foc);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_map_util_clockwise_get(Evas_Map *m)
{
MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
diff --git a/src/lib/evas/canvas/evas_name.c b/src/lib/evas/canvas/evas_name.c
index 7c432e84d1..4ebf604cfc 100644
--- a/src/lib/evas/canvas/evas_name.c
+++ b/src/lib/evas/canvas/evas_name.c
@@ -1,7 +1,7 @@
#include "evas_common_private.h"
#include "evas_private.h"
-EAPI void
+EVAS_API void
evas_object_name_set(Evas_Object *eo_obj, const char *name)
{
Evas_Object_Protected_Data *obj = efl_isa(eo_obj, EFL_CANVAS_OBJECT_CLASS) ?
@@ -22,7 +22,7 @@ evas_object_name_set(Evas_Object *eo_obj, const char *name)
}
}
-EAPI const char *
+EVAS_API const char *
evas_object_name_get(const Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = efl_isa(eo_obj, EFL_CANVAS_OBJECT_CLASS) ?
@@ -60,7 +60,7 @@ _priv_evas_object_name_child_find(const Evas_Object *eo_obj, const char *name, i
return NULL;
}
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_name_child_find(const Evas_Object *eo_obj, const char *name, int recurse)
{
return (!name ? NULL : _priv_evas_object_name_child_find(eo_obj, name, recurse));
@@ -74,7 +74,11 @@ _efl_canvas_object_efl_object_debug_name_override(Eo *eo_obj, Evas_Object_Protec
const char *clip = obj->clip.clipees ? ":clipper" : "";
efl_debug_name_override(efl_super(eo_obj, EFL_CANVAS_OBJECT_CLASS), sb);
- if (obj->cur->visible)
+ if (!obj->cur)
+ {
+ eina_strbuf_append_printf(sb, ":nostate");
+ }
+ else if (obj->cur->visible)
{
eina_strbuf_append_printf(sb, "%s%s:(%d,%d %dx%d)", norend, clip,
obj->cur->geometry.x, obj->cur->geometry.y,
diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c
index 7a7173eb25..ca6a822360 100644
--- a/src/lib/evas/canvas/evas_object_box.c
+++ b/src/lib/evas/canvas/evas_object_box.c
@@ -334,7 +334,7 @@ _evas_box_internal_insert_at(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *chi
return new_opt;
}
}
- return NULL;
+ return NULL;
}
EOLIAN static Evas_Object *
@@ -390,7 +390,7 @@ _evas_box_efl_canvas_group_group_add(Eo *eo_obj, Evas_Object_Box_Data *priv)
Evas_Object_Smart_Clipped_Data *cso;
efl_canvas_group_add(efl_super(eo_obj, MY_CLASS));
-
+
evas_object_event_callback_add
(eo_obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_hints_changed, eo_obj);
priv->children = NULL;
@@ -412,18 +412,16 @@ _evas_box_efl_canvas_group_group_add(Eo *eo_obj, Evas_Object_Box_Data *priv)
EOLIAN static void
_evas_box_efl_canvas_group_group_del(Eo *o, Evas_Object_Box_Data *priv)
{
- Eina_List *l;
-
- l = priv->children;
- while (l)
+ while (priv->children)
{
- Evas_Object_Box_Option *opt = l->data;
+ Evas_Object_Box_Option *opt = eina_list_data_get(priv->children);
_evas_object_box_child_callbacks_unregister(opt->obj, o);
evas_obj_box_internal_option_free(o, opt);
- l = eina_list_remove_list(l, l);
+ priv->children = eina_list_remove_list(priv->children, priv->children);
}
+
if (priv->layout.data && priv->layout.free_data)
priv->layout.free_data(priv->layout.data);
@@ -447,7 +445,9 @@ _evas_box_efl_gfx_entity_position_set(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUS
if (_evas_object_intercept_call(o, EVAS_OBJECT_INTERCEPT_CB_MOVE , 0, pos.x, pos.y))
return;
- efl_gfx_entity_position_set(cso->clipper, pos);
+ if (!evas_object_static_clip_get(cso->clipper))
+ efl_gfx_entity_position_set(cso->clipper, pos);
+
/* this skips the call to _evas_object_smart_clipped_smart_move_internal
* since box internals will automatically recalc all the child positions
* at a later point
@@ -477,7 +477,7 @@ _evas_box_efl_canvas_group_group_calculate(Eo *o, Evas_Object_Box_Data *priv)
ERR("No layout function set for %p box.", o);
}
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_box_add(Evas *evas)
{
evas = evas_find(evas);
@@ -509,13 +509,13 @@ _evas_box_add_to(Eo *parent, Evas_Object_Box_Data *_pd EINA_UNUSED)
return o;
}
-EAPI void
+EVAS_API void
evas_object_box_smart_set(Evas_Object_Box_Api *api EINA_UNUSED)
{
return;
}
-EAPI const Evas_Object_Box_Api *
+EVAS_API const Evas_Object_Box_Api *
evas_object_box_smart_class_get(void)
{
return NULL;
@@ -1880,7 +1880,7 @@ EOLIAN static Eina_Iterator*
_evas_box_iterator_new(const Eo *o, Evas_Object_Box_Data *priv)
{
Evas_Object_Box_Iterator *it;
-
+
if (!priv->children) return NULL;
it = calloc(1, sizeof(Evas_Object_Box_Iterator));
@@ -1920,7 +1920,7 @@ _evas_box_accessor_new(const Eo *o, Evas_Object_Box_Data *priv)
return &it->accessor;
}
-EAPI Eina_List *
+EVAS_API Eina_List *
evas_object_box_children_get(const Evas_Object *o)
{
Eina_List *new_list = NULL, *l;
@@ -1953,7 +1953,7 @@ _evas_box_option_property_id_get(const Eo *o EINA_UNUSED, Evas_Object_Box_Data *
return -1;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_box_option_property_set(Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...)
{
Eina_Bool ret;
@@ -1967,7 +1967,7 @@ evas_object_box_option_property_set(Evas_Object *o, Evas_Object_Box_Option *opt,
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_box_option_property_vset(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args)
{
return evas_obj_box_option_property_vset(o, opt, property, (va_list *) &args);
@@ -1979,7 +1979,7 @@ _evas_box_option_property_vset(Eo *o EINA_UNUSED, Evas_Object_Box_Data *_pd EINA
return EINA_FALSE;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_box_option_property_get(const Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...)
{
Eina_Bool ret;
@@ -1992,7 +1992,7 @@ evas_object_box_option_property_get(const Evas_Object *o, Evas_Object_Box_Option
return ret;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_box_option_property_vget(const Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args)
{
return evas_obj_box_option_property_vget((Eo *)o, opt, property, (va_list *) &args);
diff --git a/src/lib/evas/canvas/evas_object_grid.c b/src/lib/evas/canvas/evas_object_grid.c
index 5dd69e10a9..6509b0762c 100644
--- a/src/lib/evas/canvas/evas_object_grid.c
+++ b/src/lib/evas/canvas/evas_object_grid.c
@@ -176,17 +176,20 @@ static void
_evas_object_grid_smart_del(Evas_Object *o)
{
EVAS_OBJECT_GRID_DATA_GET(o, priv);
- Eina_List *l;
- l = priv->children;
- while (l)
+ while (priv->children)
{
- Evas_Object_Grid_Option *opt = l->data;
- _evas_object_grid_child_disconnect(o, opt->obj);
- _evas_object_grid_option_del(opt->obj);
- free(opt);
- l = eina_list_remove_list(l, l);
+ Evas_Object_Grid_Option *opt = priv->children->data;
+ _evas_object_grid_child_disconnect(o, opt->obj);
+ _evas_object_grid_option_del(opt->obj);
+ free(opt);
+ priv->children = eina_list_remove_list(priv->children, priv->children);
}
+ //Free the clipper resource properly,
+ Eo *clipper = evas_object_smart_clipped_clipper_get(o);
+ if (clipper) evas_object_del(clipper);
+ /* below deletion occurs the recursive member remove hell. */
+ // _evas_object_grid_parent_sc->del(o);
}
static void
@@ -270,7 +273,7 @@ _evas_object_grid_smart_set_user(Evas_Smart_Class *sc)
sc->calculate = _evas_object_grid_smart_calculate;
}
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_grid_add(Evas *evas)
{
evas = evas_find(evas);
@@ -350,7 +353,7 @@ _evas_grid_pack(Eo *o, Evas_Grid_Data *priv, Evas_Object *child, int x, int y, i
}
// FIXME: we could keep a changed list
evas_object_smart_changed(o);
-
+
return EINA_TRUE;
}
@@ -383,7 +386,7 @@ _evas_grid_unpack(Eo *o, Evas_Grid_Data *priv, Evas_Object *child)
_evas_object_grid_remove_opt(priv, opt);
evas_object_smart_member_del(child);
free(opt);
-
+
return EINA_TRUE;
}
@@ -495,13 +498,13 @@ _evas_grid_efl_ui_i18n_mirrored_set(Eo *o EINA_UNUSED, Evas_Grid_Data *priv, Ein
}
}
-EAPI void
+EVAS_API void
evas_object_grid_mirrored_set(Evas_Grid *obj, Eina_Bool mirrored)
{
efl_ui_mirrored_set(obj, mirrored);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_grid_mirrored_get(const Evas_Grid *obj)
{
return efl_ui_mirrored_get(obj);
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index fa3a4a8462..84e08fcce1 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -96,7 +96,7 @@ static const Evas_Object_Image_State default_state = {
{ 0, 0, 0 }, // image
{ 1.0, 0, 0, 0, 0, 1 }, // border
{ { NULL, 0, 0 }, { NULL, 0, 0 } },
- NULL, NULL, NULL, //source, defmap, scene
+ NULL, NULL, //source, defmap
NULL, //f
NULL, //key
0, //frame
@@ -171,7 +171,6 @@ _evas_image_cleanup(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_I
ENFN->image_data_preload_cancel(ENC, o->engine_data, eo_obj, EINA_FALSE);
}
if (o->cur->source) _evas_image_proxy_unset(eo_obj, obj, o);
- if (o->cur->scene) _evas_image_3d_unset(eo_obj, obj, o);
}
static Eina_Bool
@@ -252,7 +251,6 @@ _evas_image_init_set(const Eina_File *f, const char *key,
Evas_Image_Load_Opts *lo)
{
if (o->cur->source) _evas_image_proxy_unset(eo_obj, obj, o);
- if (o->cur->scene) _evas_image_3d_unset(eo_obj, obj, o);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
{
@@ -286,8 +284,8 @@ _evas_image_init_set(const Eina_File *f, const char *key,
ENFN->image_data_preload_cancel(ENC, o->engine_data, eo_obj, EINA_FALSE);
}
ENFN->image_free(ENC, o->engine_data);
+ o->engine_data = NULL;
}
- o->engine_data = NULL;
o->load_error = EFL_GFX_IMAGE_LOAD_ERROR_NONE;
if (!lo) return;
lo->emile.scale_down_by = o->load_opts->scale_down_by;
@@ -1033,22 +1031,15 @@ _efl_canvas_image_internal_efl_gfx_image_image_size_get(const Eo *eo_obj EINA_UN
}
EOLIAN static Eina_Size2D
-_efl_canvas_image_internal_efl_gfx_view_view_size_get(const Eo *eo_obj, Evas_Image_Data *o)
+_efl_canvas_image_internal_efl_gfx_view_view_size_get(const Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
{
int uvw, uvh;
Evas_Object_Protected_Data *source = NULL;
- Evas_Object_Protected_Data *obj;
- obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
if (o->cur->source)
source = efl_data_scope_get(o->cur->source, EFL_CANVAS_OBJECT_CLASS);
- if (o->cur->scene)
- {
- uvw = obj->data_3d->w;
- uvh = obj->data_3d->h;
- }
- else if (!o->cur->source)
+ if (!o->cur->source)
{
uvw = o->cur->image.w;
uvh = o->cur->image.h;
@@ -1151,6 +1142,10 @@ _efl_canvas_image_internal_efl_gfx_buffer_alpha_set(Eo *eo_obj, Evas_Image_Data
{
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
+ has_alpha = !!has_alpha;
+ if (has_alpha == o->cur->has_alpha)
+ return;
+
evas_object_async_block(obj);
if ((o->preload & EVAS_IMAGE_PRELOADING) && (o->engine_data))
{
@@ -1158,10 +1153,6 @@ _efl_canvas_image_internal_efl_gfx_buffer_alpha_set(Eo *eo_obj, Evas_Image_Data
ENFN->image_data_preload_cancel(ENC, o->engine_data, eo_obj, EINA_TRUE);
}
- has_alpha = !!has_alpha;
- if (has_alpha == o->cur->has_alpha)
- return;
-
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
{
state_write->has_alpha = has_alpha;
@@ -1727,18 +1718,11 @@ evas_object_image_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
}
if (o->cur->source)
{
- if (o->cur->source) _evas_image_proxy_unset(eo_obj, obj, o);
+ _evas_image_proxy_unset(eo_obj, obj, o);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
state_write->source = NULL;
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
}
- if (o->cur->scene)
- {
- if (o->cur->scene) _evas_image_3d_unset(eo_obj, obj, o);
- EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
- state_write->scene = NULL;
- EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
- }
if (o->cur->f)
{
eina_file_close(o->cur->f); // close matching open (dup in _evas_image_init_set) OK
@@ -2044,7 +2028,8 @@ _efl_canvas_image_internal_efl_canvas_filter_internal_filter_input_render(
H = obj->cur->geometry.h;
// FIXME: In GL we could use the image even if scaled
- if (!_image_has_border(obj, o) && _image_is_filled(obj, o) && !_image_is_scaled(obj, o))
+ if (!(ENFN->image_native_get && ENFN->image_native_get(engine, o->engine_data)) &&
+ !_image_has_border(obj, o) && _image_is_filled(obj, o) && !_image_is_scaled(obj, o))
{
int imagew, imageh, uvw, uvh;
@@ -2301,6 +2286,8 @@ _evas_image_pixels_get(Eo *eo_obj, Evas_Object_Protected_Data *obj,
if (filtered && o->has_filter)
pixels = evas_filter_output_buffer_get(eo_obj);
+ else
+ needs_post_render = EINA_FALSE;
if (!pixels && o->cur->source)
{
@@ -2315,15 +2302,6 @@ _evas_image_pixels_get(Eo *eo_obj, Evas_Object_Protected_Data *obj,
*uvw = *imagew;
*uvh = *imageh;
}
- else if (o->cur->scene)
- {
- _evas_image_3d_render(obj->layer->evas->evas, eo_obj, obj, o, o->cur->scene, engine, output);
- pixels = obj->data_3d->surface;
- *imagew = obj->data_3d->w;
- *imageh = obj->data_3d->h;
- *uvw = *imagew;
- *uvh = *imageh;
- }
else if (obj->cur->snapshot)
{
pixels = o->engine_data;
@@ -2353,7 +2331,8 @@ _evas_image_pixels_get(Eo *eo_obj, Evas_Object_Protected_Data *obj,
*uvw = *imagew;
*uvh = *imageh;
}
- else if (oi && oi->engine_data)
+ else if (oi && oi->engine_data &&
+ (!o->cur->source || o->load_opts->region.w == 0 || o->load_opts->region.h == 0))
{
if (oi->has_filter)
pixels = evas_filter_output_buffer_get(source->object);
@@ -2864,18 +2843,6 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
goto done;
}
}
- else if (o->cur->scene)
- {
- Evas_Canvas3D_Scene *scene = o->cur->scene;
- Eina_Bool dirty;
-
- dirty = evas_canvas3d_object_dirty_get(scene, EVAS_CANVAS3D_STATE_ANY);
- if (dirty)
- {
- evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj, obj);
- goto done;
- }
- }
/* now figure what changed and add draw rects */
/* if it just became visible or invisible */
@@ -3289,7 +3256,7 @@ evas_object_image_render_post(Evas_Object *eo_obj EINA_UNUSED,
/* FIXME: copy strings across */
//Somehow(preloading cancelled) image has been changed, need to redraw.
- if (o->changed) evas_object_change(eo_obj, obj);
+ if (o->changed) evas_render_post_change_object_push(obj);
}
static void *
@@ -3547,6 +3514,9 @@ evas_object_image_is_inside(Evas_Object *eo_obj,
o->pixels->func.get_pixels(o->pixels->func.get_pixels_data, eo_obj);
if (ENFN->gl_get_pixels_post)
ENFN->gl_get_pixels_post(ENC, output);
+ pixels = _evas_image_pixels_get(eo_obj, obj, ENC, output, NULL, NULL, 0, 0,
+ &imagew, &imageh, &uvw, &uvh, EINA_TRUE, EINA_FALSE);
+ if (!pixels) return is_inside;
}
}
diff --git a/src/lib/evas/canvas/evas_object_inform.c b/src/lib/evas/canvas/evas_object_inform.c
index ef5ee4051f..b1a54f9f50 100644
--- a/src/lib/evas/canvas/evas_object_inform.c
+++ b/src/lib/evas/canvas/evas_object_inform.c
@@ -3,13 +3,13 @@
#include "evas_private.h"
/* BEGIN: events to maintain compatibility with legacy */
-EWAPI const Efl_Event_Description _EFL_GFX_ENTITY_EVENT_SHOW =
+EVAS_API EVAS_API_WEAK const Efl_Event_Description _EFL_GFX_ENTITY_EVENT_SHOW =
EFL_EVENT_DESCRIPTION("show");
-EWAPI const Efl_Event_Description _EFL_GFX_ENTITY_EVENT_HIDE =
+EVAS_API EVAS_API_WEAK const Efl_Event_Description _EFL_GFX_ENTITY_EVENT_HIDE =
EFL_EVENT_DESCRIPTION("hide");
-EWAPI const Efl_Event_Description _EFL_GFX_ENTITY_EVENT_IMAGE_PRELOAD =
+EVAS_API EVAS_API_WEAK const Efl_Event_Description _EFL_GFX_ENTITY_EVENT_IMAGE_PRELOAD =
EFL_EVENT_DESCRIPTION("preload");
-EWAPI const Efl_Event_Description _EFL_GFX_ENTITY_EVENT_IMAGE_UNLOAD =
+EVAS_API EVAS_API_WEAK const Efl_Event_Description _EFL_GFX_ENTITY_EVENT_IMAGE_UNLOAD =
EFL_EVENT_DESCRIPTION("unload");
/* END: events to maintain compatibility with legacy */
diff --git a/src/lib/evas/canvas/evas_object_intercept.c b/src/lib/evas/canvas/evas_object_intercept.c
index 9911a5b1f3..53eb6af75d 100644
--- a/src/lib/evas/canvas/evas_object_intercept.c
+++ b/src/lib/evas/canvas/evas_object_intercept.c
@@ -9,22 +9,21 @@
/* local calls */
-static void evas_object_intercept_init(Evas_Object *eo_obj);
-static void evas_object_intercept_deinit(Evas_Object *eo_obj);
+static void evas_object_intercept_init(Evas_Object_Protected_Data *obj);
+static void evas_object_intercept_deinit(Evas_Object_Protected_Data *obj);
static void
-evas_object_intercept_init(Evas_Object *eo_obj)
+evas_object_intercept_init(Evas_Object_Protected_Data *obj)
{
- Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
+ if (!obj) return;
if (!obj->interceptors)
obj->interceptors = calloc(1, sizeof(Evas_Intercept_Func));
}
static void
-evas_object_intercept_deinit(Evas_Object *eo_obj)
+evas_object_intercept_deinit(Evas_Object_Protected_Data *obj)
{
- Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
- if (!obj->interceptors) return;
+ if (!obj || !obj->interceptors) return;
if ((obj->interceptors->show.func) ||
(obj->interceptors->hide.func) ||
(obj->interceptors->move.func) ||
@@ -220,7 +219,7 @@ _evas_object_intercept_call_internal(Evas_Object *eo_obj,
/* This is a legacy-only compatibility function.
* Made public for other parts of EFL (elm, ecore_evas).
*/
-EWAPI Eina_Bool
+EVAS_API EVAS_API_WEAK Eina_Bool
_evas_object_intercept_call(Evas_Object *eo_obj, Evas_Object_Intercept_Cb_Type cb_type,
int internal, ...)
{
@@ -257,22 +256,22 @@ _evas_object_intercept_call_evas(Evas_Object_Protected_Data *obj,
/* public calls */
#define EVAS_OBJECT_INTERCEPT_CALLBACK_DEFINE(Up_Type, Lower_Type) \
- EAPI void \
+ EVAS_API void \
evas_object_intercept_##Lower_Type##_callback_add(Evas_Object *eo_obj,\
Evas_Object_Intercept_##Up_Type##_Cb func, const void *data) \
{ \
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); \
return; \
MAGIC_CHECK_END(); \
- Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); \
- if (!func) return; \
- evas_object_intercept_init(eo_obj); \
+ Evas_Object_Protected_Data *obj = efl_data_scope_safe_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); \
+ if ((!obj) || (!func)) return; \
+ evas_object_intercept_init(obj); \
if (!obj->interceptors) return; \
obj->interceptors->Lower_Type.func = func; \
obj->interceptors->Lower_Type.data = (void *)data; \
} \
\
- EAPI void * \
+ EVAS_API void * \
evas_object_intercept_##Lower_Type##_callback_del(Evas_Object *eo_obj,\
Evas_Object_Intercept_##Up_Type##_Cb func) \
{ \
@@ -281,13 +280,13 @@ _evas_object_intercept_call_evas(Evas_Object_Protected_Data *obj,
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); \
return NULL; \
MAGIC_CHECK_END(); \
- Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); \
- if (!func) return NULL; \
+ Evas_Object_Protected_Data *obj = efl_data_scope_safe_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); \
+ if ((!obj) || (!func)) return NULL; \
if (!obj->interceptors) return NULL; \
obj->interceptors->Lower_Type.func = NULL; \
data = obj->interceptors->Lower_Type.data; \
obj->interceptors->Lower_Type.data = NULL; \
- evas_object_intercept_deinit(eo_obj); \
+ evas_object_intercept_deinit(obj); \
return data; \
}
diff --git a/src/lib/evas/canvas/evas_object_line.c b/src/lib/evas/canvas/evas_object_line.c
index ee085dcc5b..09aee281a9 100644
--- a/src/lib/evas/canvas/evas_object_line.c
+++ b/src/lib/evas/canvas/evas_object_line.c
@@ -84,7 +84,7 @@ static const Evas_Object_Func object_func =
/* the actual api call to add a rect */
/* it has no other api calls as all properties are standard */
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_line_add(Evas *e)
{
e = evas_find(e);
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index 6b78b581e7..e1b5839957 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -13,7 +13,7 @@ EVAS_MEMPOOL(_mp_sh);
/* evas internal stuff */
static const Evas_Object_Proxy_Data default_proxy = {
- NULL, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0
+ NULL, NULL, 0, 0, NULL, 0, 0, 0, 0
};
static const Evas_Object_Map_Data default_map = {
{ NULL, NULL, 0, 0 }, { NULL, NULL, 0, 0 }, NULL, 0, 0, NULL, NULL
@@ -34,7 +34,6 @@ static const Evas_Object_Events_Data default_events = {
Eina_Cow *evas_object_proxy_cow = NULL;
Eina_Cow *evas_object_map_cow = NULL;
Eina_Cow *evas_object_state_cow = NULL;
-Eina_Cow *evas_object_3d_cow = NULL;
Eina_Cow *evas_object_mask_cow = NULL;
Eina_Cow *evas_object_events_cow = NULL;
@@ -49,29 +48,26 @@ typedef struct _Event_Animation
static Eina_Bool
_init_cow(void)
{
- if (evas_object_map_cow && evas_object_proxy_cow && evas_object_state_cow && evas_object_3d_cow) return EINA_TRUE;
+ if (evas_object_map_cow && evas_object_proxy_cow && evas_object_state_cow) return EINA_TRUE;
evas_object_proxy_cow = eina_cow_add("Evas Object Proxy", sizeof (Evas_Object_Proxy_Data), 8, &default_proxy, EINA_TRUE);
evas_object_map_cow = eina_cow_add("Evas Object Map", sizeof (Evas_Object_Map_Data), 8, &default_map, EINA_TRUE);
evas_object_state_cow = eina_cow_add("Evas Object State", sizeof (Evas_Object_Protected_State), 64, &default_state, EINA_FALSE);
- evas_object_3d_cow = eina_cow_add("Evas Object 3D", sizeof (Evas_Object_3D_Data), 8, &default_proxy, EINA_TRUE);
evas_object_mask_cow = eina_cow_add("Evas Mask Data", sizeof (Evas_Object_Mask_Data), 8, &default_mask, EINA_TRUE);
evas_object_events_cow = eina_cow_add("Evas Events Data", sizeof (Evas_Object_Events_Data), 8, &default_events, EINA_TRUE);
if (!(evas_object_map_cow && evas_object_proxy_cow && evas_object_state_cow &&
- evas_object_3d_cow && evas_object_mask_cow && evas_object_events_cow))
+ evas_object_mask_cow && evas_object_events_cow))
{
eina_cow_del(evas_object_proxy_cow);
eina_cow_del(evas_object_map_cow);
eina_cow_del(evas_object_state_cow);
- eina_cow_del(evas_object_3d_cow);
eina_cow_del(evas_object_mask_cow);
eina_cow_del(evas_object_events_cow);
evas_object_proxy_cow = NULL;
evas_object_map_cow = NULL;
evas_object_state_cow = NULL;
- evas_object_3d_cow = NULL;
evas_object_mask_cow = NULL;
evas_object_events_cow = NULL;
@@ -135,7 +131,7 @@ evas_object_pointer_grab_del(Evas_Object_Protected_Data *obj,
if (obj->proxy->is_proxy && obj->proxy->src_events)
_evas_object_proxy_grab_del(obj, pdata);
}
- if (obj->events->pointer_grabs)
+ if ((obj->events) && (obj->events->pointer_grabs))
{
EINA_COW_WRITE_BEGIN(evas_object_events_cow, obj->events, Evas_Object_Events_Data, events)
events->pointer_grabs = eina_inlist_remove(events->pointer_grabs, EINA_INLIST_GET(pdata));
@@ -171,6 +167,8 @@ _evas_object_pointer_data_get(Evas_Pointer_Data *evas_pdata,
{
Evas_Object_Pointer_Data *pdata;
+ if (!obj) return NULL;
+
pdata = evas_object_pointer_data_find(obj, evas_pdata->pointer);
//The pointer does not exist yet - create one.
@@ -204,7 +202,6 @@ _efl_canvas_object_efl_object_constructor(Eo *eo_obj, Evas_Object_Protected_Data
obj->map = eina_cow_alloc(evas_object_map_cow);
obj->cur = eina_cow_alloc(evas_object_state_cow);
obj->prev = eina_cow_alloc(evas_object_state_cow);
- obj->data_3d = eina_cow_alloc(evas_object_3d_cow);
obj->mask = eina_cow_alloc(evas_object_mask_cow);
obj->events = eina_cow_alloc(evas_object_events_cow);
@@ -242,15 +239,6 @@ end:
return efl_finalize(efl_super(eo_obj, MY_CLASS));
}
-EOLIAN const Efl_Canvas_Gesture_Manager *
-_efl_canvas_object_gesture_manager_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *pd)
-{
- if (!pd->layer || !pd->layer->evas)
- return NULL;
-
- return (pd->layer->evas)->gesture_manager;
-}
-
void
evas_object_change_reset(Evas_Object_Protected_Data *obj)
{
@@ -526,7 +514,6 @@ evas_object_free(Evas_Object_Protected_Data *obj, Eina_Bool clean_layer)
eina_cow_free(evas_object_map_cow, (const Eina_Cow_Data**) &obj->map);
eina_cow_free(evas_object_state_cow, (const Eina_Cow_Data**) &obj->cur);
eina_cow_free(evas_object_state_cow, (const Eina_Cow_Data**) &obj->prev);
- eina_cow_free(evas_object_3d_cow, (const Eina_Cow_Data**) &obj->data_3d);
eina_cow_free(evas_object_mask_cow, (const Eina_Cow_Data**) &obj->mask);
eina_cow_free(evas_object_events_cow, (const Eina_Cow_Data**) &obj->events);
@@ -546,7 +533,6 @@ evas_object_change(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *
Evas_Object_Protected_Data *obj2;
Evas_Object *eo_obj2;
Eina_Bool movch = EINA_FALSE;
- Evas_Canvas3D_Texture *texture;
if ((!obj->layer) || (!obj->layer->evas)) return;
if (obj->layer->evas->nochange) return;
@@ -577,10 +563,6 @@ evas_object_change(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *
if (!obj2) continue;
evas_object_change(eo_obj2, obj2);
}
- EINA_LIST_FOREACH(obj->proxy->proxy_textures, l, texture)
- {
- evas_canvas3d_object_change(texture, EVAS_CANVAS3D_STATE_TEXTURE_DATA, NULL);
- }
if (obj->smart.parent)
{
Evas_Object_Protected_Data *smart_parent = efl_data_scope_get(obj->smart.parent, MY_CLASS);
@@ -899,7 +881,7 @@ evas_object_was_inside(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Eva
}
/* routines apps will call */
-EAPI void
+EVAS_API void
evas_object_ref(Evas_Object *eo_obj)
{
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
@@ -913,7 +895,7 @@ evas_object_ref(Evas_Object *eo_obj)
obj->ref++;
}
-EAPI void
+EVAS_API void
evas_object_unref(Evas_Object *eo_obj)
{
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
@@ -930,7 +912,7 @@ evas_object_unref(Evas_Object *eo_obj)
}
-EAPI int
+EVAS_API int
evas_object_ref_get(const Evas_Object *eo_obj)
{
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
@@ -942,7 +924,7 @@ evas_object_ref_get(const Evas_Object *eo_obj)
return obj->ref;
}
-EAPI void
+EVAS_API void
evas_object_del(Evas_Object *obj)
{
Evas_Object_Protected_Data *pd;
@@ -951,7 +933,7 @@ evas_object_del(Evas_Object *obj)
if (!efl_isa(obj, MY_CLASS))
{
ERR("Called %s on a non-evas object: %s@%p",
- __FUNCTION__, efl_class_name_get(obj), obj);
+ __func__, efl_class_name_get(obj), obj);
return;
}
pd = efl_data_scope_get(obj, MY_CLASS);
@@ -1110,21 +1092,6 @@ _efl_canvas_object_efl_object_invalidate(Eo *eo_obj, Evas_Object_Protected_Data
if (efl_isa(proxy, EFL_GFX_FILTER_INTERFACE))
efl_gfx_filter_source_set(proxy, NULL, eo_obj);
}
-
- /* Eina_Cow has no way to know if we are going to really change something
- or not. So before calling the cow, let's check if we want to do something */
- if (obj->proxy->proxy_textures)
- {
- EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, obj->proxy,
- Evas_Object_Proxy_Data, proxy_src)
- {
- Evas_Canvas3D_Texture *texture;
-
- EINA_LIST_FREE(proxy_src->proxy_textures, texture)
- evas_canvas3d_texture_source_set(texture, NULL);
- }
- EINA_COW_WRITE_END_NOGC(evas_object_proxy_cow, obj->proxy, proxy_src);
- }
}
if (obj->cur)
@@ -1179,7 +1146,7 @@ _efl_canvas_object_efl_object_destructor(Eo *eo_obj, Evas_Object_Protected_Data
end:
evas_object_event_callback_all_del(eo_obj);
evas_object_event_callback_cleanup(eo_obj);
-
+ evas_object_callbacks_shutdown(eo_obj, obj);
efl_destructor(efl_super(eo_obj, MY_CLASS));
}
@@ -1191,7 +1158,7 @@ _efl_canvas_object_efl_gfx_entity_geometry_set(Eo *obj, Evas_Object_Protected_Da
efl_gfx_entity_size_set(obj, EINA_SIZE2D(r.w, r.h));
}
-EAPI void
+EVAS_API void
evas_object_geometry_set(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
{
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
@@ -1200,7 +1167,7 @@ evas_object_geometry_set(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y, Evas_C
efl_gfx_entity_geometry_set(eo_obj, EINA_RECT(x, y, w, h));
}
-EAPI void
+EVAS_API void
evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
{
efl_gfx_entity_position_set(obj, EINA_POSITION2D(x, y));
@@ -1265,7 +1232,7 @@ _efl_canvas_object_efl_gfx_entity_position_set(Eo *eo_obj, Evas_Object_Protected
evas_object_inform_call_move(eo_obj, obj);
}
-EAPI void
+EVAS_API void
evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
{
efl_gfx_entity_size_set((Evas_Object *)obj, EINA_SIZE2D(w, h));
@@ -1364,7 +1331,7 @@ _efl_canvas_object_efl_gfx_entity_geometry_get(const Eo *eo_obj EINA_UNUSED, Eva
return (Eina_Rect) obj->cur->geometry;
}
-EAPI void
+EVAS_API void
evas_object_geometry_get(const Evas_Object *eo_obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
{
Eina_Rect r = efl_gfx_entity_geometry_get(eo_obj);
@@ -1415,7 +1382,7 @@ _evas_object_size_hint_alloc(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protec
}
/* Legacy only */
-EAPI Evas_Display_Mode
+EVAS_API Evas_Display_Mode
evas_object_size_hint_display_mode_get(const Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = EVAS_OBJECT_DATA_SAFE_GET(eo_obj);
@@ -1425,7 +1392,7 @@ evas_object_size_hint_display_mode_get(const Evas_Object *eo_obj)
}
/* Legacy only */
-EAPI void
+EVAS_API void
evas_object_size_hint_display_mode_set(Eo *eo_obj, Evas_Display_Mode dispmode)
{
Evas_Object_Protected_Data *obj = EVAS_OBJECT_DATA_SAFE_GET(eo_obj);
@@ -1589,7 +1556,7 @@ _efl_canvas_object_efl_gfx_hint_hint_size_max_set(Eo *eo_obj, Evas_Object_Protec
evas_object_inform_call_changed_size_hints(eo_obj, obj);
}
-EAPI void
+EVAS_API void
evas_object_size_hint_request_get(const Eo *eo_obj, Evas_Coord *w, Evas_Coord *h)
{
Evas_Object_Protected_Data *obj = EVAS_OBJECT_DATA_SAFE_GET(eo_obj);
@@ -1605,7 +1572,7 @@ evas_object_size_hint_request_get(const Eo *eo_obj, Evas_Coord *w, Evas_Coord *h
if (h) *h = obj->size_hints->request.h;
}
-EAPI void
+EVAS_API void
evas_object_size_hint_request_set(Eo *eo_obj, Evas_Coord w, Evas_Coord h)
{
Evas_Object_Protected_Data *obj = EVAS_OBJECT_DATA_SAFE_GET(eo_obj);
@@ -1656,11 +1623,11 @@ _efl_canvas_object_efl_gfx_hint_hint_aspect_get(const Eo *eo_obj EINA_UNUSED, Ev
{
if ((!obj->size_hints) || obj->delete_me)
{
- if (aspect) *aspect = EVAS_ASPECT_CONTROL_NONE;
+ if (aspect) *aspect = EFL_GFX_HINT_ASPECT_NONE;
if (sz) *sz = EINA_SIZE2D(0, 0);
return;
}
- if (aspect) *aspect = obj->size_hints->aspect.mode;
+ if (aspect) *aspect = (Efl_Gfx_Hint_Aspect)obj->size_hints->aspect.mode;
if (sz)
{
sz->w = obj->size_hints->aspect.size.w;
@@ -1684,7 +1651,7 @@ _efl_canvas_object_efl_gfx_hint_hint_aspect_set(Eo *eo_obj, Evas_Object_Protecte
if ((obj->size_hints->aspect.mode == (Evas_Aspect_Control)aspect) &&
(obj->size_hints->aspect.size.w == sz.w) &&
(obj->size_hints->aspect.size.h == sz.h)) return;
- obj->size_hints->aspect.mode = aspect;
+ obj->size_hints->aspect.mode = (Evas_Aspect_Control)aspect;
obj->size_hints->aspect.size = sz;
evas_object_inform_call_changed_size_hints(eo_obj, obj);
@@ -1843,7 +1810,7 @@ _efl_canvas_object_efl_gfx_hint_hint_fill_set(Eo *eo_obj, Evas_Object_Protected_
evas_object_inform_call_changed_size_hints(eo_obj, obj);
}
-EAPI void
+EVAS_API void
evas_object_show(Evas_Object *eo_obj)
{
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
@@ -1852,14 +1819,14 @@ evas_object_show(Evas_Object *eo_obj)
efl_gfx_entity_visible_set(eo_obj, EINA_TRUE);
}
-EAPI void
+EVAS_API void
evas_object_hide(Evas_Object *eo_obj)
{
if (!eo_obj) return;
efl_gfx_entity_visible_set(eo_obj, EINA_FALSE);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_visible_get(const Evas_Object *obj)
{
return efl_gfx_entity_visible_get((Evas_Object *)obj);
@@ -2053,7 +2020,7 @@ _efl_canvas_object_efl_gfx_entity_visible_get(const Eo *eo_obj EINA_UNUSED,
return obj->cur->visible;
}
-EAPI void
+EVAS_API void
evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a)
{
efl_gfx_color_set((Evas_Object *)obj, r, g, b, a);
@@ -2100,7 +2067,7 @@ _efl_canvas_object_efl_gfx_color_color_set(Eo *eo_obj, Evas_Object_Protected_Dat
evas_object_change(eo_obj, obj);
}
-EAPI void
+EVAS_API void
evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
{
efl_gfx_color_get((Evas_Object *)obj, r, g, b, a);
@@ -2193,7 +2160,7 @@ _efl_canvas_object_render_op_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_D
_render_op_set(obj, _gfx_to_evas_render_op(rop));
}
-EAPI void
+EVAS_API void
evas_object_render_op_set(Evas_Object *eo_obj, Evas_Render_Op render_op)
{
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj);
@@ -2206,7 +2173,7 @@ _efl_canvas_object_render_op_get(const Eo *eo_obj EINA_UNUSED, Evas_Object_Prote
return _evas_to_gfx_render_op(obj->cur->render_op);
}
-EAPI Evas_Render_Op
+EVAS_API Evas_Render_Op
evas_object_render_op_get(const Evas_Object *eo_obj)
{
return _gfx_to_evas_render_op(efl_canvas_object_render_op_get(eo_obj));
@@ -2566,7 +2533,7 @@ _efl_canvas_object_legacy_ctor(Eo *eo_obj, Evas_Object_Protected_Data *obj)
obj->legacy.ctor = EINA_TRUE;
}
-EAPI Eo *
+EVAS_API Eo *
evas_find(const Eo *obj)
{
if (efl_isa(obj, EVAS_CANVAS_CLASS))
@@ -2587,7 +2554,7 @@ _efl_canvas_object_event_animation_cancel(Eo *eo_obj)
/* legacy */
-EAPI const char *
+EVAS_API const char *
evas_object_type_get(const Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj, NULL);
@@ -2595,7 +2562,7 @@ evas_object_type_get(const Evas_Object *eo_obj)
return obj->type;
}
-EAPI void
+EVAS_API void
evas_object_static_clip_set(Evas_Object *eo_obj, Eina_Bool is_static_clip)
{
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj);
@@ -2603,35 +2570,35 @@ evas_object_static_clip_set(Evas_Object *eo_obj, Eina_Bool is_static_clip)
obj->is_static_clip = is_static_clip;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_static_clip_get(const Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj, EINA_FALSE);
return obj->is_static_clip;
}
-EAPI void
+EVAS_API void
evas_object_size_hint_aspect_set(Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h)
{
- efl_gfx_hint_aspect_set(obj, aspect, EINA_SIZE2D(w, h));
+ efl_gfx_hint_aspect_set(obj, (Efl_Gfx_Hint_Aspect)aspect, EINA_SIZE2D(w, h));
}
-EAPI void
+EVAS_API void
evas_object_size_hint_aspect_get(const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h)
{
Eina_Size2D sz = { 0, 0 };
- efl_gfx_hint_aspect_get(obj, (Efl_Gfx_Hint_Aspect*)aspect, &sz);
+ efl_gfx_hint_aspect_get(obj, (Efl_Gfx_Hint_Aspect *)aspect, &sz);
if (w) *w = sz.w;
if (h) *h = sz.h;
}
-EAPI void
+EVAS_API void
evas_object_size_hint_max_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
{
efl_gfx_hint_size_max_set(obj, EINA_SIZE2D(w, h));
}
-EAPI void
+EVAS_API void
evas_object_size_hint_max_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
{
Eina_Size2D sz;
@@ -2640,13 +2607,13 @@ evas_object_size_hint_max_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord
if (h) *h = sz.h;
}
-EAPI void
+EVAS_API void
evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
{
efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(w, h));
}
-EAPI void
+EVAS_API void
evas_object_size_hint_min_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
{
Eina_Size2D sz;
@@ -2655,43 +2622,43 @@ evas_object_size_hint_min_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord
if (h) *h = sz.h;
}
-EAPI void
+EVAS_API void
evas_object_size_hint_padding_set(Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b)
{
efl_gfx_hint_margin_set(obj, l, r, t, b);
}
-EAPI void
+EVAS_API void
evas_object_size_hint_padding_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b)
{
efl_gfx_hint_margin_get(obj, l, r, t, b);
}
-EAPI void
+EVAS_API void
evas_object_size_hint_weight_set(Evas_Object *obj, double x, double y)
{
efl_gfx_hint_weight_set(obj, x, y);
}
-EAPI void
+EVAS_API void
evas_object_size_hint_weight_get(const Evas_Object *obj, double *x, double *y)
{
efl_gfx_hint_weight_get(obj, x, y);
}
-EAPI void
+EVAS_API void
evas_object_size_hint_align_set(Evas_Object *obj, double x, double y)
{
efl_gfx_hint_align_set(obj, x, y);
}
-EAPI void
+EVAS_API void
evas_object_size_hint_align_get(const Evas_Object *obj, double *x, double *y)
{
efl_gfx_hint_align_get(obj, x, y);
}
-EAPI Evas *
+EVAS_API Evas *
evas_object_evas_get(const Eo *eo_obj)
{
if (efl_isa(eo_obj, EFL_CANVAS_OBJECT_CLASS))
@@ -2704,19 +2671,19 @@ evas_object_evas_get(const Eo *eo_obj)
return efl_provider_find((Eo *) eo_obj, EVAS_CANVAS_CLASS);
}
-EAPI void
+EVAS_API void
evas_object_scale_set(Evas_Object *obj, double scale)
{
efl_gfx_entity_scale_set(obj, scale);
}
-EAPI double
+EVAS_API double
evas_object_scale_get(const Evas_Object *obj)
{
return efl_gfx_entity_scale_get(obj);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_pointer_inside_by_device_get(const Evas_Object *eo_obj, Efl_Input_Device *dev)
{
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj, EINA_FALSE);
@@ -2725,7 +2692,7 @@ evas_object_pointer_inside_by_device_get(const Evas_Object *eo_obj, Efl_Input_De
return efl_canvas_pointer_inside_get(eo_obj, dev);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_pointer_coords_inside_get(const Evas_Object *eo_obj, int x, int y)
{
Eina_Position2D pos = EINA_POSITION2D(x, y);
@@ -2733,19 +2700,19 @@ evas_object_pointer_coords_inside_get(const Evas_Object *eo_obj, int x, int y)
return efl_canvas_object_coords_inside_get(eo_obj, pos);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_pointer_inside_get(const Evas_Object *eo_obj)
{
return evas_object_pointer_inside_by_device_get(eo_obj, NULL);
}
-EAPI void
+EVAS_API void
evas_object_is_frame_object_set(Efl_Canvas_Object *obj, Eina_Bool is_frame)
{
efl_canvas_object_is_frame_object_set(obj, is_frame);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_is_frame_object_get(const Efl_Canvas_Object *obj)
{
return efl_canvas_object_is_frame_object_get(obj);
@@ -2754,10 +2721,10 @@ evas_object_is_frame_object_get(const Efl_Canvas_Object *obj)
/* Internal EO APIs and hidden overrides */
-EOAPI EFL_VOID_FUNC_BODYV(efl_canvas_object_is_frame_object_set, EFL_FUNC_CALL(is_frame), Eina_Bool is_frame);
-EOAPI EFL_FUNC_BODY_CONST(efl_canvas_object_is_frame_object_get, Eina_Bool, 0);
-EOAPI EFL_VOID_FUNC_BODY(efl_canvas_object_legacy_ctor)
-EOAPI EFL_VOID_FUNC_BODYV(efl_canvas_object_type_set, EFL_FUNC_CALL(type), const char *type)
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(efl_canvas_object_is_frame_object_set, EFL_FUNC_CALL(is_frame), Eina_Bool is_frame);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(efl_canvas_object_is_frame_object_get, Eina_Bool, 0);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(efl_canvas_object_legacy_ctor)
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(efl_canvas_object_type_set, EFL_FUNC_CALL(type), const char *type)
#define EFL_CANVAS_OBJECT_EXTRA_OPS \
EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _efl_canvas_object_efl_object_dbg_info_get), \
diff --git a/src/lib/evas/canvas/evas_object_polygon.c b/src/lib/evas/canvas/evas_object_polygon.c
index f37b9f5b25..55addf00f2 100644
--- a/src/lib/evas/canvas/evas_object_polygon.c
+++ b/src/lib/evas/canvas/evas_object_polygon.c
@@ -74,7 +74,7 @@ static const Evas_Object_Func object_func =
/* the actual api call to add a rect */
/* it has no other api calls as all properties are standard */
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_polygon_add(Evas *e)
{
e = evas_find(e);
@@ -507,13 +507,13 @@ evas_object_polygon_was_inside(Evas_Object *eo_obj EINA_UNUSED,
return 1;
}
-EAPI void
+EVAS_API void
evas_object_polygon_point_add(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
{
efl_canvas_polygon_point_add(obj, EINA_POSITION2D(x, y));
}
-EAPI void
+EVAS_API void
evas_object_polygon_points_clear(Evas_Object *obj)
{
efl_canvas_polygon_points_clear(obj);
diff --git a/src/lib/evas/canvas/evas_object_rectangle.c b/src/lib/evas/canvas/evas_object_rectangle.c
index 222effe942..8e27f61e90 100644
--- a/src/lib/evas/canvas/evas_object_rectangle.c
+++ b/src/lib/evas/canvas/evas_object_rectangle.c
@@ -74,7 +74,7 @@ static const Evas_Object_Func object_func =
/* the actual api call to add a rect */
/* it has no other api calls as all properties are standard */
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_rectangle_add(Evas *e)
{
e = evas_find(e);
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index 7f07d826e3..a9e654bdcb 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -23,6 +23,7 @@ struct _Evas_Smart_Data
Eina_Rectangle bounding_box;
} cur, prev;
Evas_Object *object;
+ Evas_Object *filter_img;
void *engine_data;
void *data;
Eina_Inlist *callbacks;
@@ -131,7 +132,7 @@ _smart_clipper_get(Evas_Smart_Data *o)
}
/* public funcs */
-EAPI void
+EVAS_API void
evas_object_smart_data_set(Evas_Object *eo_obj, void *data)
{
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj);
@@ -144,14 +145,14 @@ evas_object_smart_data_set(Evas_Object *eo_obj, void *data)
}
}
-EAPI void *
+EVAS_API void *
evas_object_smart_data_get(const Evas_Object *eo_obj)
{
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj, NULL);
return o->data;
}
-EAPI const void *
+EVAS_API const void *
evas_object_smart_interface_get(const Evas_Object *eo_obj,
const char *name)
{
@@ -175,7 +176,7 @@ evas_object_smart_interface_get(const Evas_Object *eo_obj,
return NULL;
}
-EAPI void *
+EVAS_API void *
evas_object_smart_interface_data_get(const Evas_Object *eo_obj,
const Evas_Smart_Interface *iface)
{
@@ -198,14 +199,14 @@ evas_object_smart_interface_data_get(const Evas_Object *eo_obj,
return NULL;
}
-EAPI Evas_Smart*
+EVAS_API Evas_Smart*
evas_object_smart_smart_get(const Efl_Canvas_Group *eo_obj)
{
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj, NULL);
return obj->smart.smart;
}
-EAPI void
+EVAS_API void
evas_object_smart_member_add(Evas_Object *eo_obj, Evas_Object *smart_obj)
{
efl_canvas_group_member_add(smart_obj, eo_obj);
@@ -339,7 +340,7 @@ _efl_canvas_group_group_member_add(Eo *smart_obj, Evas_Smart_Data *o, Evas_Objec
efl_event_callback_call(smart_obj, EFL_CANVAS_GROUP_EVENT_MEMBER_ADDED, eo_obj);
}
-EAPI void
+EVAS_API void
evas_object_smart_member_del(Evas_Object *eo_obj)
{
Evas_Object_Protected_Data *obj;
@@ -425,7 +426,7 @@ _efl_canvas_group_group_member_remove(Eo *smart_obj, Evas_Smart_Data *sd, Evas_O
evas_object_mapped_clip_across_mark(eo_obj, obj);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_smart_type_check(const Evas_Object *eo_obj, const char *type)
{
const Evas_Smart_Class *sc;
@@ -454,7 +455,7 @@ evas_object_smart_type_check(const Evas_Object *eo_obj, const char *type)
return type_check;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_smart_type_check_ptr(const Eo *eo_obj, const char* type)
{
Efl_Class *klass;
@@ -483,7 +484,7 @@ evas_object_smart_type_check_ptr(const Eo *eo_obj, const char* type)
return type_check;
}
-EAPI void
+EVAS_API void
evas_smart_legacy_type_register(const char *type, const Efl_Class *klass)
{
eina_hash_set(_evas_smart_class_names_hash_table, type, klass);
@@ -554,7 +555,7 @@ _efl_canvas_group_group_member_is(const Eo *eo_obj, Evas_Smart_Data *pd EINA_UNU
return (sub->smart.parent == eo_obj);
}
-EAPI Eina_List*
+EVAS_API Eina_List*
evas_object_smart_members_get(const Evas_Object *eo_obj)
{
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj, NULL);
@@ -697,7 +698,7 @@ _evas_smart_class_ifaces_private_data_alloc(Evas_Object *eo_obj,
}
}
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_smart_add(Evas *eo_e, Evas_Smart *s)
{
Evas_Object *eo_obj;
@@ -785,7 +786,7 @@ _evas_object_smart_move_relative_internal(Evas_Smart_Data *o, Evas_Coord dx, Eva
}
}
-EAPI void
+EVAS_API void
evas_object_smart_move_children_relative(Eo *eo_obj, Evas_Coord dx, Evas_Coord dy)
{
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj);
@@ -909,6 +910,9 @@ _efl_canvas_group_efl_gfx_entity_visible_set(Eo *eo_obj, Evas_Smart_Data *o, Ein
efl_gfx_entity_visible_set(clipper, vis);
}
+
+ if (o->filter_img)
+ efl_gfx_entity_visible_set(o->filter_img, vis);
}
EOLIAN static void
@@ -927,6 +931,55 @@ _efl_canvas_group_efl_gfx_entity_position_set(Eo *eo_obj, Evas_Smart_Data *o, Ei
if (o->clipped && !is_overridden)
_evas_object_smart_clipped_smart_move_internal(eo_obj, pos.x, pos.y);
efl_gfx_entity_position_set(efl_super(eo_obj, MY_CLASS), pos);
+ if (o->filter_img) efl_gfx_entity_position_set(o->filter_img, pos);
+}
+
+EOLIAN static void
+_efl_canvas_group_efl_gfx_entity_size_set(Eo *obj, Evas_Smart_Data *o, Eina_Size2D size)
+{
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, size.w, size.h))
+ return;
+
+ efl_gfx_entity_size_set(efl_super(obj, MY_CLASS), size);
+ if (o->filter_img) efl_gfx_entity_size_set(o->filter_img, size);
+}
+
+EOLIAN static void
+_efl_canvas_group_efl_gfx_filter_filter_program_set(Eo *eo_obj, Evas_Smart_Data *o,
+ const char *code, const char *name)
+{
+ Evas_Object_Protected_Data *obj, *fobj;
+ obj = EVAS_OBJ_GET_OR_RETURN(eo_obj);
+
+ if (!code && !name)
+ {
+ if (o->filter_img)
+ {
+ evas_object_del(o->filter_img);
+ o->filter_img = NULL;
+ }
+ return;
+ }
+
+ if (o->filter_img)
+ {
+ efl_gfx_filter_program_set(o->filter_img, code, name);
+ return;
+ }
+
+ o->filter_img = efl_add(EFL_CANVAS_PROXY_CLASS, eo_obj,
+ efl_gfx_fill_auto_set(efl_added, EINA_TRUE),
+ efl_canvas_group_member_add(obj->object, efl_added),
+ efl_canvas_proxy_source_events_set(efl_added, EINA_TRUE),
+ efl_canvas_proxy_source_set(efl_added, eo_obj),
+ evas_object_repeat_events_set(efl_added, EINA_TRUE),
+ efl_gfx_filter_program_set(efl_added, code, name),
+ efl_gfx_entity_geometry_set(efl_added, (Eina_Rect)obj->cur->geometry),
+ efl_gfx_entity_visible_set(efl_added, obj->cur->visible));
+
+ fobj = efl_data_scope_get(o->filter_img, EFL_CANVAS_OBJECT_CLASS);
+ if (!fobj) return;
+ fobj->is_filter_object = EINA_TRUE;
}
EOLIAN static void
@@ -983,7 +1036,7 @@ evas_object_smart_attach(Evas_Object *eo_obj, Evas_Smart *s)
if (s->smart_class->add) s->smart_class->add(eo_obj);
}
-EAPI void
+EVAS_API void
evas_object_smart_callback_add(Evas_Object *eo_obj, const char *event, Evas_Smart_Cb func, const void *data)
{
evas_object_smart_callback_priority_add(eo_obj, event,
@@ -1019,7 +1072,7 @@ _smart_cb_check(Evas_Smart_Data *o, const char *event)
}
}
-EAPI void
+EVAS_API void
evas_object_smart_callback_priority_add(Evas_Object *eo_obj, const char *event, Evas_Callback_Priority priority, Evas_Smart_Cb func, const void *data)
{
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj);
@@ -1040,7 +1093,7 @@ evas_object_smart_callback_priority_add(Evas_Object *eo_obj, const char *event,
efl_event_callback_priority_add(eo_obj, eo_desc, priority, _eo_evas_smart_cb, cb_info);
}
-EAPI void *
+EVAS_API void *
evas_object_smart_callback_del(Evas_Object *eo_obj, const char *event, Evas_Smart_Cb func)
{
_eo_evas_smart_cb_info *info;
@@ -1067,7 +1120,7 @@ evas_object_smart_callback_del(Evas_Object *eo_obj, const char *event, Evas_Smar
return NULL;
}
-EAPI void *
+EVAS_API void *
evas_object_smart_callback_del_full(Evas_Object *eo_obj, const char *event, Evas_Smart_Cb func, const void *data)
{
_eo_evas_smart_cb_info *info;
@@ -1094,7 +1147,7 @@ evas_object_smart_callback_del_full(Evas_Object *eo_obj, const char *event, Evas
return NULL;
}
-EAPI void
+EVAS_API void
evas_object_smart_callback_call(Evas_Object *eo_obj, const char *event, void *event_info)
{
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
@@ -1133,7 +1186,7 @@ _evas_object_smart_callback_call_internal(Evas_Object *eo_obj, const Efl_Event_D
efl_event_callback_legacy_call(eo_obj, eo_desc, NULL);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_smart_callbacks_descriptions_set(Eo *eo_obj, const Evas_Smart_Cb_Description *descriptions)
{
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj, EINA_FALSE);
@@ -1160,7 +1213,7 @@ evas_object_smart_callbacks_descriptions_set(Eo *eo_obj, const Evas_Smart_Cb_Des
return EINA_TRUE;
}
-EAPI void
+EVAS_API void
evas_object_smart_callbacks_descriptions_get(const Eo *eo_obj, const Evas_Smart_Cb_Description ***class_descriptions, unsigned int *class_count, const Evas_Smart_Cb_Description ***instance_descriptions, unsigned int *instance_count)
{
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj);
@@ -1179,7 +1232,7 @@ evas_object_smart_callbacks_descriptions_get(const Eo *eo_obj, const Evas_Smart_
*instance_count = o->callbacks_descriptions.size;
}
-EAPI void
+EVAS_API void
evas_object_smart_callback_description_find(const Eo *eo_obj, const char *name, const Evas_Smart_Cb_Description **class_description, const Evas_Smart_Cb_Description **instance_description)
{
EVAS_OBJECT_SMART_GET_OR_RETURN(eo_obj);
@@ -1324,12 +1377,27 @@ evas_object_smart_changed_get(Evas_Object_Protected_Data *obj)
return EINA_FALSE;
//b. Object clipper visibility
- if ((obj->prev->clipper && obj->cur->clipper) &&
- ((!obj->prev->clipper->cur->visible &&
- !obj->cur->clipper->cur->visible) ||
- ((obj->prev->clipper->cur->color.a == 0) &&
- (obj->cur->clipper->cur->color.a == 0))))
- return EINA_FALSE;
+ if (obj->prev->clipper && obj->cur->clipper)
+ {
+ if (obj->prev->clipper != obj->cur->clipper)
+ {
+ /* check between prev clipper and current clipper */
+ if ((!obj->prev->clipper->cur->visible &&
+ !obj->cur->clipper->cur->visible) ||
+ ((obj->prev->clipper->cur->color.a == 0) &&
+ (obj->cur->clipper->cur->color.a == 0)))
+ return EINA_FALSE;
+ }
+ else
+ {
+ /* check between prev value and current value of clipper */
+ if ((!obj->cur->clipper->prev->visible &&
+ !obj->cur->clipper->cur->visible) ||
+ ((obj->cur->clipper->prev->color.a == 0) &&
+ (obj->cur->clipper->cur->color.a == 0)))
+ return EINA_FALSE;
+ }
+ }
if (!obj->clip.clipees)
{
@@ -1339,7 +1407,10 @@ evas_object_smart_changed_get(Evas_Object_Protected_Data *obj)
if (has_map)
{
if ((obj->need_surface_clear && obj->changed && !obj->is_smart) ||
- ((obj->changed_pchange) && (obj->changed_map)))
+ ((obj->changed_pchange) && (obj->changed_map)) ||
+ /* A condition for a rare case which has obj->changed is FALSE,
+ but Efl_Canvas_Vg_Object_Data.changed is TRUE. */
+ (obj->is_vg_object && evas_object_vg_changed_get(obj)))
return EINA_TRUE;
}
}
@@ -1955,9 +2026,9 @@ _efl_canvas_group_efl_object_event_callback_array_priority_add(Eo *obj, Evas_Sma
}
return efl_event_callback_array_priority_add(efl_super(obj, MY_CLASS), array, priority, user_data);
}
-EOAPI EFL_VOID_FUNC_BODY(efl_canvas_group_add)
-EOAPI EFL_VOID_FUNC_BODY(efl_canvas_group_del)
-EOAPI EFL_VOID_FUNC_BODYV(efl_canvas_group_clipped_set, EFL_FUNC_CALL(enable), Eina_Bool enable)
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(efl_canvas_group_add)
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODY(efl_canvas_group_del)
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(efl_canvas_group_clipped_set, EFL_FUNC_CALL(enable), Eina_Bool enable)
#define EFL_CANVAS_GROUP_EXTRA_OPS \
EFL_OBJECT_OP_FUNC(efl_canvas_group_add, _efl_canvas_group_group_add), \
diff --git a/src/lib/evas/canvas/evas_object_smart_clipped.c b/src/lib/evas/canvas/evas_object_smart_clipped.c
index a904479c01..41633c8df3 100644
--- a/src/lib/evas/canvas/evas_object_smart_clipped.c
+++ b/src/lib/evas/canvas/evas_object_smart_clipped.c
@@ -10,7 +10,7 @@
CSO_DATA_GET(eo_obj, ptr) \
if (!ptr) return __VA_ARGS__;
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_smart_clipped_clipper_get(const Evas_Object *eo_obj)
{
CSO_DATA_GET_OR_RETURN(eo_obj, cso, NULL);
@@ -98,7 +98,7 @@ evas_object_smart_clipped_smart_member_del(Evas_Object *eo_obj, Evas_Object *mem
evas_object_hide(cso->clipper);
}
-EAPI void
+EVAS_API void
evas_object_smart_clipped_smart_set(Evas_Smart_Class *sc)
{
if (!sc)
@@ -117,7 +117,7 @@ evas_object_smart_clipped_smart_set(Evas_Smart_Class *sc)
sc->member_del = evas_object_smart_clipped_smart_member_del;
}
-EAPI const Evas_Smart_Class *
+EVAS_API const Evas_Smart_Class *
evas_object_smart_clipped_class_get(void)
{
static Evas_Smart_Class _sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("EvasObjectSmartClipped");
diff --git a/src/lib/evas/canvas/evas_object_table.c b/src/lib/evas/canvas/evas_object_table.c
index e07496adb1..d9be88351d 100644
--- a/src/lib/evas/canvas/evas_object_table.c
+++ b/src/lib/evas/canvas/evas_object_table.c
@@ -328,7 +328,6 @@ _evas_object_table_calculate_hints_homogeneous(Evas_Object *o, Evas_Table_Data *
Evas_Object_Table_Option *opt;
Evas_Coord minw, minh, o_minw, o_minh;
Eina_Bool expand_h, expand_v;
- Eina_Bool fill_h, fill_v;
o_minw = 0;
o_minh = 0;
@@ -349,8 +348,6 @@ _evas_object_table_calculate_hints_homogeneous(Evas_Object *o, Evas_Table_Data *
(child, &opt->pad.l, &opt->pad.r, &opt->pad.t, &opt->pad.b);
evas_object_size_hint_align_get(child, &opt->align.h, &opt->align.v);
evas_object_size_hint_weight_get(child, &weightw, &weighth);
- //only for Efl.Ui.Table
- efl_gfx_hint_fill_get(child, &fill_h, &fill_v);
child_minw = opt->min.w + opt->pad.l + opt->pad.r;
child_minh = opt->min.h + opt->pad.t + opt->pad.b;
@@ -376,13 +373,13 @@ _evas_object_table_calculate_hints_homogeneous(Evas_Object *o, Evas_Table_Data *
expand_v = 1;
}
- opt->fill_h = fill_h;
+ opt->fill_h = 0;
if (opt->align.h < 0.0)
{
opt->align.h = 0.5;
opt->fill_h = 1;
}
- opt->fill_v = fill_v;
+ opt->fill_v = 0;
if (opt->align.v < 0.0)
{
opt->align.v = 0.5;
@@ -968,7 +965,7 @@ _evas_table_efl_canvas_group_group_calculate(Eo *o, Evas_Table_Data *priv)
evas_event_thaw_eval(e);
}
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_table_add(Evas *evas)
{
evas = evas_find(evas);
@@ -1085,7 +1082,7 @@ _evas_table_pack_get(const Eo *o EINA_UNUSED, Evas_Table_Data *_pd EINA_UNUSED,
if (row) *row = opt->row;
if (colspan) *colspan = opt->colspan;
if (rowspan) *rowspan = opt->rowspan;
-
+
return EINA_TRUE;
}
@@ -1124,7 +1121,7 @@ _evas_table_pack(Eo *o, Evas_Table_Data *priv, Evas_Object *child, unsigned shor
{
WRN("row + rowspan getting rather large (>32767)");
}
-
+
opt = _evas_object_table_option_get(child);
if (opt)
{
@@ -1414,7 +1411,7 @@ _evas_table_efl_ui_i18n_mirrored_get(const Eo *o EINA_UNUSED, Evas_Table_Data *p
return priv->is_mirrored;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_table_mirrored_get(const Eo *obj)
{
return efl_ui_mirrored_get(obj);
@@ -1430,7 +1427,7 @@ _evas_table_efl_ui_i18n_mirrored_set(Eo *o, Evas_Table_Data *priv, Eina_Bool mir
}
}
-EAPI void
+EVAS_API void
evas_object_table_mirrored_set(Eo *obj, Eina_Bool mirrored)
{
efl_ui_mirrored_set(obj, mirrored);
diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c
index 6cacf8e899..66fa5020d4 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -362,7 +362,7 @@ _evas_object_text_vert_advance_get(const Evas_Object *obj EINA_UNUSED,
return o->max_ascent + o->max_descent;
}
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_text_add(Evas *e)
{
e = evas_find(e);
@@ -410,6 +410,8 @@ _evas_text_font_reload(Eo *eo_obj, Evas_Text_Data *o)
Eina_Bool source_invisible = EINA_FALSE;
Eina_List *was = NULL;
+ if (o->cur.size == 0 || (!o->cur.font && !o->cur.source)) return ;
+
if (!(obj->layer->evas->is_frozen))
{
pass = evas_event_passes_through(eo_obj, obj);
@@ -1152,6 +1154,8 @@ _evas_text_direction_get(const Eo *eo_obj, Evas_Text_Data *o)
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
(Evas_Object *)eo_obj, obj);
}
+#else
+ (void)eo_obj;
#endif
return (Efl_Text_Bidirectional_Type)o->bidi_dir;
@@ -1453,7 +1457,7 @@ _evas_text_style_pad_get(const Eo *eo_obj, Evas_Text_Data *o, int *l, int *r, in
_evas_object_text_pad_get(eo_obj, o, l, r, t, b);
}
-EAPI int
+EVAS_API int
evas_string_char_next_get(const char *str, int pos, int *decoded)
{
int p, d;
@@ -1469,7 +1473,7 @@ evas_string_char_next_get(const char *str, int pos, int *decoded)
return p;
}
-EAPI int
+EVAS_API int
evas_string_char_prev_get(const char *str, int pos, int *decoded)
{
int p, d;
@@ -1482,7 +1486,7 @@ evas_string_char_prev_get(const char *str, int pos, int *decoded)
return p;
}
-EAPI int
+EVAS_API int
evas_string_char_len_get(const char *str)
{
if (!str) return 0;
@@ -2063,22 +2067,6 @@ evas_object_text_render_pre(Evas_Object *eo_obj,
obj->cur->clipper->private_data);
}
-#ifdef BIDI_SUPPORT
- if (o->inherit_paragraph_direction)
- {
- Evas_BiDi_Direction parent_dir = EVAS_BIDI_DIRECTION_NEUTRAL;
-
- if (obj->smart.parent)
- parent_dir = evas_object_paragraph_direction_get(obj->smart.parent);
-
- if (parent_dir != o->paragraph_direction)
- {
- o->paragraph_direction = parent_dir;
- o->changed_paragraph_direction = EINA_TRUE;
- }
- }
-#endif
-
/* If object size changed and ellipsis is set */
if (((o->cur.ellipsis >= 0.0) &&
((obj->cur->geometry.w != o->last_computed.w) ||
@@ -2334,13 +2322,13 @@ _evas_object_text_recalc(Evas_Object *eo_obj, Eina_Unicode *text)
#endif
}
-EAPI void
+EVAS_API void
evas_object_text_font_source_set(Eo *obj, const char *font_source)
{
efl_text_font_source_set((Eo *) obj, font_source);
}
-EAPI const char *
+EVAS_API const char *
evas_object_text_font_source_get(const Eo *obj)
{
const char *font_source = 0;
@@ -2348,7 +2336,7 @@ evas_object_text_font_source_get(const Eo *obj)
return font_source;
}
-EAPI void
+EVAS_API void
evas_object_text_font_set(Eo *obj, const char *font, Evas_Font_Size size)
{
if (!font || size <= 0) return; /*Condition for legacy object*/
@@ -2357,20 +2345,20 @@ evas_object_text_font_set(Eo *obj, const char *font, Evas_Font_Size size)
efl_text_font_size_set((Eo *) obj, size);
}
-EAPI void
+EVAS_API void
evas_object_text_font_get(const Eo *obj, const char **font, Evas_Font_Size *size)
{
if (font) *font = efl_text_font_family_get((Eo *) obj);
if (size) *size = efl_text_font_size_get((Eo *) obj);
}
-EAPI void
+EVAS_API void
evas_object_text_text_set(Eo *obj, const char *text)
{
efl_text_set((Eo *) obj, text);
}
-EAPI const char *
+EVAS_API const char *
evas_object_text_text_get(const Eo *obj)
{
return efl_text_get((Eo *) obj);
@@ -2384,14 +2372,14 @@ _evas_text_efl_gfx_filter_filter_program_set(Eo *obj, Evas_Text_Data *pd EINA_UN
}
/* deprecated */
-EAPI void
+EVAS_API void
evas_object_text_filter_program_set(Evas_Object *obj, const char *code)
{
efl_gfx_filter_program_set(obj, code, NULL);
}
/* deprecated */
-EAPI void
+EVAS_API void
evas_object_text_filter_source_set(Evas_Object *obj, const char *name, Evas_Object *source)
{
efl_gfx_filter_source_set(obj, name, source);
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 48857a5a32..f44dfaab5c 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -66,7 +66,7 @@
#include "evas_common_private.h"
#include "evas_private.h"
-#include "efl_text_cursor.eo.h"
+#include "efl_text_cursor_object.eo.h"
#include "Efl.h"
#include "efl_canvas_textblock_internal.h"
@@ -311,7 +311,6 @@ struct _Evas_Object_Textblock_Text_Item
{
Evas_Object_Textblock_Item parent; /**< Textblock item. */
Evas_Text_Props text_props; /**< Props for this item. */
- Evas_Coord x_adjustment; /**< Used to indicate by how much we adjusted sizes */
Text_Item_Filter *gfx_filter;
};
@@ -500,6 +499,7 @@ struct _Evas_Object_Textblock
} default_format;
double valign;
Eina_Stringshare *markup_text;
+ Evas_Object_Textblock_Format *main_fmt;
char *utf8;
void *engine_data;
const char *repch;
@@ -531,6 +531,7 @@ struct _Evas_Object_Textblock
Eina_Bool wrap_changed : 1;
Eina_Bool auto_styles : 1;
Eina_Bool fit_in_progress : 1;
+ Eina_Bool is_legacy : 1;
};
struct _Evas_Textblock_Selection_Iterator
@@ -556,24 +557,24 @@ static void evas_object_textblock_render(Evas_Object *eo_obj,
int x, int y, Eina_Bool do_async);
static void evas_object_textblock_free(Evas_Object *eo_obj);
static void evas_object_textblock_render_pre(Evas_Object *eo_obj,
- Evas_Object_Protected_Data *obj,
- void *type_private_data);
+ Evas_Object_Protected_Data *obj,
+ void *type_private_data);
static void evas_object_textblock_render_post(Evas_Object *eo_obj,
- Evas_Object_Protected_Data *obj,
- void *type_private_data);
+ Evas_Object_Protected_Data *obj,
+ void *type_private_data);
static Evas_Object_Textblock_Node_Text *_evas_textblock_node_text_new(void);
static void *evas_object_textblock_engine_data_get(Evas_Object *eo_obj);
static int evas_object_textblock_is_opaque(Evas_Object *eo_obj,
- Evas_Object_Protected_Data *obj,
- void *type_private_data);
+ Evas_Object_Protected_Data *obj,
+ void *type_private_data);
static int evas_object_textblock_was_opaque(Evas_Object *eo_obj,
- Evas_Object_Protected_Data *obj,
- void *type_private_data);
+ Evas_Object_Protected_Data *obj,
+ void *type_private_data);
static void evas_object_textblock_coords_recalc(Evas_Object *eo_obj,
- Evas_Object_Protected_Data *obj,
- void *type_private_data);
+ Evas_Object_Protected_Data *obj,
+ void *type_private_data);
static void _canvas_text_format_changed(Eo *eo_obj, Efl_Canvas_Textblock_Data *o);
static const Evas_Object_Func object_func =
@@ -632,7 +633,7 @@ static const char *_textblock_format_node_from_style_tag(Efl_Canvas_Textblock_Da
#endif
static Eina_Bool _evas_textblock_cursor_format_append(Efl_Text_Cursor_Handle *cur, const char *format, Evas_Object_Textblock_Node_Format **_fnode, Eina_Bool is_item);
-EAPI Eina_Bool evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur);
+EVAS_API Eina_Bool evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur);
static Eina_Bool _evas_textblock_cursor_format_is_visible_get(const Efl_Text_Cursor_Handle *cur);
static void _find_layout_item_line_match(Evas_Object *eo_obj, Evas_Object_Textblock_Node_Text *n, size_t pos, Evas_Object_Textblock_Line **lnr, Evas_Object_Textblock_Item **itr);
static Evas_Object_Textblock_Node_Format *_evas_textblock_cursor_node_format_at_pos_get(const Efl_Text_Cursor_Handle *cur);
@@ -895,8 +896,7 @@ _image_safe_unref(Evas_Public_Data *e, void *image, Eina_Bool async)
* @param it the layout item to be freed
*/
static void
-_item_free(Evas_Public_Data *evas,
- Efl_Canvas_Textblock_Data *o,
+_item_free(Efl_Canvas_Textblock_Data *o,
Evas_Object_Protected_Data *evas_o,
Evas_Object_Textblock_Line *ln, Evas_Object_Textblock_Item *it)
{
@@ -913,7 +913,7 @@ _item_free(Evas_Public_Data *evas,
//Evas_Public_Data *evas = efl_data_scope_get(eo_evas, EVAS_CANVAS_CLASS);
Eina_Bool async = ti->gfx_filter->do_async;
- _image_safe_unref(evas, ti->gfx_filter->output, async);
+ _image_safe_unref(evas_o->layer->evas, ti->gfx_filter->output, async);
ti->gfx_filter->output = NULL;
}
EINA_INLIST_REMOVE(o->gfx_filter.text_items, ti->gfx_filter);
@@ -965,12 +965,6 @@ _line_free(Evas_Object_Textblock_Line *ln)
*/
-/**
- * @internal
- * @var escape_values_e_sorted[]
- * This array consists of Escape_Value structure sorted by escape string
- * And new added value must be placed sorted position, and reflected on escape_values_v_sorted
- */
typedef struct _Escape_Value Escape_Value;
struct _Escape_Value
@@ -983,7 +977,27 @@ struct _Escape_Value
#define ESCAPE_VALUE(e,v) {e,v,strlen(e),strlen(v)}
-static const Escape_Value escape_values_e_sorted[] = {
+/**
+ * @internal
+ * @var html_common_escapes[]
+ * This array consists of most common html escapes values as _Escape_Value structure
+ */
+static const Escape_Value html_common_escapes[] = {
+ ESCAPE_VALUE("&amp;", "\x26"),
+ ESCAPE_VALUE("&apos;", "\x27"),
+ ESCAPE_VALUE("&gt;", "\x3e"),
+ ESCAPE_VALUE("&lt;", "\x3c"),
+ ESCAPE_VALUE("&quot;", "\x22"),
+};
+
+
+/**
+ * @internal
+ * @var escape_values_e_common_sorted[]
+ * This array consists of rest html escapes values as _Escape_Value structure
+ */
+
+static const Escape_Value html_escapes[] = {
ESCAPE_VALUE("&Aacute;", "\xc3\x81"),
ESCAPE_VALUE("&Acirc;", "\xc3\x82"),
ESCAPE_VALUE("&Aelig;", "\xc3\x86"),
@@ -1101,7 +1115,7 @@ static const Escape_Value escape_values_e_sorted[] = {
ESCAPE_VALUE("&psi;", "\xce\xa8"),
ESCAPE_VALUE("&raquo;", "\xc2\xbb"),
ESCAPE_VALUE("&rarr;", "\xe2\x86\x92"),
- ESCAPE_VALUE("&rarr;", "\xe2\x87\x92"),
+ ESCAPE_VALUE("&rArr;", "\xe2\x87\x92"),
ESCAPE_VALUE("&reg;", "\xc2\xae"),
ESCAPE_VALUE("&rho;", "\xce\xa1"),
ESCAPE_VALUE("&rlm;", "\xe2\x80\x8f"),
@@ -1133,190 +1147,182 @@ static const Escape_Value escape_values_e_sorted[] = {
ESCAPE_VALUE("&zwnj;", "\xe2\x80\x8c"),
};
+static int
+_escape_key_sort(const void *a, const void *b)
+{
+ const char *k_a = (*(const Escape_Value **) a)->escape;
+ const char *k_b = (*(const Escape_Value **) b)->escape;
+ return strcmp(k_a, k_b);
+}
-/**
- * @internal
- * @var escape_values_e_common_sorted[]
- * same as escape_values_e_sorted with small subset of common escapes
- */
-static const Escape_Value escape_values_e_common_sorted[] = {
- ESCAPE_VALUE("&amp;", "\x26"),
- ESCAPE_VALUE("&apos;", "\x27"),
- ESCAPE_VALUE("&gt;", "\x3e"),
- ESCAPE_VALUE("&lt;", "\x3c"),
- ESCAPE_VALUE("&quot;", "\x22"),
-};
+static int
+_escape_value_sort(const void *a, const void *b)
+{
+ const char *v_a = (*(const Escape_Value **) a)->value;
+ const char *v_b = (*(const Escape_Value **) b)->value;
+ return strcmp(v_a, v_b);
+}
-/**
- * @internal
- * @var escape_values_v_sorted[]
- * This array consists of Escape_Value structure sorted by escape value
- * And new added value must be placed sorted position, and reflected on escape_values_e_sorted
- */
-static const Escape_Value escape_values_v_sorted[] = {
- ESCAPE_VALUE("&nbsp;", "\xc2\xa0"),
- ESCAPE_VALUE("&iexcl;", "\xc2\xa1"),
- ESCAPE_VALUE("&cent;", "\xc2\xa2"),
- ESCAPE_VALUE("&pound;", "\xc2\xa3"),
- ESCAPE_VALUE("&curren;", "\xc2\xa4"),
- ESCAPE_VALUE("&yen;", "\xc2\xa5"),
- ESCAPE_VALUE("&brvbar;", "\xc2\xa6"),
- ESCAPE_VALUE("&sect;", "\xc2\xa7"),
- ESCAPE_VALUE("&uml;", "\xc2\xa8"),
- ESCAPE_VALUE("&copy;", "\xc2\xa9"),
- ESCAPE_VALUE("&ordf;", "\xc2\xaa"),
- ESCAPE_VALUE("&laquo;", "\xc2\xab"),
- ESCAPE_VALUE("&not;", "\xc2\xac"),
- ESCAPE_VALUE("&shy;", "\xc2\xad"),
- ESCAPE_VALUE("&reg;", "\xc2\xae"),
- ESCAPE_VALUE("&macr;", "\xc2\xaf"),
- ESCAPE_VALUE("&deg;", "\xc2\xb0"),
- ESCAPE_VALUE("&plusmn;", "\xc2\xb1"),
- ESCAPE_VALUE("&sup2;", "\xc2\xb2"),
- ESCAPE_VALUE("&sup3;", "\xc2\xb3"),
- ESCAPE_VALUE("&acute;", "\xc2\xb4"),
- ESCAPE_VALUE("&micro;", "\xc2\xb5"),
- ESCAPE_VALUE("&para;", "\xc2\xb6"),
- ESCAPE_VALUE("&middot;", "\xc2\xb7"),
- ESCAPE_VALUE("&cedil;", "\xc2\xb8"),
- ESCAPE_VALUE("&sup1;", "\xc2\xb9"),
- ESCAPE_VALUE("&ordm;", "\xc2\xba"),
- ESCAPE_VALUE("&raquo;", "\xc2\xbb"),
- ESCAPE_VALUE("&frac14;", "\xc2\xbc"),
- ESCAPE_VALUE("&frac12;", "\xc2\xbd"),
- ESCAPE_VALUE("&frac34;", "\xc2\xbe"),
- ESCAPE_VALUE("&iquest;", "\xc2\xbf"),
- ESCAPE_VALUE("&Agrave;", "\xc3\x80"),
- ESCAPE_VALUE("&Aacute;", "\xc3\x81"),
- ESCAPE_VALUE("&Acirc;", "\xc3\x82"),
- ESCAPE_VALUE("&Atilde;", "\xc3\x83"),
- ESCAPE_VALUE("&Auml;", "\xc3\x84"),
- ESCAPE_VALUE("&Aring;", "\xc3\x85"),
- ESCAPE_VALUE("&Aelig;", "\xc3\x86"),
- ESCAPE_VALUE("&Ccedil;", "\xc3\x87"),
- ESCAPE_VALUE("&Egrave;", "\xc3\x88"),
- ESCAPE_VALUE("&Eacute;", "\xc3\x89"),
- ESCAPE_VALUE("&Ecirc;", "\xc3\x8a"),
- ESCAPE_VALUE("&Euml;", "\xc3\x8b"),
- ESCAPE_VALUE("&Igrave;", "\xc3\x8c"),
- ESCAPE_VALUE("&Iacute;", "\xc3\x8d"),
- ESCAPE_VALUE("&Icirc;", "\xc3\x8e"),
- ESCAPE_VALUE("&Iuml;", "\xc3\x8f"),
- ESCAPE_VALUE("&Eth;", "\xc3\x90"),
- ESCAPE_VALUE("&Ntilde;", "\xc3\x91"),
- ESCAPE_VALUE("&Ograve;", "\xc3\x92"),
- ESCAPE_VALUE("&Oacute;", "\xc3\x93"),
- ESCAPE_VALUE("&Ocirc;", "\xc3\x94"),
- ESCAPE_VALUE("&Otilde;", "\xc3\x95"),
- ESCAPE_VALUE("&Ouml;", "\xc3\x96"),
- ESCAPE_VALUE("&times;", "\xc3\x97"),
- ESCAPE_VALUE("&Oslash;", "\xc3\x98"),
- ESCAPE_VALUE("&Ugrave;", "\xc3\x99"),
- ESCAPE_VALUE("&Uacute;", "\xc3\x9a"),
- ESCAPE_VALUE("&Ucirc;", "\xc3\x9b"),
- ESCAPE_VALUE("&Yacute;", "\xc3\x9d"),
- ESCAPE_VALUE("&Thorn;", "\xc3\x9e"),
- ESCAPE_VALUE("&szlig;", "\xc3\x9f"),
- ESCAPE_VALUE("&agrave;", "\xc3\xa0"),
- ESCAPE_VALUE("&aacute;", "\xc3\xa1"),
- ESCAPE_VALUE("&acirc;", "\xc3\xa2"),
- ESCAPE_VALUE("&atilde;", "\xc3\xa3"),
- ESCAPE_VALUE("&auml;", "\xc3\xa4"),
- ESCAPE_VALUE("&aring;", "\xc3\xa5"),
- ESCAPE_VALUE("&aelig;", "\xc3\xa6"),
- ESCAPE_VALUE("&ccedil;", "\xc3\xa7"),
- ESCAPE_VALUE("&egrave;", "\xc3\xa8"),
- ESCAPE_VALUE("&eacute;", "\xc3\xa9"),
- ESCAPE_VALUE("&ecirc;", "\xc3\xaa"),
- ESCAPE_VALUE("&euml;", "\xc3\xab"),
- ESCAPE_VALUE("&igrave;", "\xc3\xac"),
- ESCAPE_VALUE("&iacute;", "\xc3\xad"),
- ESCAPE_VALUE("&icirc;", "\xc3\xae"),
- ESCAPE_VALUE("&iuml;", "\xc3\xaf"),
- ESCAPE_VALUE("&eth;", "\xc3\xb0"),
- ESCAPE_VALUE("&ntilde;", "\xc3\xb1"),
- ESCAPE_VALUE("&ograve;", "\xc3\xb2"),
- ESCAPE_VALUE("&oacute;", "\xc3\xb3"),
- ESCAPE_VALUE("&ocirc;", "\xc3\xb4"),
- ESCAPE_VALUE("&otilde;", "\xc3\xb5"),
- ESCAPE_VALUE("&ouml;", "\xc3\xb6"),
- ESCAPE_VALUE("&divide;", "\xc3\xb7"),
- ESCAPE_VALUE("&oslash;", "\xc3\xb8"),
- ESCAPE_VALUE("&ugrave;", "\xc3\xb9"),
- ESCAPE_VALUE("&uacute;", "\xc3\xba"),
- ESCAPE_VALUE("&ucirc;", "\xc3\xbb"),
- ESCAPE_VALUE("&uuml;", "\xc3\xbc"),
- ESCAPE_VALUE("&yacute;", "\xc3\xbd"),
- ESCAPE_VALUE("&thorn;", "\xc3\xbe"),
- ESCAPE_VALUE("&yuml;", "\xc3\xbf"),
- ESCAPE_VALUE("&alpha;", "\xce\x91"),
- ESCAPE_VALUE("&beta;", "\xce\x92"),
- ESCAPE_VALUE("&gamma;", "\xce\x93"),
- ESCAPE_VALUE("&delta;", "\xce\x94"),
- ESCAPE_VALUE("&epsilon;", "\xce\x95"),
- ESCAPE_VALUE("&zeta;", "\xce\x96"),
- ESCAPE_VALUE("&eta;", "\xce\x97"),
- ESCAPE_VALUE("&theta;", "\xce\x98"),
- ESCAPE_VALUE("&iota;", "\xce\x99"),
- ESCAPE_VALUE("&kappa;", "\xce\x9a"),
- ESCAPE_VALUE("&lambda;", "\xce\x9b"),
- ESCAPE_VALUE("&mu;", "\xce\x9c"),
- ESCAPE_VALUE("&nu;", "\xce\x9d"),
- ESCAPE_VALUE("&xi;", "\xce\x9e"),
- ESCAPE_VALUE("&omicron;", "\xce\x9f"),
- ESCAPE_VALUE("&pi;", "\xce\xa0"),
- ESCAPE_VALUE("&rho;", "\xce\xa1"),
- ESCAPE_VALUE("&sigma;", "\xce\xa3"),
- ESCAPE_VALUE("&tau;", "\xce\xa4"),
- ESCAPE_VALUE("&upsilon;", "\xce\xa5"),
- ESCAPE_VALUE("&phi;", "\xce\xa6"),
- ESCAPE_VALUE("&chi;", "\xce\xa7"),
- ESCAPE_VALUE("&psi;", "\xce\xa8"),
- ESCAPE_VALUE("&omega;", "\xce\xa9"),
- ESCAPE_VALUE("&zwnj;", "\xe2\x80\x8c"),
- ESCAPE_VALUE("&zwj;", "\xe2\x80\x8d"),
- ESCAPE_VALUE("&lrm;", "\xe2\x80\x8e"),
- ESCAPE_VALUE("&rlm;", "\xe2\x80\x8f"),
- ESCAPE_VALUE("&dagger;", "\xe2\x80\xa0"),
- ESCAPE_VALUE("&Dagger;", "\xe2\x80\xa1"),
- ESCAPE_VALUE("&bull;", "\xe2\x80\xa2"),
- ESCAPE_VALUE("&hellip;", "\xe2\x80\xa6"),
- ESCAPE_VALUE("&euro;", "\xe2\x82\xac"),
- ESCAPE_VALUE("&larr;", "\xe2\x86\x90"),
- ESCAPE_VALUE("&uarr;", "\xe2\x86\x91"),
- ESCAPE_VALUE("&rarr;", "\xe2\x86\x92"),
- ESCAPE_VALUE("&darr;", "\xe2\x86\x93"),
- ESCAPE_VALUE("&harr;", "\xe2\x86\x94"),
- ESCAPE_VALUE("&larr;", "\xe2\x87\x90"),
- ESCAPE_VALUE("&rarr;", "\xe2\x87\x92"),
- ESCAPE_VALUE("&forall;", "\xe2\x88\x80"),
- ESCAPE_VALUE("&exist;", "\xe2\x88\x83"),
- ESCAPE_VALUE("&nabla;", "\xe2\x88\x87"),
- ESCAPE_VALUE("&prod;", "\xe2\x88\x8f"),
- ESCAPE_VALUE("&sum;", "\xe2\x88\x91"),
- ESCAPE_VALUE("&and;", "\xe2\x88\xa7"),
- ESCAPE_VALUE("&or;", "\xe2\x88\xa8"),
- ESCAPE_VALUE("&int;", "\xe2\x88\xab"),
- ESCAPE_VALUE("&ne;", "\xe2\x89\xa0"),
- ESCAPE_VALUE("&equiv;", "\xe2\x89\xa1"),
- ESCAPE_VALUE("&oplus;", "\xe2\x8a\x95"),
- ESCAPE_VALUE("&perp;", "\xe2\x8a\xa5"),
-};
+static Escape_Value **
+escape_sorted_common_key_copy()
+{
+ int i;
+ int len;
+ const Escape_Value *source;
+ int (*compare_fun)(const void*,const void*);
-/**
- * @internal
- * @var escape_values_v_common_sorted[]
- * same as escape_values_v_sorted with small subset of common escapes
- */
-static const Escape_Value escape_values_v_common_sorted[] = {
- ESCAPE_VALUE("&quot;", "\x22"),
- ESCAPE_VALUE("&amp;", "\x26"),
- ESCAPE_VALUE("&apos;", "\x27"),
- ESCAPE_VALUE("&lt;", "\x3c"),
- ESCAPE_VALUE("&gt;", "\x3e"),
-};
+ len = sizeof(html_common_escapes) / sizeof(Escape_Value);
+ source = html_common_escapes;
+
+ compare_fun = _escape_key_sort;
+
+ Escape_Value **ret_list = malloc(len * sizeof(Escape_Value *));
+ for (i = 0 ; i < len ; i++)
+ {
+ ret_list[i] = (Escape_Value *)(&source[i]);
+ }
+
+ qsort(&ret_list[0], len, sizeof(Escape_Value *), compare_fun);
+ return ret_list;
+}
+
+static Escape_Value **
+escape_sorted_common_value_copy()
+{
+ int i;
+ int len;
+ const Escape_Value *source;
+ int (*compare_fun)(const void*,const void*);
+
+ len = sizeof(html_common_escapes) / sizeof(Escape_Value);
+ source = html_common_escapes;
+
+ compare_fun = _escape_value_sort;
+
+ Escape_Value **ret_list = malloc(len * sizeof(Escape_Value *));
+ for (i = 0 ; i < len ; i++)
+ {
+ ret_list[i] = (Escape_Value *)(&source[i]);
+ }
+
+ qsort(&ret_list[0], len, sizeof(Escape_Value *), compare_fun);
+ return ret_list;
+}
+
+static Escape_Value **
+escape_sorted_rest_key_copy()
+{
+ int i;
+ int len;
+ const Escape_Value *source;
+ int (*compare_fun)(const void*,const void*);
+
+ len = sizeof(html_escapes) / sizeof(Escape_Value);
+ source = html_escapes;
+
+ compare_fun = _escape_key_sort;
+
+ Escape_Value **ret_list = malloc(len * sizeof(Escape_Value *));
+ for (i = 0 ; i < len ; i++)
+ {
+ ret_list[i] = (Escape_Value *)(&source[i]);
+ }
+
+ qsort(&ret_list[0], len, sizeof(Escape_Value *), compare_fun);
+ return ret_list;
+}
+
+static Escape_Value **
+escape_sorted_rest_value_copy()
+{
+ int i;
+ int len;
+ const Escape_Value *source;
+ int (*compare_fun)(const void*,const void*);
+ len = sizeof(html_escapes) / sizeof(Escape_Value);
+ source = html_escapes;
+
+ compare_fun = _escape_value_sort;
+
+ Escape_Value **ret_list = malloc(len * sizeof(Escape_Value *));
+ for (i = 0 ; i < len ; i++)
+ {
+ ret_list[i] = (Escape_Value *)(&source[i]);
+ }
+
+ qsort(&ret_list[0], len, sizeof(Escape_Value *), compare_fun);
+ return ret_list;
+}
+static Escape_Value **
+get_html_escape_array_common_key_sorted(size_t *p_len)
+{
+ static Escape_Value **escape_values_common_k_sorted = NULL;
+
+ static size_t common_len = sizeof(html_common_escapes) / sizeof(Escape_Value);
+
+ Escape_Value **ret_list = NULL;
+
+ if (!escape_values_common_k_sorted)
+ escape_values_common_k_sorted = escape_sorted_common_key_copy();
+ ret_list = escape_values_common_k_sorted;
+ if(p_len) *p_len = common_len;
+
+
+ return ret_list;
+}
+
+static Escape_Value **
+get_html_escape_array_common_value_sorted(size_t *p_len)
+{
+ static Escape_Value **escape_values_common_v_sorted = NULL;
+
+ static size_t common_len = sizeof(html_common_escapes) / sizeof(Escape_Value);
+
+ Escape_Value **ret_list = NULL;
+
+ if (!escape_values_common_v_sorted)
+ escape_values_common_v_sorted = escape_sorted_common_value_copy();
+ ret_list = escape_values_common_v_sorted;
+ if(p_len) *p_len = common_len;
+
+
+ return ret_list;
+}
+
+static Escape_Value **
+get_html_escape_array_rest_key_sorted(size_t *p_len)
+{
+ static Escape_Value **escape_values_k_sorted = NULL;
+
+ static size_t rest_len = sizeof(html_escapes) / sizeof(Escape_Value);
+
+ Escape_Value **ret_list = NULL;
+
+ if (!escape_values_k_sorted)
+ escape_values_k_sorted = escape_sorted_rest_key_copy();
+ ret_list = escape_values_k_sorted;
+ if(p_len) *p_len = rest_len;
+
+ return ret_list;
+}
+
+static Escape_Value **
+get_html_escape_array_rest_value_sorted(size_t *p_len)
+{
+ static Escape_Value **escape_values_v_sorted = NULL;
+ static size_t rest_len = sizeof(html_escapes) / sizeof(Escape_Value);
+
+ Escape_Value **ret_list = NULL;
+
+ if (!escape_values_v_sorted)
+ escape_values_v_sorted = escape_sorted_rest_value_copy();
+ ret_list = escape_values_v_sorted;
+ if(p_len) *p_len = rest_len;
+
+ return ret_list;
+}
/**
* @internal
@@ -1398,12 +1404,16 @@ static const char *langstr = NULL;
static const char *colorstr = NULL;
static const char *underline_colorstr = NULL;
static const char *underline2_colorstr = NULL;
+static const char *secondary_underline_colorstr = NULL;
static const char *underline_dash_colorstr = NULL;
+static const char *underline_dashed_colorstr = NULL;
static const char *outline_colorstr = NULL;
static const char *shadow_colorstr = NULL;
static const char *glow_colorstr = NULL;
static const char *glow2_colorstr = NULL;
+static const char *secondary_glow_colorstr = NULL;
static const char *backing_colorstr = NULL;
+static const char *background_colorstr = NULL;
static const char *strikethrough_colorstr = NULL;
static const char *alignstr = NULL;
static const char *valignstr = NULL;
@@ -1412,21 +1422,34 @@ static const char *wrapstr = NULL;
static const char *left_marginstr = NULL;
static const char *right_marginstr = NULL;
static const char *underlinestr = NULL;
+static const char *underline_typestr = NULL;
static const char *strikethroughstr = NULL;
+static const char *strikethrough_typestr = NULL;
static const char *backingstr = NULL;
+static const char *background_typestr = NULL;
static const char *stylestr = NULL;
+static const char *effect_typestr = NULL;
+static const char *shadow_directionstr = NULL;
static const char *tabstopsstr = NULL;
+static const char *tab_stopsstr = NULL;
static const char *linesizestr = NULL;
+static const char *line_sizestr = NULL;
static const char *linerelsizestr = NULL;
+static const char *line_rel_sizestr = NULL;
static const char *linegapstr = NULL;
+static const char *line_gapstr = NULL;
static const char *linerelgapstr = NULL;
+static const char *line_rel_gapstr = NULL;
static const char *itemstr = NULL;
static const char *linefillstr = NULL;
+static const char *line_fillstr = NULL;
static const char *ellipsisstr = NULL;
static const char *passwordstr = NULL;
static const char *replacement_charstr = NULL;
static const char *underline_dash_widthstr = NULL;
+static const char *underline_dashed_widthstr = NULL;
static const char *underline_dash_gapstr = NULL;
+static const char *underline_dashed_gapstr = NULL;
static const char *underline_heightstr = NULL;
static const char *gfx_filterstr = NULL;
@@ -1465,11 +1488,15 @@ _style_string_split(const char *str, char* part1, char* part2)
*temp = 0;
}
-#define FORMAT_SHADOW_SET(evas, efl) {fmt->style = evas; if (set_default) _FMT_INFO(effect) = efl;}
+#define FORMAT_SHADOW_SET(evas, efl) { \
+ if (fmt->style != evas) { fmt->style = evas; changed = EINA_TRUE; } \
+ if (set_default && (_FMT_INFO(effect) != efl)) {_FMT_INFO(effect) = efl; changed = EINA_TRUE;}}
-void
+Eina_Bool
_format_shadow_set(Evas_Object_Textblock_Format *fmt, char *str, Eina_Bool set_default, Efl_Canvas_Textblock_Data *o)
{
+ Eina_Bool changed = EINA_FALSE;
+
if (!strcmp(str, "shadow"))
FORMAT_SHADOW_SET(EVAS_TEXT_STYLE_SHADOW, EFL_TEXT_STYLE_EFFECT_TYPE_SHADOW)
else if (!strcmp(str, "outline"))
@@ -1490,13 +1517,22 @@ _format_shadow_set(Evas_Object_Textblock_Format *fmt, char *str, Eina_Bool set_d
FORMAT_SHADOW_SET(EVAS_TEXT_STYLE_FAR_SOFT_SHADOW, EFL_TEXT_STYLE_EFFECT_TYPE_FAR_SOFT_SHADOW)
else /*off none plain */
FORMAT_SHADOW_SET(EVAS_TEXT_STYLE_PLAIN, EFL_TEXT_STYLE_EFFECT_TYPE_NONE)
+
+ return changed;
}
-#define FORMAT_SHADOW_DIRECTION_SET(direction) {EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_##direction); if (set_default) _FMT_INFO(shadow_direction) = EFL_TEXT_STYLE_SHADOW_DIRECTION_##direction;}
+#define FORMAT_SHADOW_DIRECTION_SET(direction) { \
+ unsigned char temp = fmt->style; \
+ EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_##direction); \
+ changed = (fmt->style != temp); \
+ if (set_default && (_FMT_INFO(shadow_direction) != EFL_TEXT_STYLE_SHADOW_DIRECTION_##direction)) \
+ {_FMT_INFO(shadow_direction) = EFL_TEXT_STYLE_SHADOW_DIRECTION_##direction; changed = EINA_TRUE;}}
-void
+Eina_Bool
_format_shadow_direction_set(Evas_Object_Textblock_Format *fmt, char *str, Eina_Bool set_default, Efl_Canvas_Textblock_Data *o)
{
+ Eina_Bool changed = EINA_FALSE;
+
if (!strcmp(str, "bottom_right"))
FORMAT_SHADOW_DIRECTION_SET(BOTTOM_RIGHT)
else if (!strcmp(str, "bottom"))
@@ -1515,6 +1551,8 @@ _format_shadow_direction_set(Evas_Object_Textblock_Format *fmt, char *str, Eina_
FORMAT_SHADOW_DIRECTION_SET(RIGHT)
else
FORMAT_SHADOW_DIRECTION_SET(BOTTOM_RIGHT)
+
+ return changed;
}
/**
@@ -1585,12 +1623,16 @@ _format_command_init(void)
colorstr = eina_stringshare_add("color");
underline_colorstr = eina_stringshare_add("underline_color");
underline2_colorstr = eina_stringshare_add("underline2_color");
+ secondary_underline_colorstr = eina_stringshare_add("secondary_underline_color");
underline_dash_colorstr = eina_stringshare_add("underline_dash_color");
+ underline_dashed_colorstr = eina_stringshare_add("underline_dashed_color");
outline_colorstr = eina_stringshare_add("outline_color");
shadow_colorstr = eina_stringshare_add("shadow_color");
glow_colorstr = eina_stringshare_add("glow_color");
glow2_colorstr = eina_stringshare_add("glow2_color");
+ secondary_glow_colorstr = eina_stringshare_add("secondary_glow_color");
backing_colorstr = eina_stringshare_add("backing_color");
+ background_colorstr = eina_stringshare_add("background_color");
strikethrough_colorstr = eina_stringshare_add("strikethrough_color");
alignstr = eina_stringshare_add("align");
valignstr = eina_stringshare_add("valign");
@@ -1599,21 +1641,34 @@ _format_command_init(void)
left_marginstr = eina_stringshare_add("left_margin");
right_marginstr = eina_stringshare_add("right_margin");
underlinestr = eina_stringshare_add("underline");
+ underline_typestr = eina_stringshare_add("underline_type");
strikethroughstr = eina_stringshare_add("strikethrough");
+ strikethrough_typestr = eina_stringshare_add("strikethrough_type");
backingstr = eina_stringshare_add("backing");
+ background_typestr = eina_stringshare_add("background_type");
stylestr = eina_stringshare_add("style");
+ effect_typestr = eina_stringshare_add("effect_type");
+ shadow_directionstr = eina_stringshare_add("shadow_direction");
tabstopsstr = eina_stringshare_add("tabstops");
+ tab_stopsstr = eina_stringshare_add("tab_stops");
linesizestr = eina_stringshare_add("linesize");
+ line_sizestr = eina_stringshare_add("line_size");
linerelsizestr = eina_stringshare_add("linerelsize");
+ line_rel_sizestr = eina_stringshare_add("line_rel_size");
linegapstr = eina_stringshare_add("linegap");
+ line_gapstr = eina_stringshare_add("line_gap");
linerelgapstr = eina_stringshare_add("linerelgap");
+ line_rel_gapstr = eina_stringshare_add("line_rel_gap");
itemstr = eina_stringshare_add("item");
linefillstr = eina_stringshare_add("linefill");
+ line_fillstr = eina_stringshare_add("line_fill");
ellipsisstr = eina_stringshare_add("ellipsis");
passwordstr = eina_stringshare_add("password");
replacement_charstr = eina_stringshare_add("replacement_char");
underline_dash_widthstr = eina_stringshare_add("underline_dash_width");
+ underline_dashed_widthstr = eina_stringshare_add("underline_dashed_width");
underline_dash_gapstr = eina_stringshare_add("underline_dash_gap");
+ underline_dashed_gapstr = eina_stringshare_add("underline_dashed_gap");
underline_heightstr = eina_stringshare_add("underline_height");
gfx_filterstr = eina_stringshare_add("gfx_filter"); // FIXME: bg, fg filters
}
@@ -1640,12 +1695,16 @@ _format_command_shutdown(void)
eina_stringshare_del(colorstr);
eina_stringshare_del(underline_colorstr);
eina_stringshare_del(underline2_colorstr);
+ eina_stringshare_del(secondary_underline_colorstr);
eina_stringshare_del(underline_dash_colorstr);
+ eina_stringshare_del(underline_dashed_colorstr);
eina_stringshare_del(outline_colorstr);
eina_stringshare_del(shadow_colorstr);
eina_stringshare_del(glow_colorstr);
eina_stringshare_del(glow2_colorstr);
+ eina_stringshare_del(secondary_glow_colorstr);
eina_stringshare_del(backing_colorstr);
+ eina_stringshare_del(background_colorstr);
eina_stringshare_del(strikethrough_colorstr);
eina_stringshare_del(alignstr);
eina_stringshare_del(valignstr);
@@ -1654,21 +1713,34 @@ _format_command_shutdown(void)
eina_stringshare_del(left_marginstr);
eina_stringshare_del(right_marginstr);
eina_stringshare_del(underlinestr);
+ eina_stringshare_del(underline_typestr);
eina_stringshare_del(strikethroughstr);
+ eina_stringshare_del(strikethrough_typestr);
eina_stringshare_del(backingstr);
+ eina_stringshare_del(background_typestr);
eina_stringshare_del(stylestr);
+ eina_stringshare_del(effect_typestr);
+ eina_stringshare_del(shadow_directionstr);
eina_stringshare_del(tabstopsstr);
+ eina_stringshare_del(tab_stopsstr);
eina_stringshare_del(linesizestr);
+ eina_stringshare_del(line_sizestr);
eina_stringshare_del(linerelsizestr);
+ eina_stringshare_del(line_rel_sizestr);
eina_stringshare_del(linegapstr);
+ eina_stringshare_del(line_gapstr);
eina_stringshare_del(linerelgapstr);
+ eina_stringshare_del(line_rel_gapstr);
eina_stringshare_del(itemstr);
eina_stringshare_del(linefillstr);
+ eina_stringshare_del(line_fillstr);
eina_stringshare_del(ellipsisstr);
eina_stringshare_del(passwordstr);
eina_stringshare_del(replacement_charstr);
eina_stringshare_del(underline_dash_widthstr);
+ eina_stringshare_del(underline_dashed_widthstr);
eina_stringshare_del(underline_dash_gapstr);
+ eina_stringshare_del(underline_dashed_gapstr);
eina_stringshare_del(underline_heightstr);
eina_stringshare_del(gfx_filterstr);
}
@@ -1698,6 +1770,543 @@ _format_clean_param(char *s)
return len;
}
+static void
+_format_command_legacy_only(Evas_Object_Textblock_Format *fmt, const char *cmd, char *param, int len)
+{
+ if (cmd == backing_colorstr)
+ /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @subsection evas_textblock_style_backing_color Backing Color
+ *
+ * Sets a background color for text. The following formats are
+ * accepted:
+ * @li "#RRGGBB"
+ * @li "#RRGGBBAA"
+ * @li "#RGB"
+ * @li "#RGBA"
+ * @li "rgb(r,g,b)"
+ * @li "rgba(r,g,b,a)"
+ * @li "color_name" like "red"
+ * @code
+ * backing_color=<color>
+ * @endcode
+ */
+ evas_common_format_color_parse(param, len,
+ &(fmt->color.backing.r), &(fmt->color.backing.g),
+ &(fmt->color.backing.b), &(fmt->color.backing.a));
+ else if (cmd == backingstr)
+ {
+ /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @subsection evas_textblock_style_backing Backing
+ *
+ * Sets if the text will have backing. The value must be one of
+ * the following:
+ * @li "off" - No backing
+ * @li "on" - Backing
+ * @code
+ * backing=on/off
+ * @endcode
+ */
+ if (len == 3 && !strcmp(param, "off"))
+ fmt->backing = 0;
+ else if (len == 2 && !strcmp(param, "on"))
+ fmt->backing = 1;
+ }
+ else if (cmd == underline2_colorstr)
+ /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @subsection evas_textblock_style_underline2_color Second Underline Color
+ *
+ * Sets the color of the second line of underline(when using underline
+ * mode "double"). The following formats are accepted:
+ * @li "#RRGGBB"
+ * @li "#RRGGBBAA"
+ * @li "#RGB"
+ * @li "#RGBA"
+ * @li "rgb(r,g,b)"
+ * @li "rgba(r,g,b,a)"
+ * @li "color_name" like "red"
+ * @code
+ * underline2_color=<color>
+ * @endcode
+ */
+ evas_common_format_color_parse(param, len,
+ &(fmt->color.underline2.r), &(fmt->color.underline2.g),
+ &(fmt->color.underline2.b), &(fmt->color.underline2.a));
+ else if (cmd == glow2_colorstr)
+ /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @subsection evas_textblock_style_glow2_color Second Glow Color
+ *
+ * Sets the second color of the glow of text. The following formats are
+ * accepted:
+ * @li "#RRGGBB"
+ * @li "#RRGGBBAA"
+ * @li "#RGB"
+ * @li "#RGBA"
+ * @li "rgb(r,g,b)"
+ * @li "rgba(r,g,b,a)"
+ * @li "color_name" like "red"
+ * @code
+ * glow2_color=<color>
+ * @endcode
+ */
+ evas_common_format_color_parse(param, len,
+ &(fmt->color.glow2.r), &(fmt->color.glow2.g),
+ &(fmt->color.glow2.b), &(fmt->color.glow2.a));
+ else if (cmd == tabstopsstr)
+ {
+ /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @subsection evas_textblock_style_tabstops Tabstops
+ *
+ * Sets the size of the tab character. The value must be a number
+ * greater than one.
+ * @code
+ * tabstops=<number>
+ * @endcode
+ */
+ fmt->tabstops = atoi(param);
+ if (fmt->tabstops < 1) fmt->tabstops = 1;
+ }
+ else if (cmd == linesizestr)
+ {
+ /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @subsection evas_textblock_style_linesize Line size
+ *
+ * Sets the size of line of text. The value should be a number.
+ * @warning Setting this value sets linerelsize to 0%!
+ * @code
+ * linesize=<number>
+ * @endcode
+ */
+ fmt->linesize = atoi(param);
+ fmt->linerelsize = 0.0;
+ }
+ else if (cmd == linerelsizestr)
+ {
+ /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @subsection evas_textblock_style_linerelsize Relative line size
+ *
+ * Sets the relative size of line of text. The value must be a
+ * percentage.
+ * @warning Setting this value sets linesize to 0!
+ * @code
+ * linerelsize=<number>%
+ * @endcode
+ */
+ char *endptr = NULL;
+ double val = strtod(param, &endptr);
+ if (endptr)
+ {
+ while (*endptr && _is_white(*endptr))
+ endptr++;
+ if (*endptr == '%')
+ {
+ fmt->linerelsize = val / 100.0;
+ fmt->linesize = 0;
+ if (fmt->linerelsize < 0.0) fmt->linerelsize = 0.0;
+ }
+ }
+ }
+ else if (cmd == linegapstr)
+ {
+ /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @subsection evas_textblock_style_linegap Line gap
+ *
+ * Sets the size of the line gap in text. The value should be a
+ * number.
+ * @warning Setting this value sets linerelgap to 0%!
+ * @code
+ * linegap=<number>
+ * @endcode
+ */
+ fmt->linegap = atoi(param);
+ fmt->linerelgap = 0.0;
+ }
+ else if (cmd == linerelgapstr)
+ {
+ /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @subsection evas_textblock_style_linerelgap Relative line gap
+ *
+ * Sets the relative size of the line gap in text. The value must be
+ * a percentage.
+ * @warning Setting this value sets linegap to 0!
+ * @code
+ * linerelgap=<number>%
+ * @endcode
+ */
+ char *endptr = NULL;
+ double val = strtod(param, &endptr);
+ if (endptr)
+ {
+ while (*endptr && _is_white(*endptr))
+ endptr++;
+ if (*endptr == '%')
+ {
+ fmt->linerelgap = val / 100.0;
+ fmt->linegap = 0;
+ if (fmt->linerelgap < 0.0) fmt->linerelgap = 0.0;
+ }
+ }
+ }
+ else if (cmd == linefillstr)
+ {
+ /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @subsection evas_textblock_style_linefill Line fill
+ *
+ * Sets the size of the line fill in text. The value must be a
+ * percentage.
+ * @code
+ * linefill=<number>%
+ * @endcode
+ */
+ char *endptr = NULL;
+ double val = strtod(param, &endptr);
+ if (endptr)
+ {
+ while (*endptr && _is_white(*endptr))
+ endptr++;
+ if (*endptr == '%')
+ {
+ fmt->linefill = val / 100.0;
+ if (fmt->linefill < 0.0) fmt->linefill = 0.0;
+ }
+ }
+ }
+ else if (cmd == underline_dash_colorstr)
+ /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @subsection evas_textblock_style_underline_dash_color Underline Dash Color
+ *
+ * Sets the color of dashed underline. The following formats are accepted:
+ * @li "#RRGGBB"
+ * @li "#RRGGBBAA"
+ * @li "#RGB"
+ * @li "#RGBA"
+ * @li "rgb(r,g,b)"
+ * @li "rgba(r,g,b,a)"
+ * @li "color_name" like "red"
+ * @code
+ * underline_dash_color=<color>
+ * @endcode
+ */
+ evas_common_format_color_parse(param, len,
+ &(fmt->color.underline_dash.r), &(fmt->color.underline_dash.g),
+ &(fmt->color.underline_dash.b), &(fmt->color.underline_dash.a));
+ else if (cmd == underlinestr)
+ {
+ /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @subsection evas_textblock_style_underline Underline
+ *
+ * Sets if and how a text will be underlined. The value must be one of
+ * the following:
+ * @li "off" - No underlining
+ * @li "single" - A single line under the text
+ * @li "on" - Alias for "single"
+ * @li "double" - Two lines under the text
+ * @li "dashed" - A dashed line under the text
+ * @code
+ * underline=off/single/on/double/dashed
+ * @endcode
+ */
+ static const struct {
+ const char *param;
+ int len;
+ Eina_Bool underline;
+ Eina_Bool underline2;
+ Eina_Bool underline_dash;
+ } underlines_named[] = {
+ { "off", 3, 0, 0, 0 },
+ { "on", 2, 1, 0, 0 },
+ { "single", 6, 1, 0, 0 },
+ { "double", 6, 1, 1, 0 },
+ { "dashed", 6, 0, 0, 1 },
+ { NULL, 0, 0, 0, 0 }
+ };
+ unsigned int i;
+
+ fmt->underline = fmt->underline2 = fmt->underline_dash = 0;
+ for (i = 0; underlines_named[i].param; ++i)
+ if (underlines_named[i].len == len &&
+ !strcmp(underlines_named[i].param, param))
+ {
+ fmt->underline = underlines_named[i].underline;
+ fmt->underline2 = underlines_named[i].underline2;
+ fmt->underline_dash = underlines_named[i].underline_dash;
+ break;
+ }
+ }
+ else if (cmd == strikethroughstr)
+ {
+ /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @subsection evas_textblock_style_strikethrough Strikethrough
+ *
+ * Sets if the text will be striked through. The value must be one of
+ * the following:
+ * @li "off" - No strikethrough
+ * @li "on" - Strikethrough
+ * @code
+ * strikethrough=on/off
+ * @endcode
+ */
+ if (len == 3 && !strcmp(param, "off"))
+ fmt->strikethrough = 0;
+ else if (len == 2 && !strcmp(param, "on"))
+ fmt->strikethrough = 1;
+ }
+ else if (cmd == stylestr)
+ {
+ /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @subsection evas_textblock_style_style Style
+ *
+ * Sets the style of the text. The value must be a string composed of
+ * two comma separated parts. The first part of the value sets the
+ * appearance of the text, the second the position.
+ *
+ * The first part may be any of the following values:
+ * @li "plain"
+ * @li "off" - Alias for "plain"
+ * @li "none" - Alias for "plain"
+ * @li "shadow"
+ * @li "outline"
+ * @li "soft_outline"
+ * @li "outline_shadow"
+ * @li "outline_soft_shadow"
+ * @li "glow"
+ * @li "far_shadow"
+ * @li "soft_shadow"
+ * @li "far_soft_shadow"
+ * The second part may be any of the following values:
+ * @li "bottom_right"
+ * @li "bottom"
+ * @li "bottom_left"
+ * @li "left"
+ * @li "top_left"
+ * @li "top"
+ * @li "top_right"
+ * @li "right"
+ * @code
+ * style=<appearance>,<position>
+ * @endcode
+ */
+ char *part1, *part2;
+
+ part1 = alloca(len + 1);
+ *part1 = 0;
+
+ part2 = alloca(len + 1);
+ *part2 = 0;
+
+ _style_string_split(param, part1, part2);
+
+ _format_shadow_set(fmt, part1, EINA_FALSE, NULL);
+
+ if (*part2)
+ _format_shadow_direction_set(fmt, part2, EINA_FALSE, NULL);
+ }
+ else if (cmd == underline_dash_widthstr)
+ {
+ /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @subsection evas_textblock_style_underline_dash_width Underline dash width
+ *
+ * Sets the width of the underline dash. The value should be a number.
+ * @code
+ * underline_dash_width=<number>
+ * @endcode
+ */
+ fmt->underline_dash_width = atoi(param);
+ if (fmt->underline_dash_width <= 0) fmt->underline_dash_width = 1;
+ }
+ else if (cmd == underline_dash_gapstr)
+ {
+ /**
+ * @page evas_textblock_style_page Evas Textblock Style Options
+ *
+ * @subsection evas_textblock_style_underline_dash_gap Underline dash gap
+ *
+ * Sets the gap of the underline dash. The value should be a number.
+ * @code
+ * underline_dash_gap=<number>
+ * @endcode
+ */
+ fmt->underline_dash_gap = atoi(param);
+ if (fmt->underline_dash_gap <= 0) fmt->underline_dash_gap = 1;
+ }
+}
+
+static void
+_format_command_unified_only( Efl_Canvas_Textblock_Data *o, Evas_Object_Textblock_Format *fmt, const char *cmd, char *param, int len)
+{
+ if (cmd == background_colorstr)
+ evas_common_format_color_parse(param, len,
+ &(fmt->color.backing.r), &(fmt->color.backing.g),
+ &(fmt->color.backing.b), &(fmt->color.backing.a));
+ else if (cmd == background_typestr)
+ {
+ if (len == 4 && !strcmp(param, "none"))
+ fmt->backing = 0;
+ else if (len == 5 && !strcmp(param, "solid"))
+ fmt->backing = 1;
+ }
+ else if (cmd == secondary_underline_colorstr)
+ evas_common_format_color_parse(param, len,
+ &(fmt->color.underline2.r), &(fmt->color.underline2.g),
+ &(fmt->color.underline2.b), &(fmt->color.underline2.a));
+ else if (cmd == secondary_glow_colorstr)
+ evas_common_format_color_parse(param, len,
+ &(fmt->color.glow2.r), &(fmt->color.glow2.g),
+ &(fmt->color.glow2.b), &(fmt->color.glow2.a));
+ else if (cmd == tab_stopsstr)
+ {
+ fmt->tabstops = atoi(param);
+ if (fmt->tabstops < 1) fmt->tabstops = 1;
+ }
+ else if (cmd == line_sizestr)
+ {
+ fmt->linesize = atoi(param);
+ fmt->linerelsize = 0.0;
+ }
+ else if (cmd == line_rel_sizestr)
+ {
+ char *endptr = NULL;
+ double val = strtod(param, &endptr);
+ if (endptr)
+ {
+ while (*endptr && _is_white(*endptr))
+ endptr++;
+ if (*endptr == '%')
+ {
+ fmt->linerelsize = val / 100.0;
+ fmt->linesize = 0;
+ if (fmt->linerelsize < 0.0) fmt->linerelsize = 0.0;
+ }
+ }
+ }
+ else if (cmd == line_gapstr)
+ {
+ fmt->linegap = atoi(param);
+ fmt->linerelgap = 0.0;
+ }
+ else if (cmd == line_rel_gapstr)
+ {
+ char *endptr = NULL;
+ double val = strtod(param, &endptr);
+ if (endptr)
+ {
+ while (*endptr && _is_white(*endptr))
+ endptr++;
+ if (*endptr == '%')
+ {
+ fmt->linerelgap = val / 100.0;
+ fmt->linegap = 0;
+ if (fmt->linerelgap < 0.0) fmt->linerelgap = 0.0;
+ }
+ }
+ }
+ else if (cmd == line_fillstr)
+ {
+ char *endptr = NULL;
+ double val = strtod(param, &endptr);
+ if (endptr)
+ {
+ while (*endptr && _is_white(*endptr))
+ endptr++;
+ if (*endptr == '%')
+ {
+ fmt->linefill = val / 100.0;
+ if (fmt->linefill < 0.0) fmt->linefill = 0.0;
+ }
+ }
+ }
+ else if (cmd == underline_dashed_colorstr)
+ evas_common_format_color_parse(param, len,
+ &(fmt->color.underline_dash.r), &(fmt->color.underline_dash.g),
+ &(fmt->color.underline_dash.b), &(fmt->color.underline_dash.a));
+ else if (cmd == underline_typestr)
+ {
+ typedef struct {
+ const char *param;
+ int len;
+ Eina_Bool underline;
+ Eina_Bool underline2;
+ Eina_Bool underline_dash;
+ } Underline_Info;
+
+ fmt->underline = fmt->underline2 = fmt->underline_dash = 0;
+ unsigned int i;
+ #define SET_UNDERLINE_VALUES() \
+ for (i = 0; underlines_named[i].param; ++i) { \
+ if (underlines_named[i].len == len && \
+ !strcmp(underlines_named[i].param, param)) \
+ { \
+ fmt->underline = underlines_named[i].underline; \
+ fmt->underline2 = underlines_named[i].underline2; \
+ fmt->underline_dash = underlines_named[i].underline_dash; \
+ break;\
+ } \
+ }
+ static Underline_Info underlines_named[] = {
+ { "none", 4, 0, 0, 0 },
+ { "single", 6, 1, 0, 0 },
+ { "double", 6, 1, 1, 0 },
+ { "dashed", 6, 0, 0, 1 },
+ { NULL, 0, 0, 0, 0 }
+ };
+ SET_UNDERLINE_VALUES();
+ }
+ else if (cmd == strikethrough_typestr)
+ {
+ if (len == 4 && !strcmp(param, "none"))
+ fmt->strikethrough = 0;
+ else if (len == 6 && !strcmp(param, "single"))
+ fmt->strikethrough = 1;
+ }
+ else if (cmd == effect_typestr)
+ {
+ _format_shadow_set(fmt, param, EINA_TRUE, o);
+ }
+ else if (cmd == shadow_directionstr)
+ {
+ _format_shadow_direction_set(fmt, param, EINA_TRUE, o);
+ }
+ else if (cmd == underline_dashed_widthstr)
+ {
+ fmt->underline_dash_width = atoi(param);
+ if (fmt->underline_dash_width <= 0) fmt->underline_dash_width = 1;
+ }
+ else if (cmd == underline_dashed_gapstr)
+ {
+ fmt->underline_dash_gap = atoi(param);
+ if (fmt->underline_dash_gap <= 0) fmt->underline_dash_gap = 1;
+ }
+}
+
/**
* @internal
* Parses the cmd and parameter and adds the parsed format to fmt.
@@ -1711,6 +2320,8 @@ static void
_format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const char *cmd, char *param)
{
int len;
+ Efl_Canvas_Textblock_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
+ Eina_Bool is_legacy = o->is_legacy;
len = _format_clean_param(param);
@@ -1936,49 +2547,6 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
evas_common_format_color_parse(param, len,
&(fmt->color.underline.r), &(fmt->color.underline.g),
&(fmt->color.underline.b), &(fmt->color.underline.a));
- else if (cmd == underline2_colorstr)
- /**
- * @page evas_textblock_style_page Evas Textblock Style Options
- *
- * @subsection evas_textblock_style_underline2_color Second Underline Color
- *
- * Sets the color of the second line of underline(when using underline
- * mode "double"). The following formats are accepted:
- * @li "#RRGGBB"
- * @li "#RRGGBBAA"
- * @li "#RGB"
- * @li "#RGBA"
- * @li "rgb(r,g,b)"
- * @li "rgba(r,g,b,a)"
- * @li "color_name" like "red"
- * @code
- * underline2_color=<color>
- * @endcode
- */
- evas_common_format_color_parse(param, len,
- &(fmt->color.underline2.r), &(fmt->color.underline2.g),
- &(fmt->color.underline2.b), &(fmt->color.underline2.a));
- else if (cmd == underline_dash_colorstr)
- /**
- * @page evas_textblock_style_page Evas Textblock Style Options
- *
- * @subsection evas_textblock_style_underline_dash_color Underline Dash Color
- *
- * Sets the color of dashed underline. The following formats are accepted:
- * @li "#RRGGBB"
- * @li "#RRGGBBAA"
- * @li "#RGB"
- * @li "#RGBA"
- * @li "rgb(r,g,b)"
- * @li "rgba(r,g,b,a)"
- * @li "color_name" like "red"
- * @code
- * underline_dash_color=<color>
- * @endcode
- */
- evas_common_format_color_parse(param, len,
- &(fmt->color.underline_dash.r), &(fmt->color.underline_dash.g),
- &(fmt->color.underline_dash.b), &(fmt->color.underline_dash.a));
else if (cmd == outline_colorstr)
/**
* @page evas_textblock_style_page Evas Textblock Style Options
@@ -2045,50 +2613,6 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
evas_common_format_color_parse(param, len,
&(fmt->color.glow.r), &(fmt->color.glow.g),
&(fmt->color.glow.b), &(fmt->color.glow.a));
- else if (cmd == glow2_colorstr)
- /**
- * @page evas_textblock_style_page Evas Textblock Style Options
- *
- * @subsection evas_textblock_style_glow2_color Second Glow Color
- *
- * Sets the second color of the glow of text. The following formats are
- * accepted:
- * @li "#RRGGBB"
- * @li "#RRGGBBAA"
- * @li "#RGB"
- * @li "#RGBA"
- * @li "rgb(r,g,b)"
- * @li "rgba(r,g,b,a)"
- * @li "color_name" like "red"
- * @code
- * glow2_color=<color>
- * @endcode
- */
- evas_common_format_color_parse(param, len,
- &(fmt->color.glow2.r), &(fmt->color.glow2.g),
- &(fmt->color.glow2.b), &(fmt->color.glow2.a));
- else if (cmd == backing_colorstr)
- /**
- * @page evas_textblock_style_page Evas Textblock Style Options
- *
- * @subsection evas_textblock_style_backing_color Backing Color
- *
- * Sets a background color for text. The following formats are
- * accepted:
- * @li "#RRGGBB"
- * @li "#RRGGBBAA"
- * @li "#RGB"
- * @li "#RGBA"
- * @li "rgb(r,g,b)"
- * @li "rgba(r,g,b,a)"
- * @li "color_name" like "red"
- * @code
- * backing_color=<color>
- * @endcode
- */
- evas_common_format_color_parse(param, len,
- &(fmt->color.backing.r), &(fmt->color.backing.g),
- &(fmt->color.backing.b), &(fmt->color.backing.a));
else if (cmd == strikethrough_colorstr)
/**
* @page evas_textblock_style_page Evas Textblock Style Options
@@ -2128,9 +2652,9 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
* @li "right" - Puts the text at the right of the line
* @li "start" - Respects LTR/RTL settings. It is same with "auto"
* @li "end" - Puts the text at the opposite side of LTR/RTL settings
- * @li <number> - A number between 0.0 and 1.0 where 0.0 represents
+ * @li \<number\> - A number between 0.0 and 1.0 where 0.0 represents
* "left" and 1.0 represents "right"
- * @li <number>% - A percentage between 0% and 100% where 0%
+ * @li \<number\>% - A percentage between 0% and 100% where 0%
* represents "left" and 100% represents "right"
* @code
* align=<value or preset>
@@ -2205,9 +2729,9 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
* @li "bottom" - Puts the text at the bottom of the line
* @li "baseline" - Baseline
* @li "base" - Alias for "baseline"
- * @li <number> - A number between 0.0 and 1.0 where 0.0 represents
+ * @li \<number\> - A number between 0.0 and 1.0 where 0.0 represents
* "top" and 1.0 represents "bottom"
- * @li <number>% - A percentage between 0% and 100% where 0%
+ * @li \<number\>% - A percentage between 0% and 100% where 0%
* represents "top" and 100% represents "bottom"
* @code
* valign=<value or preset>
@@ -2330,9 +2854,9 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
*
* Sets the left margin of the text. The value can be a number, an
* increment, decrement or "reset":
- * @li +<number> - Increments existing left margin by <number>
- * @li -<number> - Decrements existing left margin by <number>
- * @li <number> - Sets left margin to <number>
+ * @li +\<number\> - Increments existing left margin by \<number\>
+ * @li -\<number\> - Decrements existing left margin by \<number\>
+ * @li \<number\> - Sets left margin to \<number\>
* @li "reset" - Sets left margin to 0
* @code
* left_margin=<value or reset>
@@ -2360,9 +2884,9 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
*
* Sets the right margin of the text. The value can be a number, an
* increment, decrement or "reset":
- * @li +<number> - Increments existing right margin by <number>
- * @li -<number> - Decrements existing right margin by <number>
- * @li <number> - Sets left margin to <number>
+ * @li +\<number\> - Increments existing right margin by \<number\>
+ * @li -\<number\> - Decrements existing right margin by \<number\>
+ * @li \<number\> - Sets left margin to \<number\>
* @li "reset" - Sets left margin to 0
* @code
* right_margin=<value or reset>
@@ -2381,248 +2905,6 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
if (fmt->margin.r < 0) fmt->margin.r = 0;
}
}
- else if (cmd == underlinestr)
- {
- /**
- * @page evas_textblock_style_page Evas Textblock Style Options
- *
- * @subsection evas_textblock_style_underline Underline
- *
- * Sets if and how a text will be underlined. The value must be one of
- * the following:
- * @li "off" - No underlining
- * @li "single" - A single line under the text
- * @li "on" - Alias for "single"
- * @li "double" - Two lines under the text
- * @li "dashed" - A dashed line under the text
- * @code
- * underline=off/single/on/double/dashed
- * @endcode
- */
- static const struct {
- const char *param;
- int len;
- Eina_Bool underline;
- Eina_Bool underline2;
- Eina_Bool underline_dash;
- } underlines_named[] = {
- { "off", 3, 0, 0, 0 },
- { "on", 2, 1, 0, 0 },
- { "single", 6, 1, 0, 0 },
- { "double", 6, 1, 1, 0 },
- { "dashed", 6, 0, 0, 1 },
- { NULL, 0, 0, 0, 0 }
- };
- unsigned int i;
-
- fmt->underline = fmt->underline2 = fmt->underline_dash = 0;
- for (i = 0; underlines_named[i].param; ++i)
- if (underlines_named[i].len == len &&
- !strcmp(underlines_named[i].param, param))
- {
- fmt->underline = underlines_named[i].underline;
- fmt->underline2 = underlines_named[i].underline2;
- fmt->underline_dash = underlines_named[i].underline_dash;
- break;
- }
- }
- else if (cmd == strikethroughstr)
- {
- /**
- * @page evas_textblock_style_page Evas Textblock Style Options
- *
- * @subsection evas_textblock_style_strikethrough Strikethrough
- *
- * Sets if the text will be striked through. The value must be one of
- * the following:
- * @li "off" - No strikethrough
- * @li "on" - Strikethrough
- * @code
- * strikethrough=on/off
- * @endcode
- */
- if (len == 3 && !strcmp(param, "off"))
- fmt->strikethrough = 0;
- else if (len == 2 && !strcmp(param, "on"))
- fmt->strikethrough = 1;
- }
- else if (cmd == backingstr)
- {
- /**
- * @page evas_textblock_style_page Evas Textblock Style Options
- *
- * @subsection evas_textblock_style_backing Backing
- *
- * Sets if the text will have backing. The value must be one of
- * the following:
- * @li "off" - No backing
- * @li "on" - Backing
- * @code
- * backing=on/off
- * @endcode
- */
- if (len == 3 && !strcmp(param, "off"))
- fmt->backing = 0;
- else if (len == 2 && !strcmp(param, "on"))
- fmt->backing = 1;
- }
- else if (cmd == stylestr)
- {
- /**
- * @page evas_textblock_style_page Evas Textblock Style Options
- *
- * @subsection evas_textblock_style_style Style
- *
- * Sets the style of the text. The value must be a string composed of
- * two comma separated parts. The first part of the value sets the
- * appearance of the text, the second the position.
- *
- * The first part may be any of the following values:
- * @li "plain"
- * @li "off" - Alias for "plain"
- * @li "none" - Alias for "plain"
- * @li "shadow"
- * @li "outline"
- * @li "soft_outline"
- * @li "outline_shadow"
- * @li "outline_soft_shadow"
- * @li "glow"
- * @li "far_shadow"
- * @li "soft_shadow"
- * @li "far_soft_shadow"
- * The second part may be any of the following values:
- * @li "bottom_right"
- * @li "bottom"
- * @li "bottom_left"
- * @li "left"
- * @li "top_left"
- * @li "top"
- * @li "top_right"
- * @li "right"
- * @code
- * style=<appearance>,<position>
- * @endcode
- */
- char *part1, *part2;
-
- part1 = alloca(len + 1);
- *part1 = 0;
-
- part2 = alloca(len + 1);
- *part2 = 0;
-
- _style_string_split(param, part1, part2);
-
- _format_shadow_set(fmt, part1, EINA_FALSE, NULL);
-
- if (*part2)
- _format_shadow_direction_set(fmt, part2, EINA_FALSE, NULL);
- }
- else if (cmd == tabstopsstr)
- {
- /**
- * @page evas_textblock_style_page Evas Textblock Style Options
- *
- * @subsection evas_textblock_style_tabstops Tabstops
- *
- * Sets the size of the tab character. The value must be a number
- * greater than one.
- * @code
- * tabstops=<number>
- * @endcode
- */
- fmt->tabstops = atoi(param);
- if (fmt->tabstops < 1) fmt->tabstops = 1;
- }
- else if (cmd == linesizestr)
- {
- /**
- * @page evas_textblock_style_page Evas Textblock Style Options
- *
- * @subsection evas_textblock_style_linesize Line size
- *
- * Sets the size of line of text. The value should be a number.
- * @warning Setting this value sets linerelsize to 0%!
- * @code
- * linesize=<number>
- * @endcode
- */
- fmt->linesize = atoi(param);
- fmt->linerelsize = 0.0;
- }
- else if (cmd == linerelsizestr)
- {
- /**
- * @page evas_textblock_style_page Evas Textblock Style Options
- *
- * @subsection evas_textblock_style_linerelsize Relative line size
- *
- * Sets the relative size of line of text. The value must be a
- * percentage.
- * @warning Setting this value sets linesize to 0!
- * @code
- * linerelsize=<number>%
- * @endcode
- */
- char *endptr = NULL;
- double val = strtod(param, &endptr);
- if (endptr)
- {
- while (*endptr && _is_white(*endptr))
- endptr++;
- if (*endptr == '%')
- {
- fmt->linerelsize = val / 100.0;
- fmt->linesize = 0;
- if (fmt->linerelsize < 0.0) fmt->linerelsize = 0.0;
- }
- }
- }
- else if (cmd == linegapstr)
- {
- /**
- * @page evas_textblock_style_page Evas Textblock Style Options
- *
- * @subsection evas_textblock_style_linegap Line gap
- *
- * Sets the size of the line gap in text. The value should be a
- * number.
- * @warning Setting this value sets linerelgap to 0%!
- * @code
- * linegap=<number>
- * @endcode
- */
- fmt->linegap = atoi(param);
- fmt->linerelgap = 0.0;
- }
- else if (cmd == linerelgapstr)
- {
- /**
- * @page evas_textblock_style_page Evas Textblock Style Options
- *
- * @subsection evas_textblock_style_linerelgap Relative line gap
- *
- * Sets the relative size of the line gap in text. The value must be
- * a percentage.
- * @warning Setting this value sets linegap to 0!
- * @code
- * linerelgap=<number>%
- * @endcode
- */
- char *endptr = NULL;
- double val = strtod(param, &endptr);
- if (endptr)
- {
- while (*endptr && _is_white(*endptr))
- endptr++;
- if (*endptr == '%')
- {
- fmt->linerelgap = val / 100.0;
- fmt->linegap = 0;
- if (fmt->linerelgap < 0.0) fmt->linerelgap = 0.0;
- }
- }
- }
else if (cmd == itemstr)
{
/**
@@ -2638,32 +2920,6 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
// itemstr == replacement object items in textblock - inline imges
// for example
}
- else if (cmd == linefillstr)
- {
- /**
- * @page evas_textblock_style_page Evas Textblock Style Options
- *
- * @subsection evas_textblock_style_linefill Line fill
- *
- * Sets the size of the line fill in text. The value must be a
- * percentage.
- * @code
- * linefill=<number>%
- * @endcode
- */
- char *endptr = NULL;
- double val = strtod(param, &endptr);
- if (endptr)
- {
- while (*endptr && _is_white(*endptr))
- endptr++;
- if (*endptr == '%')
- {
- fmt->linefill = val / 100.0;
- if (fmt->linefill < 0.0) fmt->linefill = 0.0;
- }
- }
- }
else if (cmd == ellipsisstr)
{
/**
@@ -2715,36 +2971,6 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
Efl_Canvas_Textblock_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
eina_stringshare_replace(&o->repch, param);
}
- else if (cmd == underline_dash_widthstr)
- {
- /**
- * @page evas_textblock_style_page Evas Textblock Style Options
- *
- * @subsection evas_textblock_style_underline_dash_width Underline dash width
- *
- * Sets the width of the underline dash. The value should be a number.
- * @code
- * underline_dash_width=<number>
- * @endcode
- */
- fmt->underline_dash_width = atoi(param);
- if (fmt->underline_dash_width <= 0) fmt->underline_dash_width = 1;
- }
- else if (cmd == underline_dash_gapstr)
- {
- /**
- * @page evas_textblock_style_page Evas Textblock Style Options
- *
- * @subsection evas_textblock_style_underline_dash_gap Underline dash gap
- *
- * Sets the gap of the underline dash. The value should be a number.
- * @code
- * underline_dash_gap=<number>
- * @endcode
- */
- fmt->underline_dash_gap = atoi(param);
- if (fmt->underline_dash_gap <= 0) fmt->underline_dash_gap = 1;
- }
else if (cmd == underline_heightstr)
{
/**
@@ -2776,6 +3002,18 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
fmt->gfx_filter = calloc(1, sizeof(Efl_Canvas_Textblock_Filter));
eina_stringshare_replace(&fmt->gfx_filter->name, param);
}
+ else
+ {
+ if (is_legacy)
+ {
+ _format_command_legacy_only(fmt, cmd, param, len);
+ }
+ else
+ {
+ _format_command_unified_only(o, fmt, cmd, param, len);
+ }
+
+ }
}
//FIXME Create common function for both _default _format_command & _format_command
@@ -2940,15 +3178,15 @@ _default_format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt,
part1 = alloca(len + 1);
*part1 = 0;
-
+
part2 = alloca(len + 1);
*part2 = 0;
_style_string_split(param, part1, part2);
- _format_shadow_set(fmt, part1, EINA_TRUE, o);
+ changed = _format_shadow_set(fmt, part1, EINA_TRUE, o);
if (*part2)
- _format_shadow_direction_set(fmt, part2, EINA_TRUE, o);
+ changed = _format_shadow_direction_set(fmt, part2, EINA_TRUE, o) || changed;
}
else
{
@@ -2961,7 +3199,7 @@ _default_format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt,
return changed;
}
-/*
+/*
* @internal
* just to create a constant without using marco
* 2 cacheline is enough for the string we parse
@@ -2970,12 +3208,12 @@ _default_format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt,
*/
enum _Internal{ ALLOCATOR_SIZE = 120 };
-/*
+/*
* @internal
* A simple stack allocator which first
* tries to create a string in the stack (buffer
* it holds). if the string size is bigger than its
- * buffer capacity it will fall back to creating the
+ * buffer capacity it will fall back to creating the
* string on heap.
* USAGE :
* Allocator a;
@@ -3067,6 +3305,22 @@ _format_is_param(const char *item)
/**
* @internal
+ * Returns first occurrence of whitespace character
+ * otherwise return NULL.
+ *
+ * @param[in] string to search.
+ */
+static const char*
+_strchr_whitespace(const char* str)
+{
+ if (!str) return NULL;
+ while (*str && !isspace(*str)) str++;
+ if(*str) return str;
+ return NULL;
+}
+
+/**
+ * @internal
* Parse the format item and populate key and val with the stringshares that
* correspond to the formats parsed.
* It expects item to be of the structure:
@@ -3089,7 +3343,7 @@ _format_param_parse(const char *item, const char **key, char **val, Allocator *a
start++; /* Advance after the '=' */
/* If we can find a quote as the first non-space char,
* our new delimiter is a quote, not a space. */
- while (*start == ' ')
+ while (isspace(*start))
start++;
if (*start == '\'')
@@ -3101,9 +3355,9 @@ _format_param_parse(const char *item, const char **key, char **val, Allocator *a
}
else
{
- end = strchr(start, ' ');
+ end = _strchr_whitespace(start);
while ((end) && (end > start) && (end[-1] == '\\'))
- end = strchr(end + 1, ' ');
+ end = _strchr_whitespace(end + 1);
}
/* Null terminate before the spaces */
@@ -3137,7 +3391,7 @@ end:
* @return the current item parsed from the string.
*/
static const char *
-_format_parse(const char **s)
+_format_parse(const char **s, Eina_Bool all_whitespaces)
{
const char *p;
const char *s1 = NULL, *s2 = NULL;
@@ -3149,7 +3403,13 @@ _format_parse(const char **s)
{
if (!s1)
{
- if (*p != ' ') s1 = p;
+ if (all_whitespaces)
+ {
+ if (!isspace(*p))
+ s1 = p;
+ }
+ else if(*p != ' ')
+ s1 = p;
if (*p == 0) break;
}
else if (!s2)
@@ -3161,7 +3421,13 @@ _format_parse(const char **s)
if ((p > *s) && (p[-1] != '\\') && (!quote))
{
- if (*p == ' ') s2 = p;
+ if (all_whitespaces)
+ {
+ if (isspace(*p))
+ s2 = p;
+ }
+ else if(*p == ' ')
+ s2 = p;
}
if (*p == 0) s2 = p;
}
@@ -3197,12 +3463,12 @@ _format_fill(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const char
s = str;
/* get rid of any spaces at the start of the string */
- while (*s == ' ') s++;
+ while (isspace(*s)) s++;
Allocator allocator;
_allocator_init(&allocator);
- while ((item = _format_parse(&s)))
+ while ((item = _format_parse(&s, EINA_TRUE)))
{
const char *key = NULL;
char *val = NULL;
@@ -3323,10 +3589,10 @@ _format_string_get(const Eo *eo_obj, Evas_Object_Textblock_Format *fmt)
PRINTF_APPEND_COLOR(underline_colorstr, fmt->color.underline.r, fmt->color.underline.g,
fmt->color.underline.b, fmt->color.underline.a);
- PRINTF_APPEND_COLOR(underline2_colorstr, fmt->color.underline2.r, fmt->color.underline2.g,
+ PRINTF_APPEND_COLOR(secondary_underline_colorstr, fmt->color.underline2.r, fmt->color.underline2.g,
fmt->color.underline2.b, fmt->color.underline2.a);
- PRINTF_APPEND_COLOR(underline_dash_colorstr, fmt->color.underline_dash.r, fmt->color.underline_dash.g,
+ PRINTF_APPEND_COLOR(underline_dashed_colorstr, fmt->color.underline_dash.r, fmt->color.underline_dash.g,
fmt->color.underline_dash.b, fmt->color.underline_dash.a);
PRINTF_APPEND_COLOR(outline_colorstr, fmt->color.outline.r, fmt->color.outline.g,
@@ -3338,10 +3604,10 @@ _format_string_get(const Eo *eo_obj, Evas_Object_Textblock_Format *fmt)
PRINTF_APPEND_COLOR(glow_colorstr, fmt->color.glow.r, fmt->color.glow.g,
fmt->color.glow.b, fmt->color.glow.a);
- PRINTF_APPEND_COLOR(glow2_colorstr, fmt->color.glow2.r, fmt->color.glow2.g,
+ PRINTF_APPEND_COLOR(secondary_glow_colorstr, fmt->color.glow2.r, fmt->color.glow2.g,
fmt->color.glow2.b, fmt->color.glow2.a);
- PRINTF_APPEND_COLOR(backing_colorstr, fmt->color.backing.r, fmt->color.backing.g,
+ PRINTF_APPEND_COLOR(background_colorstr, fmt->color.backing.r, fmt->color.backing.g,
fmt->color.backing.b, fmt->color.backing.a);
PRINTF_APPEND_COLOR(strikethrough_colorstr, fmt->color.strikethrough.r, fmt->color.strikethrough.g,
@@ -3362,11 +3628,11 @@ _format_string_get(const Eo *eo_obj, Evas_Object_Textblock_Format *fmt)
halign_value_str = "locale";
break;
case EVAS_TEXTBLOCK_ALIGN_AUTO_NONE:
- if (fmt->halign == 0.5)
+ if (EINA_DBL_EQ(fmt->halign, 0.5))
halign_value_str = "center";
- else if (fmt->halign == 0.0)
+ else if (EINA_DBL_EQ(fmt->halign, 0.0))
halign_value_str = "left";
- else if (fmt->halign == 1.0)
+ else if (EINA_DBL_EQ(fmt->halign, 1.0))
halign_value_str = "right";
break;
@@ -3380,13 +3646,13 @@ _format_string_get(const Eo *eo_obj, Evas_Object_Textblock_Format *fmt)
char *valign_value_str = NULL;
- if (fmt->valign == 0.5)
+ if (EINA_DBL_EQ(fmt->valign, 0.5))
valign_value_str = "center";
- else if (fmt->valign == 0.0)
+ else if (EINA_DBL_EQ(fmt->valign, 0.0))
valign_value_str = "top";
- else if (fmt->valign == 1.0)
+ else if (EINA_DBL_EQ(fmt->valign, 1.0))
valign_value_str = "bottom";
- else if (fmt->valign == -1.0)
+ else if (EINA_DBL_EQ(fmt->valign, -1.0))
valign_value_str = "baseline";
if (valign_value_str != NULL)
@@ -3399,7 +3665,7 @@ _format_string_get(const Eo *eo_obj, Evas_Object_Textblock_Format *fmt)
PRINTF_APPEND_INT(right_marginstr, fmt->margin.r);
- char *underline_value_str = "off";
+ char *underline_value_str = "none";
if (fmt->underline == EINA_TRUE && fmt->underline2 == EINA_TRUE)
underline_value_str = "double";
@@ -3408,102 +3674,94 @@ _format_string_get(const Eo *eo_obj, Evas_Object_Textblock_Format *fmt)
else if (fmt->underline_dash == EINA_TRUE)
underline_value_str = "dashed";
- PRINTF_APPEND_STR(underlinestr, underline_value_str);
- PRINTF_APPEND_STR(strikethroughstr, (fmt->strikethrough == 0 ? "off" : "on"));
- PRINTF_APPEND_STR(backingstr, (fmt->backing == 0 ? "off" : "on"));
+ PRINTF_APPEND_STR(underline_typestr, underline_value_str);
+ PRINTF_APPEND_STR(strikethrough_typestr, (fmt->strikethrough == 0 ? "none" : "single"));
+ PRINTF_APPEND_STR(background_typestr, (fmt->backing == 0 ? "none" : "solid"));
- char *style_value_str_1 = "off";
- char *style_value_str_2 = NULL;
- Efl_Text_Style_Effect_Type style1 = _FMT_INFO(effect);
- Efl_Text_Style_Effect_Type style2 = _FMT_INFO(shadow_direction);
+ Efl_Text_Style_Effect_Type effect = _FMT_INFO(effect);
- switch (style1)
+ switch (effect)
{
case EFL_TEXT_STYLE_EFFECT_TYPE_NONE:
- style_value_str_1 = "plain";
+ PRINTF_APPEND_STR(effect_typestr, "none");
break;
case EFL_TEXT_STYLE_EFFECT_TYPE_SHADOW:
- style_value_str_1 = "shadow";
+ PRINTF_APPEND_STR(effect_typestr, "shadow");
break;
case EFL_TEXT_STYLE_EFFECT_TYPE_OUTLINE:
- style_value_str_1 = "outline";
+ PRINTF_APPEND_STR(effect_typestr, "outline");
break;
case EFL_TEXT_STYLE_EFFECT_TYPE_SOFT_OUTLINE:
- style_value_str_1 = "soft_outline";
+ PRINTF_APPEND_STR(effect_typestr, "soft_outline");
break;
case EFL_TEXT_STYLE_EFFECT_TYPE_OUTLINE_SHADOW:
- style_value_str_1 = "outline_shadow";
+ PRINTF_APPEND_STR(effect_typestr, "outline_shadow");
break;
case EFL_TEXT_STYLE_EFFECT_TYPE_OUTLINE_SOFT_SHADOW:
- style_value_str_1 = "outline_soft_shadow";
+ PRINTF_APPEND_STR(effect_typestr, "outline_soft_shadow");
break;
case EFL_TEXT_STYLE_EFFECT_TYPE_GLOW:
- style_value_str_1 = "glow";
+ PRINTF_APPEND_STR(effect_typestr, "glow");
break;
case EFL_TEXT_STYLE_EFFECT_TYPE_FAR_SHADOW:
- style_value_str_1 = "far_shadow";
+ PRINTF_APPEND_STR(effect_typestr, "far_shadow");
break;
case EFL_TEXT_STYLE_EFFECT_TYPE_SOFT_SHADOW:
- style_value_str_1 = "soft_shadow";
+ PRINTF_APPEND_STR(effect_typestr, "soft_shadow");
break;
case EFL_TEXT_STYLE_EFFECT_TYPE_FAR_SOFT_SHADOW:
- style_value_str_1 = "far_soft_shadow";
+ PRINTF_APPEND_STR(effect_typestr, "far_soft_shadow");
break;
default:
- style_value_str_1 = "off";
break;
}
- switch (style2)
+ Efl_Text_Style_Shadow_Direction shadow_direction = _FMT_INFO(shadow_direction);
+
+ switch (shadow_direction)
{
case EFL_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT:
- style_value_str_2 = "bottom_right";
+ PRINTF_APPEND_STR(shadow_directionstr, "bottom_right");
break;
case EFL_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM:
- style_value_str_2 = "bottom";
+ PRINTF_APPEND_STR(shadow_directionstr, "bottom");
break;
case EFL_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT:
- style_value_str_2 = "bottom_left";
+ PRINTF_APPEND_STR(shadow_directionstr, "bottom_left");
break;
case EFL_TEXT_STYLE_SHADOW_DIRECTION_LEFT:
- style_value_str_2 = "left";
+ PRINTF_APPEND_STR(shadow_directionstr, "left");
break;
case EFL_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT:
- style_value_str_2 = "top_left";
+ PRINTF_APPEND_STR(shadow_directionstr, "top_left");
break;
case EFL_TEXT_STYLE_SHADOW_DIRECTION_TOP:
- style_value_str_2 = "top";
+ PRINTF_APPEND_STR(shadow_directionstr, "top");
break;
case EFL_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT:
- style_value_str_2 = "top_right";
+ PRINTF_APPEND_STR(shadow_directionstr, "top_right");
break;
case EFL_TEXT_STYLE_SHADOW_DIRECTION_RIGHT:
- style_value_str_2 = "right";
+ PRINTF_APPEND_STR(shadow_directionstr, "right");
break;
default:
- style_value_str_2 = NULL;
break;
}
- if (style_value_str_2 != NULL)
- eina_strbuf_append_printf(format_buffer, "%s=%s,%s ", stylestr, style_value_str_1, style_value_str_2);
- else
- PRINTF_APPEND_STR(stylestr, style_value_str_1);
-
- PRINTF_APPEND_INT(tabstopsstr, fmt->tabstops);
- PRINTF_APPEND_INT(linesizestr, fmt->linesize);
- PRINTF_APPEND_PERCENT_FLOAT(linerelsizestr, (fmt->linerelsize*100));
- PRINTF_APPEND_INT(linegapstr, fmt->linegap);
- PRINTF_APPEND_PERCENT_FLOAT(linerelgapstr, (fmt->linerelgap*100));
- PRINTF_APPEND_PERCENT_FLOAT(linefillstr, (fmt->linefill*100));
+ PRINTF_APPEND_INT(tab_stopsstr, fmt->tabstops);
+ PRINTF_APPEND_INT(line_sizestr, fmt->linesize);
+ PRINTF_APPEND_PERCENT_FLOAT(line_rel_sizestr, (fmt->linerelsize*100));
+ PRINTF_APPEND_INT(line_gapstr, fmt->linegap);
+ PRINTF_APPEND_PERCENT_FLOAT(line_rel_gapstr, (fmt->linerelgap*100));
+ PRINTF_APPEND_PERCENT_FLOAT(line_fillstr, (fmt->linefill*100));
PRINTF_APPEND_FLOAT(ellipsisstr, fmt->ellipsis);
PRINTF_APPEND_STR(passwordstr, (fmt->password == 0 ? "off" : "on"));
if (o->repch)
PRINTF_APPEND_STR(replacement_charstr, o->repch);
- PRINTF_APPEND_INT(underline_dash_widthstr, fmt->underline_dash_width);
- PRINTF_APPEND_INT(underline_dash_gapstr, fmt->underline_dash_gap);
+ PRINTF_APPEND_INT(underline_dashed_widthstr, fmt->underline_dash_width);
+ PRINTF_APPEND_INT(underline_dashed_gapstr, fmt->underline_dash_gap);
PRINTF_APPEND_FLOAT(underline_heightstr, fmt->underline_height);
const char *temp = eina_strbuf_string_get(format_buffer);
@@ -3951,8 +4209,8 @@ _layout_update_bidi_props(const Efl_Canvas_Textblock_Data *o,
* Free the visual lines in the paragraph (logical items are kept)
*/
static void
-_paragraph_clear(Evas_Public_Data *evas,
- Efl_Canvas_Textblock_Data *o, Evas_Object_Protected_Data *obj,
+_paragraph_clear(Efl_Canvas_Textblock_Data *o,
+ Evas_Object_Protected_Data *obj,
Evas_Object_Textblock_Paragraph *par)
{
while (par->lines)
@@ -3974,7 +4232,7 @@ _paragraph_clear(Evas_Public_Data *evas,
if (ti->parent.ln == ln)
{
o->hyphen_items = eina_list_remove_list(o->hyphen_items, i);
- _item_free(evas, o, obj, NULL, _ITEM(ti));
+ _item_free(o, obj, NULL, _ITEM(ti));
}
}
}
@@ -3988,17 +4246,17 @@ _paragraph_clear(Evas_Public_Data *evas,
* Free the layout paragraph and all of it's lines and logical items.
*/
static void
-_paragraph_free(Evas_Public_Data *evas,
- Efl_Canvas_Textblock_Data *o, Evas_Object_Protected_Data *obj,
+_paragraph_free(Efl_Canvas_Textblock_Data *o,
+ Evas_Object_Protected_Data *obj,
Evas_Object_Textblock_Paragraph *par)
{
- _paragraph_clear(evas, o, obj, par);
+ _paragraph_clear(o, obj, par);
{
Evas_Object_Textblock_Item *it;
EINA_LIST_FREE(par->logical_items, it)
{
- _item_free(evas, o, obj, NULL, it);
+ _item_free(o, obj, NULL, it);
}
}
#ifdef BIDI_SUPPORT
@@ -4028,7 +4286,7 @@ _paragraphs_clear(Ctxt *c)
EINA_INLIST_FOREACH(EINA_INLIST_GET(c->paragraphs), par)
{
- _paragraph_clear(c->evas, c->o, c->evas_o, par);
+ _paragraph_clear(c->o, c->evas_o, par);
}
}
@@ -4041,8 +4299,8 @@ _paragraphs_clear(Ctxt *c)
* @param c the context - Not NULL.
*/
static void
-_paragraphs_free(Evas_Public_Data *evas,
- Efl_Canvas_Textblock_Data *o, Evas_Object_Protected_Data *obj,
+_paragraphs_free(Efl_Canvas_Textblock_Data *o,
+ Evas_Object_Protected_Data *obj,
Evas_Object_Textblock_Paragraph *pars)
{
o->num_paragraphs = 0;
@@ -4053,7 +4311,7 @@ _paragraphs_free(Evas_Public_Data *evas,
par = (Evas_Object_Textblock_Paragraph *) pars;
pars = (Evas_Object_Textblock_Paragraph *)eina_inlist_remove(EINA_INLIST_GET(pars), EINA_INLIST_GET(par));
- _paragraph_free(evas, o, obj, par);
+ _paragraph_free(o, obj, par);
}
}
@@ -4105,6 +4363,7 @@ _layout_format_push(Ctxt *c, Evas_Object_Textblock_Format *fmt,
fmt->font.fdesc->weight = _FMT_INFO(font_weight);
fmt->font.fdesc->slant = _FMT_INFO(font_slant);
fmt->font.fdesc->width = _FMT_INFO(font_width);
+ eina_stringshare_replace(&(fmt->font.source), _FMT_INFO(font_source));
evas_font_name_parse(fmt->font.fdesc, _FMT_INFO(font));
fmt->font.font = evas_font_load(evas_obj->layer->evas->font_path,
evas_obj->layer->evas->hinting,
@@ -4113,6 +4372,10 @@ _layout_format_push(Ctxt *c, Evas_Object_Textblock_Format *fmt,
(int)(((double) _FMT_INFO(size)) * evas_obj->cur->scale),
fmt->font.bitmap_scalable);
}
+ else if (_FMT_INFO(size)) // if font size specified alone, without font
+ {
+ fmt->font.size = _FMT_INFO(size);
+ }
if (_FMT_INFO(gfx_filter_name))
{
if (!fmt->gfx_filter)
@@ -4222,7 +4485,7 @@ _layout_format_value_handle(Ctxt *c, Evas_Object_Textblock_Format *fmt, const ch
{
const char *key = NULL;
char *val = NULL;
-
+
Allocator allocator;
_allocator_init(&allocator);
@@ -4653,7 +4916,7 @@ loop_advance:
}
/* Check current line's height is acceptable or not */
- if ((fmt->ellipsis == 1.0) &&
+ if (EINA_DBL_EQ(fmt->ellipsis, 1.0) &&
(c->h > 0) && (c->y + c->ln->h > c->h))
{
/* No text is shown when the object height is smaller than actual font size's height.
@@ -4693,14 +4956,17 @@ loop_advance:
if (c->descent < 2) c->underline_extend = 2 - c->descent;
}
c->ln->line_no = c->line_no - c->ln->par->line_no;
- c->line_no++;
- c->y += c->ascent + c->descent;
+ if ( c->line_no == 0 || c->o->multiline)
+ {
+ c->line_no++;
+ c->y += c->ascent + c->descent;
+ }
if (c->w >= 0)
{
/* c->o->style_pad.r is already included in the line width, so it's
* not used in this calculation. . */
c->ln->x = c->marginl + c->o->style_pad.l +
- ((c->w - c->ln->w - c->o->style_pad.l -
+ ((c->w - c->ln->w - c->o->style_pad.l - c->o->style_pad.r -
c->marginl - c->marginr) * _layout_line_align_get(c));
}
else
@@ -4716,8 +4982,7 @@ loop_advance:
/* Calculate new max width */
{
- Evas_Coord new_wmax = c->ln->w +
- c->marginl + c->marginr - (c->o->style_pad.l + c->o->style_pad.r);
+ Evas_Coord new_wmax = c->ln->w + c->marginl + c->marginr;
if (new_wmax > c->par->last_fw)
c->par->last_fw = new_wmax;
if (new_wmax > c->wmax)
@@ -4897,7 +5162,7 @@ _layout_item_merge_and_free(Ctxt *c,
item1->parent.merge = EINA_FALSE;
item1->parent.visually_deleted = EINA_FALSE;
- _item_free(c->evas, c->o, c->evas_o, NULL, _ITEM(item2));
+ _item_free(c->o, c->evas_o, NULL, _ITEM(item2));
}
/**
@@ -4936,9 +5201,8 @@ _text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti)
{
evas_filter_program_padding_get(pgm, &pad, NULL);
- ti->x_adjustment = pad.r + pad.l;
- ti->parent.w = tw + ti->x_adjustment; // FIXME: why add l+r here,
- ti->parent.h = th; // but not t+b here?
+ ti->parent.w = tw; // Don't add style pad here
+ ti->parent.h = th; // Don't add style pad here
ti->parent.adv = advw;
ti->parent.x = 0;
return;
@@ -5007,9 +5271,8 @@ _text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti)
shx2 += shad_sz;
if (shx1 < minx) minx = shx1;
if (shx2 > maxx) maxx = shx2;
- ti->x_adjustment = maxx - minx;
- ti->parent.w = tw + ti->x_adjustment;
+ ti->parent.w = tw;
ti->parent.h = th;
ti->parent.adv = advw;
ti->parent.x = 0;
@@ -5173,6 +5436,27 @@ skip:
script = evas_common_language_script_type_get(str, script_len);
+ /* FIXME Workaround for Burmese Vowel E Rendering, caused by bug in Harfbuzz
+ breaking text run will fix the visual issue.
+ */
+ if (script == EVAS_SCRIPT_MYANMAR && script_len > 1)
+ {
+ int i;
+ for (i = 0 ; i < script_len - 1; i++)
+ {
+ if (str[i] == 0x200C)
+ {
+ if (str[i+1] == 0x1031)
+ {
+ cur_len += script_len;
+ script_len = i + 1;
+ cur_len -= script_len;
+ break;
+ }
+ }
+ }
+ }
+
Evas_Object_Protected_Data *obj = efl_data_scope_get(c->obj, EFL_CANVAS_OBJECT_CLASS);
while (script_len > 0)
{
@@ -5506,7 +5790,7 @@ _layout_do_format(const Evas_Object *obj, Ctxt *c,
{
fmt = _layout_format_pop(c, n->orig_format);
}
- while ((item = _format_parse(&s)))
+ while ((item = _format_parse(&s, EINA_FALSE)))
{
if (_format_is_param(item))
{
@@ -5674,7 +5958,7 @@ _layout_get_hyphenationwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt,
}
else
{
- _item_free(c->evas, c->o, c->evas_o, NULL, _ITEM(c->hyphen_ti));
+ _item_free(c->o, c->evas_o, NULL, _ITEM(c->hyphen_ti));
c->hyphen_ti = NULL;
}
}
@@ -5779,7 +6063,7 @@ _layout_get_hyphenationwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt,
/* hyphen item cleanup */
if (!found_hyphen && c->hyphen_ti)
{
- _item_free(c->evas, c->o, c->evas_o, NULL, _ITEM(c->hyphen_ti));
+ _item_free(c->o, c->evas_o, NULL, _ITEM(c->hyphen_ti));
c->hyphen_ti = NULL;
}
@@ -5935,7 +6219,7 @@ _layout_ellipsis_item_new(Ctxt *c, const Evas_Object_Textblock_Item *cur_it)
size_t len = 1; /* The length of _ellip_str */
/* We can free it here, cause there's only one ellipsis item per tb. */
- if (c->o->ellip_ti) _item_free(c->evas, c->o, c->evas_o, NULL, _ITEM(c->o->ellip_ti));
+ if (c->o->ellip_ti) _item_free(c->o, c->evas_o, NULL, _ITEM(c->o->ellip_ti));
c->o->ellip_ti = ellip_ti = _layout_text_item_new(c, cur_it->format);
ellip_ti->parent.text_node = cur_it->text_node;
ellip_ti->parent.text_pos = cur_it->text_pos;
@@ -5991,7 +6275,7 @@ _layout_handle_ellipsis(Ctxt *c, Evas_Object_Textblock_Item *it, Eina_List *i)
save_cx = c->x;
temp_w = c->w;
- ellip_w = ellip_ti->parent.w - ellip_ti->x_adjustment;
+ ellip_w = ellip_ti->parent.w;
#ifdef BIDI_SUPPORT
// XXX: with RTL considerations in mind, we need to take max(adv, w) as the
// line may be reordered in a way that the item placement will cause the
@@ -6111,7 +6395,7 @@ _layout_handle_ellipsis(Ctxt *c, Evas_Object_Textblock_Item *it, Eina_List *i)
/* Don't do much for the meanwhile. */
static inline void
_layout_paragraph_render(Efl_Canvas_Textblock_Data *o,
- Evas_Object_Textblock_Paragraph *par)
+ Evas_Object_Textblock_Paragraph *par)
{
if (par->rendered)
return;
@@ -6334,7 +6618,7 @@ _layout_par(Ctxt *c)
{
Eina_List *itr, *itr_next;
Evas_Object_Textblock_Item *ititr, *prev_it = NULL;
- _paragraph_clear(c->evas, c->o, c->evas_o, c->par);
+ _paragraph_clear(c->o, c->evas_o, c->par);
EINA_LIST_FOREACH_SAFE(c->par->logical_items, itr, itr_next, ititr)
{
if (ititr->merge && prev_it &&
@@ -6366,7 +6650,10 @@ _layout_par(Ctxt *c)
#endif
it = _ITEM(eina_list_data_get(c->par->logical_items));
- _layout_line_new(c, it->format);
+ if (c->line_no == 0 || c->o->multiline)
+ {
+ _layout_line_new(c, it->format);
+ }
/* We walk on our own because we want to be able to add items from
* inside the list and then walk them on the next iteration. */
@@ -6440,10 +6727,6 @@ _layout_par(Ctxt *c)
/* Check if we need to wrap, i.e the text is bigger than the width,
or we already found a wrap point. */
itw = it->w;
- if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
- {
- itw -= _ITEM_TEXT(it)->x_adjustment;
- }
if ((c->w >= 0) &&
(obs ||
@@ -6569,7 +6852,7 @@ _layout_par(Ctxt *c)
Evas_Coord cw = c->w;
if (obs)
{
- cw -= obs->w;
+ cw = obs->x;
}
if (it->format->wrap_word)
wrap = _layout_get_wordwrap(c, it->format, it,
@@ -6999,7 +7282,7 @@ _layout_pre(Ctxt *c)
c->paragraphs = (Evas_Object_Textblock_Paragraph *)
eina_inlist_remove(EINA_INLIST_GET(c->paragraphs),
EINA_INLIST_GET(c->par));
- _paragraph_free(c->evas, c->o, c->evas_o, c->par);
+ _paragraph_free(c->o, c->evas_o, c->par);
c->par = tmp_par;
}
@@ -7015,7 +7298,7 @@ _layout_pre(Ctxt *c)
c->paragraphs = (Evas_Object_Textblock_Paragraph *)
eina_inlist_remove(EINA_INLIST_GET(c->paragraphs),
EINA_INLIST_GET(prev_par));
- _paragraph_free(c->evas, c->o, c->evas_o, prev_par);
+ _paragraph_free(c->o, c->evas_o, prev_par);
}
else
{
@@ -7138,7 +7421,7 @@ _layout_pre(Ctxt *c)
c->paragraphs = (Evas_Object_Textblock_Paragraph *)
eina_inlist_remove(EINA_INLIST_GET(c->paragraphs),
EINA_INLIST_GET(c->par));
- _paragraph_free(c->evas, c->o, c->evas_o, c->par);
+ _paragraph_free(c->o, c->evas_o, c->par);
c->par = tmp_par;
}
@@ -7271,7 +7554,7 @@ _layout_visual(Ctxt *c)
while (c->par)
{
c->par->visible = 0;
- _paragraph_clear(c->evas, c->o, c->evas_o, c->par);
+ _paragraph_clear(c->o, c->evas_o, c->par);
c->par = (Evas_Object_Textblock_Paragraph *)
EINA_INLIST_GET(c->par)->next;
}
@@ -7286,7 +7569,8 @@ _layout_visual(Ctxt *c)
if (last_vis_par)
{
c->hmax = last_vis_par->y + last_vis_par->h +
- _layout_last_line_max_descent_adjust_calc(c, last_vis_par);
+ _layout_last_line_max_descent_adjust_calc(c, last_vis_par) -
+ c->style_pad.t - c->style_pad.b;
}
}
@@ -7311,7 +7595,7 @@ _layout_done(Ctxt *c, Evas_Coord *w_ret, Evas_Coord *h_ret)
/* Vertically align the textblock */
if ((c->o->valign > 0.0) && (c->h > c->hmax))
{
- Evas_Coord adjustment = (c->h - c->hmax) * c->o->valign;
+ Evas_Coord adjustment = (c->h - c->hmax - c->style_pad.t - c->style_pad.b) * c->o->valign;
Evas_Object_Textblock_Paragraph *par;
EINA_INLIST_FOREACH(c->paragraphs, par)
{
@@ -7370,8 +7654,6 @@ _layout_setup(Ctxt *c, const Eo *eo_obj, Evas_Coord w, Evas_Coord h)
c->obs_infos = NULL;
c->hyphen_ti = NULL;
c->handle_obstacles = EINA_FALSE;
- c->w = w;
- c->h = h;
c->style_pad.r = c->style_pad.l = c->style_pad.t = c->style_pad.b = 0;
c->vertical_ellipsis = EINA_FALSE;
c->ellip_prev_it = NULL;
@@ -7389,6 +7671,7 @@ _layout_setup(Ctxt *c, const Eo *eo_obj, Evas_Coord w, Evas_Coord h)
/* Start of logical layout creation */
/* setup default base style */
+ if (!o->main_fmt) /* no main format */
{
Eina_List *itr;
User_Style_Entry *use;
@@ -7420,10 +7703,11 @@ _layout_setup(Ctxt *c, const Eo *eo_obj, Evas_Coord w, Evas_Coord h)
if (finalize)
_format_finalize(c->obj, c->fmt);
+ o->main_fmt = _format_dup(c->obj, c->fmt);
}
- if (!c->fmt)
+ else
{
- return EINA_FALSE;
+ c->fmt = _layout_format_push(c, o->main_fmt, NULL);
}
c->paragraphs = o->paragraphs;
@@ -7483,10 +7767,11 @@ _relayout(const Evas_Object *eo_obj)
if ((o->paragraphs) && (!EINA_INLIST_GET(o->paragraphs)->next) &&
(o->paragraphs->lines) && (!EINA_INLIST_GET(o->paragraphs->lines)->next))
{
- if (obj->cur->geometry.h < o->formatted.h)
+ if (obj->cur->geometry.h < o->formatted.h + o->style_pad.t + o->style_pad.b)
{
- LYDBG("ZZ: 1 line only... lasth == formatted h (%i)\n", o->formatted.h);
- o->formatted.oneline_h = o->formatted.h;
+ LYDBG("ZZ: 1 line only... lasth == formatted h + style_pad.t + style_pad.b(%i)\n",
+ o->formatted.h + o->style_pad.t + o->style_pad.b);
+ o->formatted.oneline_h = o->formatted.h + o->style_pad.t + o->style_pad.b;
}
}
o->changed = 0;
@@ -7617,7 +7902,7 @@ _find_layout_line_num(const Evas_Object *eo_obj, int line)
return NULL;
}
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_textblock_add(Evas *e)
{
Efl_Canvas_Textblock_Data *o;
@@ -7628,6 +7913,7 @@ evas_object_textblock_add(Evas *e)
efl_text_multiline_set(efl_added, EINA_TRUE),
efl_canvas_object_legacy_ctor(efl_added));
o = efl_data_scope_get(eo_obj, MY_CLASS);
+ o->is_legacy = EINA_TRUE;
o->legacy_newline = EINA_TRUE;
o->auto_styles = EINA_FALSE;
_FMT(password) = EINA_TRUE;
@@ -7680,7 +7966,7 @@ _efl_canvas_textblock_efl_object_constructor(Eo *eo_obj, Efl_Canvas_Textblock_Da
return eo_obj;
}
-EAPI Evas_Textblock_Style *
+EVAS_API Evas_Textblock_Style *
evas_textblock_style_new(void)
{
Evas_Textblock_Style *ts;
@@ -7690,7 +7976,7 @@ evas_textblock_style_new(void)
return ts;
}
-EAPI void
+EVAS_API void
evas_textblock_style_free(Evas_Textblock_Style *ts)
{
if (!ts) return;
@@ -7705,7 +7991,17 @@ evas_textblock_style_free(Evas_Textblock_Style *ts)
}
static void
-_evas_textblock_update_format_nodes_from_style_tag(Efl_Canvas_Textblock_Data *o)
+_evas_clear_main_format(Evas_Object *eo_obj, Efl_Canvas_Textblock_Data *o)
+{
+ if (o->main_fmt)
+ {
+ _format_unref_free(efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS), o->main_fmt);
+ o->main_fmt = NULL;
+ }
+}
+
+static void
+_evas_textblock_update_format_nodes_from_style_tag(Evas_Object *eo_obj, Efl_Canvas_Textblock_Data *o)
{
if (!o)
{
@@ -7713,6 +8009,8 @@ _evas_textblock_update_format_nodes_from_style_tag(Efl_Canvas_Textblock_Data *o)
return;
}
+ _evas_clear_main_format(eo_obj, o);
+
Evas_Object_Textblock_Node_Format *fnode = o->format_nodes;
while (fnode)
@@ -7745,7 +8043,7 @@ _evas_textblock_update_format_nodes_from_style_tag(Efl_Canvas_Textblock_Data *o)
}
}
-EAPI void
+EVAS_API void
evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text)
{
Eina_List *l;
@@ -7867,13 +8165,13 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text)
EINA_LIST_FOREACH(ts->objects, l, eo_obj)
{
Efl_Canvas_Textblock_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
- _evas_textblock_update_format_nodes_from_style_tag(o);
+ _evas_textblock_update_format_nodes_from_style_tag(eo_obj, o);
_evas_textblock_invalidate_all(o);
_evas_textblock_changed(o, eo_obj);
}
}
-EAPI const char *
+EVAS_API const char *
evas_textblock_style_get(const Evas_Textblock_Style *ts)
{
if (!ts) return NULL;
@@ -7924,6 +8222,8 @@ _textblock_style_generic_set(Evas_Object *eo_obj, Evas_Textblock_Style *ts,
Eina_List *itr;
Evas_Textblock_Style *old_ts = NULL;
+ _evas_clear_main_format(eo_obj, o);
+
if (!key)
{
old_ts = o->style;
@@ -7956,11 +8256,12 @@ _textblock_style_generic_set(Evas_Object *eo_obj, Evas_Textblock_Style *ts,
else if (us)
{
o->styles = eina_list_remove_list(o->styles, itr);
+ old_ts = us->st;
free(us);
}
}
- // Verify nothing has changed
+ // Verify nothing has changed
if (ts == old_ts) return;
if ((ts) && (ts->delete_me)) return;
@@ -7991,14 +8292,14 @@ _textblock_style_generic_set(Evas_Object *eo_obj, Evas_Textblock_Style *ts,
ts->objects = eina_list_append(ts->objects, eo_obj);
}
- _evas_textblock_update_format_nodes_from_style_tag(o);
+ _evas_textblock_update_format_nodes_from_style_tag(eo_obj, o);
o->format_changed = EINA_TRUE;
_evas_textblock_invalidate_all(o);
_evas_textblock_changed(o, eo_obj);
}
-EAPI void
+EVAS_API void
evas_object_textblock_style_set(Eo *eo_obj, const Evas_Textblock_Style *ts)
{
EINA_SAFETY_ON_NULL_RETURN(eo_obj);
@@ -8030,10 +8331,11 @@ _efl_canvas_textblock_style_apply(Eo *eo_obj, Efl_Canvas_Textblock_Data *o, cons
{
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
evas_object_async_block(obj);
+ _evas_clear_main_format(eo_obj, o);
_format_fill(eo_obj, &(o->default_format.format), style, EINA_TRUE);
}
-EAPI Evas_Textblock_Style *
+EVAS_API Evas_Textblock_Style *
evas_object_textblock_style_get(const Eo *eo_obj)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(eo_obj, NULL);
@@ -8053,22 +8355,16 @@ _efl_canvas_textblock_all_styles_get(const Eo *eo_obj EINA_UNUSED, Efl_Canvas_Te
return o->default_format.default_style_str;
}
-EOLIAN static void
-_efl_canvas_textblock_cursor_add(Eo *obj, Efl_Canvas_Textblock_Data *pd EINA_UNUSED, Efl_Text_Cursor *cursor)
-{
- efl_text_cursor_text_object_set(cursor, obj, obj);
-}
-
-EOLIAN static Efl_Text_Cursor *
+EOLIAN static Efl_Text_Cursor_Object *
_efl_canvas_textblock_cursor_create(Eo *obj, Efl_Canvas_Textblock_Data *pd EINA_UNUSED)
{
- Eo* cursor = efl_add(EFL_TEXT_CURSOR_CLASS, obj);
- efl_text_cursor_text_object_set(cursor, obj, obj);
+ Eo* cursor = efl_text_cursor_object_create(obj);
+ efl_text_cursor_object_text_object_set(cursor, obj, obj);
return cursor;
}
#define _STYLE_USER "_style_user"
-EAPI void
+EVAS_API void
evas_object_textblock_style_user_push(Eo *eo_obj, Evas_Textblock_Style *ts)
{
EINA_SAFETY_ON_NULL_RETURN(eo_obj);
@@ -8078,7 +8374,7 @@ evas_object_textblock_style_user_push(Eo *eo_obj, Evas_Textblock_Style *ts)
_textblock_style_generic_set(eo_obj, ts, _STYLE_USER);
}
-EAPI const Evas_Textblock_Style*
+EVAS_API const Evas_Textblock_Style*
evas_object_textblock_style_user_peek(const Eo *eo_obj)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(eo_obj, NULL);
@@ -8090,7 +8386,7 @@ evas_object_textblock_style_user_peek(const Eo *eo_obj)
return ts;
}
-EAPI void
+EVAS_API void
evas_object_textblock_style_user_pop(Eo *eo_obj)
{
EINA_SAFETY_ON_NULL_RETURN(eo_obj);
@@ -8099,7 +8395,7 @@ evas_object_textblock_style_user_pop(Eo *eo_obj)
_textblock_style_generic_set(eo_obj, NULL, _STYLE_USER);
}
-EAPI void
+EVAS_API void
evas_object_textblock_replace_char_set(Efl_Canvas_Textblock *eo_obj, const char *ch)
{
EINA_SAFETY_ON_NULL_RETURN(eo_obj);
@@ -8139,7 +8435,7 @@ _efl_canvas_textblock_is_empty_get(const Eo *eo_obj EINA_UNUSED, Efl_Canvas_Text
return !o->text_nodes || (eina_ustrbuf_length_get(o->text_nodes->unicode) == 0);
}
-EAPI void
+EVAS_API void
evas_object_textblock_valign_set(Efl_Canvas_Textblock *eo_obj, double align)
{
EINA_SAFETY_ON_NULL_RETURN(eo_obj);
@@ -8153,7 +8449,7 @@ evas_object_textblock_valign_set(Efl_Canvas_Textblock *eo_obj, double align)
_evas_textblock_changed(o, eo_obj);
}
-EAPI double
+EVAS_API double
evas_object_textblock_valign_get(const Efl_Canvas_Textblock *obj)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, 0.0);
@@ -8175,7 +8471,7 @@ _efl_canvas_textblock_bidi_delimiters_get(const Eo *eo_obj EINA_UNUSED, Efl_Canv
return o->bidi_delimiters;
}
-EAPI const char *
+EVAS_API const char *
evas_object_textblock_replace_char_get(const Efl_Canvas_Textblock *obj)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
@@ -8185,73 +8481,32 @@ evas_object_textblock_replace_char_get(const Efl_Canvas_Textblock *obj)
/**
* @internal
- * Advance p_buff to point after the end of the string. It's used with the
- * @ref escaped_strings[] variable.
- *
- * @param p_buff the pointer to the current string.
- */
-static inline void
-_escaped_advance_after_end_of_string(const char **p_buf)
-{
- while (**p_buf != 0) (*p_buf)++;
- (*p_buf)++;
-}
-
-/**
- * @internal
- * Advance p_buff to point after the end of the string. It's used with the
- * @ref escaped_strings[] variable. Also chec if matches.
- * FIXME: doc.
- *
- * @param p_buff the pointer to the current string.
- */
-static inline int
-_escaped_is_eq_and_advance(const char *s, const char *s_end,
- const char **p_m, const char *m_end)
-{
- Eina_Bool reached_end;
- for (;((s < s_end) && (*p_m < m_end)); s++, (*p_m)++)
- {
- if (*s != **p_m)
- {
- _escaped_advance_after_end_of_string(p_m);
- return 0;
- }
- }
-
- reached_end = !**p_m;
- if (*p_m < m_end)
- _escaped_advance_after_end_of_string(p_m);
-
- return ((s == s_end) && reached_end);
-}
-
-
-/**
- * @internal
*
* @param s the escape string to search for its index
- * @param s_len length of s string
+ * @param s_len length of s string
* @param escape_values array of Escape_Value to look inside, Sorted by Escape
* @param escape_values_len is the len of Escape_Value array
*/
static int
-_escaped_string_search(const char *s, size_t s_len, const Escape_Value escape_values[], const size_t escape_values_len)
+_escaped_string_search(const char *s, size_t s_len, Escape_Value **escape_values, const size_t escape_values_len)
{
+ if (!escape_values)
+ return -1;
+
int l = 0;
int r = escape_values_len - 1;
while (l <= r)
{
int m = (l + r) / 2;
- int res = strncmp(s, escape_values[m].escape, MAX(escape_values[m].escape_len, s_len));
+ int res = strncmp(s, escape_values[m]->escape, MAX(escape_values[m]->escape_len, s_len));
if (res == 0)
{
//Handle special case when s_len is less than escape_len
//then we will continue searching
//example ("&gt;",1,....)
- if (escape_values[m].escape_len > s_len)
+ if (escape_values[m]->escape_len > s_len)
res = -1;
- else if (escape_values[m].escape_len < s_len)
+ else if (escape_values[m]->escape_len < s_len)
res = 1;
else return m;
}
@@ -8271,14 +8526,17 @@ _escaped_string_search(const char *s, size_t s_len, const Escape_Value escape_va
* @param escape_values_len is the len of Escape_Value array
*/
static int
-_escaped_value_search(const char *s, const Escape_Value escape_values[], const size_t escape_values_len)
+_escaped_value_search(const char *s, Escape_Value **escape_values , const size_t escape_values_len)
{
+ if (!escape_values)
+ return -1;
+
int l = 0;
int r = escape_values_len - 1;
while (l <= r)
{
int m = (l + r) / 2;
- int res = strncmp(s, escape_values[m].value, escape_values[m].value_len);
+ int res = strncmp(s, escape_values[m]->value, escape_values[m]->value_len);
if (res == 0)
return m;
if (res > 0)
@@ -8299,21 +8557,24 @@ _escaped_value_search(const char *s, const Escape_Value escape_values[], const s
static inline const char *
_escaped_char_match(const char *s, int *adv)
{
- static const size_t escape_common_size = sizeof(escape_values_v_common_sorted) / sizeof(Escape_Value);
- int n_ret = _escaped_value_search(s, escape_values_v_common_sorted, escape_common_size);
+ size_t len = 0;
+ Escape_Value **list = get_html_escape_array_common_value_sorted(&len);
+ int n_ret = _escaped_value_search(s, list, len);
if (n_ret != -1)
{
- *adv = (int) escape_values_v_common_sorted[n_ret].value_len;
- return escape_values_v_common_sorted[n_ret].escape;
+ if (adv)
+ *adv = (int) list[n_ret]->value_len;
+ return list[n_ret]->escape;
}
- else
+ else
{
- static const size_t escape_size = sizeof(escape_values_v_sorted) / sizeof(Escape_Value);
- n_ret = _escaped_value_search(s, escape_values_v_sorted, escape_size);
+ list = get_html_escape_array_rest_value_sorted(&len);
+ n_ret = _escaped_value_search(s, list, len);
if (n_ret != -1)
{
- *adv = (int)escape_values_v_sorted[n_ret].value_len;
- return escape_values_v_sorted[n_ret].escape;
+ if (adv)
+ *adv = (int)list[n_ret]->value_len;
+ return list[n_ret]->escape;
}
}
return NULL;
@@ -8369,25 +8630,29 @@ _escaped_char_get(const char *s, const char *s_end)
}
else
{
- static const size_t escape_common_size = sizeof(escape_values_e_common_sorted) / sizeof(Escape_Value);
- int n_ret = _escaped_string_search(s, s_end-s, escape_values_e_common_sorted, escape_common_size);
+ size_t len = 0;
+ Escape_Value **list;
+ list = get_html_escape_array_common_key_sorted(&len);
+ int n_ret = _escaped_string_search(s, s_end-s, list, len);
if (n_ret != -1)
{
- return escape_values_e_common_sorted[n_ret].value;
+ return list[n_ret]->value;
}
else
{
- static const size_t escape_size = sizeof(escape_values_e_sorted) / sizeof(Escape_Value);
- n_ret = _escaped_string_search(s, s_end-s, escape_values_e_sorted, escape_size);
+ list = get_html_escape_array_rest_key_sorted(&len);
+ n_ret = _escaped_string_search(s, s_end-s, list, len);
if (n_ret != -1)
- return escape_values_e_sorted[n_ret].value;
+ {
+ return list[n_ret]->value;
+ }
}
}
return NULL;
}
-EAPI const char *
+EVAS_API const char *
evas_textblock_escape_string_get(const char *escape)
{
/* &amp; -> & */
@@ -8395,14 +8660,14 @@ evas_textblock_escape_string_get(const char *escape)
return _escaped_char_get(escape, escape + strlen(escape));
}
-EAPI const char *
+EVAS_API const char *
evas_textblock_escape_string_range_get(const char *escape_start, const char *escape_end)
{
if ((!escape_start) || (!escape_end)) return NULL;
return _escaped_char_get(escape_start, escape_end);
}
-EAPI const char *
+EVAS_API const char *
evas_textblock_string_escape_get(const char *string, int *len_ret)
{
if ((!string) || (!len_ret)) return NULL;
@@ -8417,7 +8682,7 @@ static void _evas_textblock_cursor_object_changed(Efl_Text_Cursor_Handle *cur)
Eo *cur_obj;
EINA_LIST_FOREACH(cur->cur_objs, l, cur_obj)
- efl_event_callback_call(cur_obj, EFL_TEXT_CURSOR_EVENT_CHANGED, NULL);
+ efl_event_callback_call(cur_obj, EFL_TEXT_CURSOR_OBJECT_EVENT_CHANGED, NULL);
}
static void
@@ -8432,7 +8697,7 @@ _cursor_emit_if_changed(Efl_Text_Cursor_Handle *cur)
/**
* @internal
- * prepends the escaped char beteewn s and s_end to the curosr
+ * Prepends the escaped char between s and s_end to the cursor
*
*
* @param s the start of the string
@@ -8474,37 +8739,55 @@ _evas_object_textblock_text_markup_set(Eo *eo_obj, Efl_Canvas_Textblock_Data *o,
}
}
+ if (o->paragraphs)
+ {
+ _paragraphs_free(o, obj, o->paragraphs);
+ o->paragraphs = NULL;
+ }
_nodes_clear(eo_obj);
- Efl_Text_Cursor_Handle *co = o->cursor;
- co->node = _evas_textblock_node_text_new();
+ if (o->cursor->pos != 0)
+ {
+ o->cursor->changed = EINA_TRUE;
+ o->cursor->pos = 0;
+ }
+
o->text_nodes = _NODE_TEXT(eina_inlist_append(
EINA_INLIST_GET(o->text_nodes),
- EINA_INLIST_GET(co->node)));
-
- evas_textblock_cursor_paragraph_first(o->cursor);
+ EINA_INLIST_GET(_evas_textblock_node_text_new())));
+ o->cursor->node = o->text_nodes;
evas_object_textblock_text_markup_prepend(o->cursor, text);
- efl_event_freeze(eo_obj);
- /* Point all the cursors to the starrt */
- {
- Eina_List *l;
- Efl_Text_Cursor_Handle *cur;
- evas_textblock_cursor_paragraph_first(o->cursor);
- EINA_LIST_FOREACH(o->cursors, l, cur)
+ Eina_List *l;
+ Efl_Text_Cursor_Handle *cur;
+ EINA_LIST_FOREACH(o->cursors, l, cur)
+ {
+ cur->node = o->text_nodes;
+ if (cur->pos != 0)
{
- evas_textblock_cursor_paragraph_first(cur);
- _evas_textblock_cursor_object_changed(cur);
+ cur->pos = 0;
+ cur->changed = EINA_TRUE;
}
+ }
+ _cursor_emit_if_changed(o->cursor);
+ EINA_LIST_FOREACH(o->cursors, l, cur)
+ {
+ _cursor_emit_if_changed(cur);
+ }
+ /*If there was no text markup_prepend will not call change function
+ So we will call it inside markup_set*/
+ if (!text || !*text)
+ {
+ efl_event_callback_call(eo_obj, EFL_CANVAS_TEXTBLOCK_EVENT_CHANGED, NULL);
+ _evas_textblock_changed(o, eo_obj);
}
- efl_event_thaw(eo_obj);
o->markup_text = text;
}
-EAPI void
+EVAS_API void
evas_object_textblock_text_markup_set(Eo *eo_obj, const char *text)
{
EINA_SAFETY_ON_NULL_RETURN(eo_obj);
@@ -8524,7 +8807,7 @@ static void
_evas_object_textblock_text_markup_prepend(Eo *eo_obj,
Efl_Text_Cursor_Handle *cur, const char *text)
{
- if (!cur) return;
+ if (!cur || !text || !*text) return;
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_HEAD();
@@ -8533,144 +8816,142 @@ _evas_object_textblock_text_markup_prepend(Eo *eo_obj,
* this should be done once, when markup_prepend finished */
o->pause_change = EINA_TRUE;
- if (text)
- {
- char *s, *p;
- char *tag_start, *tag_end, *esc_start, *esc_end;
-
- tag_start = tag_end = esc_start = esc_end = NULL;
- p = (char *)text;
- s = p;
- /* This loop goes through all of the mark up text until it finds format
- * tags, escape sequences or the terminating NULL. When it finds either
- * of those, it appends the text found up until that point to the textblock
- * proccesses whatever found. It repeats itself until the terminating
- * NULL is reached. */
- for (;;)
- {
- size_t text_len;
- /* If we got to the end of string or just finished/started tag
- * or escape sequence handling. */
- if ((*p == 0) ||
- (tag_end) || (esc_end) ||
- (tag_start) || (esc_start))
+ char *s, *p;
+ char *tag_start, *tag_end, *esc_start, *esc_end;
+
+ tag_start = tag_end = esc_start = esc_end = NULL;
+ p = (char *)text;
+ s = p;
+ /* This loop goes through all of the mark up text until it finds format
+ * tags, escape sequences or the terminating NULL. When it finds either
+ * of those, it appends the text found up until that point to the textblock
+ * proccesses whatever found. It repeats itself until the terminating
+ * NULL is reached. */
+ for (;;)
+ {
+ size_t text_len;
+ /* If we got to the end of string or just finished/started tag
+ * or escape sequence handling. */
+ if ((*p == 0) ||
+ (tag_end) || (esc_end) ||
+ (tag_start) || (esc_start))
+ {
+ if (tag_end)
{
- if (tag_end)
- {
- /* If we reached to a tag ending, analyze the tag */
- char *ttag;
- size_t ttag_len = tag_end - tag_start;
+ /* If we reached to a tag ending, analyze the tag */
+ char *ttag;
+ size_t ttag_len = tag_end - tag_start;
- ttag = malloc(ttag_len + 1);
- if (ttag)
- {
- memcpy(ttag, tag_start, ttag_len);
- ttag[ttag_len] = 0;
- evas_textblock_cursor_format_prepend(cur, ttag);
- free(ttag);
- }
- tag_start = tag_end = NULL;
- }
- else if (esc_end)
- {
- _prepend_escaped_char(cur, esc_start, esc_end + 1);
- esc_start = esc_end = NULL;
- }
- else if (*p == 0 && esc_start) /* escape start with no end, append it as text */
- {
- _prepend_text_run(cur, esc_start, p);
- esc_start = esc_end = NULL;
- s = NULL;
- }
- else if (*p == 0)
+ ttag = malloc(ttag_len + 1);
+ if (ttag)
{
- _prepend_text_run(cur, s, p);
- s = NULL;
+ memcpy(ttag, tag_start, ttag_len);
+ ttag[ttag_len] = 0;
+ evas_textblock_cursor_format_prepend(cur, ttag);
+ free(ttag);
}
- if (*p == 0)
- break;
+ tag_start = tag_end = NULL;
}
- if (*p == '<')
+ else if (esc_end)
{
- if (esc_start) /* escape start with no end, append it as text */
- {
- _prepend_text_run(cur, esc_start, p);
- esc_start = esc_end = NULL;
- s = NULL;
- }
- if (!esc_start)
- {
- /* Append the text prior to this to the textblock and mark
- * the start of the tag */
- tag_start = p;
- tag_end = NULL;
- _prepend_text_run(cur, s, p);
- s = NULL;
- }
+ _prepend_escaped_char(cur, esc_start, esc_end + 1);
+ esc_start = esc_end = NULL;
}
- else if (*p == '>')
+ else if (*p == 0 && esc_start) /* escape start with no end, append it as text */
{
- if (tag_start)
- {
- tag_end = p + 1;
- s = p + 1;
- }
+ _prepend_text_run(cur, esc_start, p);
+ esc_start = esc_end = NULL;
+ s = NULL;
}
- else if (*p == '&')
+ else if (*p == 0)
{
- if (esc_start) /* escape start with no end, append it as text */
- {
- _prepend_text_run(cur, esc_start, p);
- esc_start = esc_end = NULL;
- s = NULL;
- }
- if (!tag_start)
- {
- /* Append the text prior to this to the textblock and mark
- * the start of the escape sequence */
- esc_start = p;
- esc_end = NULL;
- _prepend_text_run(cur, s, p);
- s = NULL;
- }
+ _prepend_text_run(cur, s, p);
+ s = NULL;
}
- else if (*p == ';')
+ if (*p == 0)
+ break;
+ }
+ if (*p == '<')
+ {
+ if (esc_start) /* escape start with no end, append it as text */
{
- if (esc_start)
- {
- esc_end = p;
- s = p + 1;
- }
+ _prepend_text_run(cur, esc_start, p);
+ esc_start = esc_end = NULL;
+ s = NULL;
}
- /* Unicode object replacement char */
- else if (!strncmp(_REPLACEMENT_CHAR_UTF8, p,
- text_len = strlen(_REPLACEMENT_CHAR_UTF8)) ||
- !strncmp(_NEWLINE_UTF8, p,
- text_len = strlen(_NEWLINE_UTF8)) ||
- !strncmp(_TAB_UTF8, p,
- text_len = strlen(_TAB_UTF8)) ||
- !strncmp(_PARAGRAPH_SEPARATOR_UTF8, p,
- text_len = strlen(_PARAGRAPH_SEPARATOR_UTF8)))
+ if (!esc_start)
{
- /*FIXME: currently just remove them, maybe do something
- * fancier in the future, atm it breaks if this char
- * is inside <> */
+ /* Append the text prior to this to the textblock and mark
+ * the start of the tag */
+ tag_start = p;
+ tag_end = NULL;
_prepend_text_run(cur, s, p);
- /* it's also advanced later in this loop need +text_len
- in total*/
- p += text_len - 1;
- s = p + 1; /* One after the end of the replacement char */
+ s = NULL;
+ }
+ }
+ else if (*p == '>')
+ {
+ if (tag_start)
+ {
+ tag_end = p + 1;
+ s = p + 1;
+ }
+ }
+ else if (*p == '&')
+ {
+ if (esc_start) /* escape start with no end, append it as text */
+ {
+ _prepend_text_run(cur, esc_start, p);
+ esc_start = esc_end = NULL;
+ s = NULL;
+ }
+ if (!tag_start)
+ {
+ /* Append the text prior to this to the textblock and mark
+ * the start of the escape sequence */
+ esc_start = p;
+ esc_end = NULL;
+ _prepend_text_run(cur, s, p);
+ s = NULL;
+ }
+ }
+ else if (*p == ';')
+ {
+ if (esc_start)
+ {
+ esc_end = p;
+ s = p + 1;
}
- p++;
}
+ /* Unicode object replacement char */
+ else if (!strncmp(_REPLACEMENT_CHAR_UTF8, p,
+ text_len = strlen(_REPLACEMENT_CHAR_UTF8)) ||
+ !strncmp(_NEWLINE_UTF8, p,
+ text_len = strlen(_NEWLINE_UTF8)) ||
+ !strncmp(_TAB_UTF8, p,
+ text_len = strlen(_TAB_UTF8)) ||
+ !strncmp(_PARAGRAPH_SEPARATOR_UTF8, p,
+ text_len = strlen(_PARAGRAPH_SEPARATOR_UTF8)))
+ {
+ /*FIXME: currently just remove them, maybe do something
+ * fancier in the future, atm it breaks if this char
+ * is inside <> */
+ _prepend_text_run(cur, s, p);
+ /* it's also advanced later in this loop need +text_len
+ in total*/
+ p += text_len - 1;
+ s = p + 1; /* One after the end of the replacement char */
+ }
+ p++;
}
o->pause_change = EINA_FALSE;
+ efl_event_callback_call(cur->obj, EFL_CANVAS_TEXTBLOCK_EVENT_CHANGED, NULL);
_evas_textblock_changed(o, eo_obj);
}
-EAPI void
+EVAS_API void
evas_object_textblock_text_markup_prepend(Efl_Text_Cursor_Handle *cur, const char *text)
{
EINA_SAFETY_ON_NULL_RETURN(cur);
@@ -8709,6 +8990,7 @@ static void
_markup_get_text_utf8_append(Eina_Strbuf *sbuf, const char *text)
{
int ch, pos = 0, pos2 = 0;
+ const char * replacement;
for (;;)
{
@@ -8720,23 +9002,21 @@ _markup_get_text_utf8_append(Eina_Strbuf *sbuf, const char *text)
eina_strbuf_append(sbuf, "<br/>");
else if (ch == _TAB)
eina_strbuf_append(sbuf, "<tab/>");
- else if (ch == '<')
- eina_strbuf_append(sbuf, "&lt;");
- else if (ch == '>')
- eina_strbuf_append(sbuf, "&gt;");
- else if (ch == '&')
- eina_strbuf_append(sbuf, "&amp;");
- else if (ch == '"')
- eina_strbuf_append(sbuf, "&quot;");
- else if (ch == '\'')
- eina_strbuf_append(sbuf, "&apos;");
- else if (ch == _PARAGRAPH_SEPARATOR)
- eina_strbuf_append(sbuf, "<ps/>");
else if (ch == _REPLACEMENT_CHAR)
eina_strbuf_append(sbuf, "&#xfffc;");
- else if (ch != '\r')
+ else if (ch == _PARAGRAPH_SEPARATOR)
+ eina_strbuf_append(sbuf, "<ps/>");
+ else
{
- eina_strbuf_append_length(sbuf, text + pos, pos2 - pos);
+ replacement = _escaped_char_match(text + pos, NULL);
+ if (replacement)
+ {
+ eina_strbuf_append(sbuf, replacement);
+ }
+ else if (ch != '\r')
+ {
+ eina_strbuf_append_length(sbuf, text + pos, pos2 - pos);
+ }
}
}
}
@@ -8828,7 +9108,7 @@ _evas_object_textblock_text_markup_get(const Eo *eo_obj, Efl_Canvas_Textblock_Da
return markup;
}
-EAPI const char*
+EVAS_API const char*
evas_object_textblock_text_markup_get(Eo *eo_obj)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(eo_obj, NULL);
@@ -8842,7 +9122,7 @@ _efl_canvas_textblock_efl_text_markup_markup_get(const Eo *eo_obj, Efl_Canvas_Te
return _evas_object_textblock_text_markup_get(eo_obj, o);
}
-EAPI char *
+EVAS_API char *
evas_textblock_text_markup_to_utf8(const Evas_Object *eo_obj, const char *text)
{
/* FIXME: Redundant and awful, should be merged with markup_prepend */
@@ -9001,7 +9281,7 @@ evas_textblock_text_markup_to_utf8(const Evas_Object *eo_obj, const char *text)
return ret;
}
-EAPI char *
+EVAS_API char *
evas_textblock_text_utf8_to_markup(const Evas_Object *eo_obj EINA_UNUSED,
const char *text)
{
@@ -9201,7 +9481,7 @@ _layout_hyphen_item_new(Ctxt *c, const Evas_Object_Textblock_Text_Item *cur_ti)
if (c->hyphen_ti)
{
- _item_free(c->evas, c->o, c->evas_o, NULL, _ITEM(c->hyphen_ti));
+ _item_free(c->o, c->evas_o, NULL, _ITEM(c->hyphen_ti));
}
c->hyphen_ti = hyphen_ti = _layout_text_item_new(c, cur_ti->parent.format);
hyphen_ti->parent.text_node = cur_ti->parent.text_node;
@@ -9510,7 +9790,7 @@ _evas_textblock_cursor_init(Efl_Text_Cursor_Handle *cur, const Evas_Object *tb)
cur->pos = 0;
}
-EAPI Efl_Text_Cursor_Handle *
+EVAS_API Efl_Text_Cursor_Handle *
evas_object_textblock_cursor_new(const Evas_Object *eo_obj)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(eo_obj, NULL);
@@ -9530,7 +9810,7 @@ evas_object_textblock_cursor_new(const Evas_Object *eo_obj)
return cur;
}
-EAPI void
+EVAS_API void
evas_textblock_cursor_free(Evas_Textblock_Cursor *cur)
{
if (!cur) return;
@@ -9576,7 +9856,7 @@ evas_textblock_cursor_unref(Efl_Text_Cursor_Handle *cursor, Eo * cur_obj)
}
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
_evas_textblock_cursor_is_format(const Efl_Text_Cursor_Handle *cur)
{
if ((!cur) || (!cur->node)) return EINA_FALSE;
@@ -9586,13 +9866,13 @@ _evas_textblock_cursor_is_format(const Efl_Text_Cursor_Handle *cur)
EINA_TRUE : EINA_FALSE;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur)
{
return _evas_textblock_cursor_is_format(cur);
}
-EAPI const Eina_List *
+EVAS_API const Eina_List *
evas_textblock_node_format_list_get(const Eo *eo_obj, const char *anchor)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(eo_obj, NULL);
@@ -9606,7 +9886,7 @@ evas_textblock_node_format_list_get(const Eo *eo_obj, const char *anchor)
return NULL;
}
-EAPI const Evas_Object_Textblock_Node_Format*
+EVAS_API const Evas_Object_Textblock_Node_Format*
evas_textblock_node_format_first_get(Evas_Object *eo_obj)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(eo_obj, NULL);
@@ -9616,7 +9896,7 @@ evas_textblock_node_format_first_get(Evas_Object *eo_obj)
return o->format_nodes;
}
-EAPI const Evas_Object_Textblock_Node_Format*
+EVAS_API const Evas_Object_Textblock_Node_Format*
evas_textblock_node_format_last_get(Evas_Object *eo_obj)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(eo_obj, NULL);
@@ -9626,21 +9906,21 @@ evas_textblock_node_format_last_get(Evas_Object *eo_obj)
return o->format_nodes ? _NODE_FORMAT(EINA_INLIST_GET(o->format_nodes)->last) : NULL;
}
-EAPI const Evas_Object_Textblock_Node_Format *
+EVAS_API const Evas_Object_Textblock_Node_Format *
evas_textblock_node_format_next_get(const Evas_Object_Textblock_Node_Format *n)
{
if (!n) return NULL;
return _NODE_FORMAT(EINA_INLIST_GET(n)->next);
}
-EAPI const Evas_Object_Textblock_Node_Format *
+EVAS_API const Evas_Object_Textblock_Node_Format *
evas_textblock_node_format_prev_get(const Evas_Object_Textblock_Node_Format *n)
{
if (!n) return NULL;
return _NODE_FORMAT(EINA_INLIST_GET(n)->prev);
}
-EAPI void
+EVAS_API void
evas_textblock_node_format_remove_pair(Eo *eo_obj, Evas_Object_Textblock_Node_Format *n)
{
EINA_SAFETY_ON_NULL_RETURN(eo_obj);
@@ -9750,7 +10030,7 @@ found:
_evas_textblock_changed(o, eo_obj);
}
-EAPI void
+EVAS_API void
evas_textblock_cursor_paragraph_first(Efl_Text_Cursor_Handle *cur)
{
if (!cur) return;
@@ -9762,7 +10042,7 @@ evas_textblock_cursor_paragraph_first(Efl_Text_Cursor_Handle *cur)
_evas_textblock_cursor_object_changed(cur);
}
-EAPI void
+EVAS_API void
evas_textblock_cursor_paragraph_last(Efl_Text_Cursor_Handle *cur)
{
Evas_Object_Textblock_Node_Text *node;
@@ -9811,7 +10091,7 @@ _evas_textblock_cursor_paragraph_next(Efl_Text_Cursor_Handle *cur)
return EINA_FALSE;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_paragraph_next(Efl_Text_Cursor_Handle *cur)
{
Eina_Bool b_ret = EINA_FALSE;
@@ -9850,7 +10130,7 @@ _evas_textblock_cursor_paragraph_prev(Efl_Text_Cursor_Handle *cur)
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_paragraph_prev(Efl_Text_Cursor_Handle *cur)
{
Eina_Bool b_ret = EINA_FALSE;
@@ -9860,13 +10140,13 @@ evas_textblock_cursor_paragraph_prev(Efl_Text_Cursor_Handle *cur)
return b_ret;
}
-EAPI void
+EVAS_API void
evas_textblock_cursor_set_at_format(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *n)
{
evas_textblock_cursor_at_format_set(cur, n);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur)
{
Evas_Object_Textblock_Node_Format *node;
@@ -9905,7 +10185,7 @@ evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur)
return EINA_FALSE;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur)
{
const Evas_Object_Textblock_Node_Format *node;
@@ -9947,7 +10227,7 @@ evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur)
#define BREAK_AFTER(i) \
(breaks[i] == WORDBREAK_BREAK)
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_word_start(Efl_Text_Cursor_Handle *cur)
{
if (!cur) return EINA_FALSE;
@@ -9973,7 +10253,7 @@ evas_textblock_cursor_word_start(Efl_Text_Cursor_Handle *cur)
if ((cur->pos > 0) && (cur->pos == len))
cur->pos--;
- for (i = cur->pos ; _is_white(text[i]) && BREAK_AFTER(i) ; i--)
+ for (i = cur->pos ; _is_white(text[i]) ; i--)
{
if (i == 0)
{
@@ -10013,7 +10293,7 @@ evas_textblock_cursor_word_start(Efl_Text_Cursor_Handle *cur)
return EINA_FALSE;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_word_end(Efl_Text_Cursor_Handle *cur)
{
if (!cur) return EINA_FALSE;
@@ -10040,7 +10320,7 @@ evas_textblock_cursor_word_end(Efl_Text_Cursor_Handle *cur)
set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks);
}
- for (i = cur->pos; text[i] && _is_white(text[i]) && (BREAK_AFTER(i)) ; i++);
+ for (i = cur->pos; text[i] && _is_white(text[i]) ; i++);
if (i == len)
{
Evas_Object_Textblock_Node_Text *nnode;
@@ -10216,7 +10496,7 @@ _evas_textblock_cursor_cluster_pos_get(Evas_Textblock_Cursor *cur, Eina_Bool inc
Eina_Unicode content = 0;
if (!inc && cur->pos > 0)
content = eina_ustrbuf_string_get(cur->node->unicode)[cur->pos - 1];
- else if (inc && cur->pos >= 0 && eina_ustrbuf_length_get(cur->node->unicode) > (cur->pos + 1))
+ else if (inc && eina_ustrbuf_length_get(cur->node->unicode) > (cur->pos + 1))
content = eina_ustrbuf_string_get(cur->node->unicode)[cur->pos + 1];
if (VAR_SEQ(content)) *is_single_glyph = EINA_TRUE;
}
@@ -10231,7 +10511,7 @@ _evas_textblock_cursor_cluster_pos_get(Evas_Textblock_Cursor *cur, Eina_Bool inc
return ret;
}
-EAPI Eina_Bool evas_textblock_cursor_at_cluster_as_single_glyph(Evas_Textblock_Cursor *cur,Eina_Bool forward)
+EVAS_API Eina_Bool evas_textblock_cursor_at_cluster_as_single_glyph(Evas_Textblock_Cursor *cur,Eina_Bool forward)
{
Eina_Bool is_single_glyph = EINA_FALSE;
size_t ret = _evas_textblock_cursor_cluster_pos_get(cur, forward, &is_single_glyph);
@@ -10324,7 +10604,7 @@ _evas_textblock_cursor_prev(Evas_Textblock_Cursor *cur, Eina_Bool per_cluster)
return evas_textblock_cursor_paragraph_prev(cur);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_char_next(Efl_Text_Cursor_Handle *cur)
{
Eina_Bool b_ret = _evas_textblock_cursor_next(cur, EINA_FALSE);
@@ -10332,7 +10612,7 @@ evas_textblock_cursor_char_next(Efl_Text_Cursor_Handle *cur)
return b_ret;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_char_prev(Efl_Text_Cursor_Handle *cur)
{
Eina_Bool b_ret = _evas_textblock_cursor_prev(cur, EINA_FALSE);
@@ -10340,7 +10620,7 @@ evas_textblock_cursor_char_prev(Efl_Text_Cursor_Handle *cur)
return b_ret;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_cluster_next(Efl_Text_Cursor_Handle *cur)
{
Eina_Bool b_ret = _evas_textblock_cursor_next(cur, EINA_TRUE);
@@ -10348,7 +10628,7 @@ evas_textblock_cursor_cluster_next(Efl_Text_Cursor_Handle *cur)
return b_ret;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_cluster_prev(Efl_Text_Cursor_Handle *cur)
{
Eina_Bool b_ret = _evas_textblock_cursor_prev(cur, EINA_TRUE);
@@ -10356,7 +10636,7 @@ evas_textblock_cursor_cluster_prev(Efl_Text_Cursor_Handle *cur)
return b_ret;
}
-EAPI void
+EVAS_API void
evas_textblock_cursor_paragraph_char_first(Efl_Text_Cursor_Handle *cur)
{
if (!cur) return;
@@ -10366,7 +10646,7 @@ evas_textblock_cursor_paragraph_char_first(Efl_Text_Cursor_Handle *cur)
_evas_textblock_cursor_object_changed(cur);
}
-EAPI void
+EVAS_API void
evas_textblock_cursor_paragraph_char_last(Efl_Text_Cursor_Handle *cur)
{
int ind;
@@ -10416,7 +10696,7 @@ _cursor_line_first_char_get(Evas_Object_Textblock_Line *ln,
}
}
-EAPI void
+EVAS_API void
evas_textblock_cursor_line_char_first(Efl_Text_Cursor_Handle *cur)
{
Evas_Object_Textblock_Line *ln = NULL;
@@ -10441,7 +10721,7 @@ evas_textblock_cursor_line_char_first(Efl_Text_Cursor_Handle *cur)
_evas_textblock_cursor_object_changed(cur);
}
-EAPI void
+EVAS_API void
evas_textblock_cursor_line_char_last(Efl_Text_Cursor_Handle *cur)
{
Evas_Object_Textblock_Line *ln = NULL;
@@ -10515,7 +10795,7 @@ _evas_textblock_format_is_visible(Evas_Object_Textblock_Node_Format *fnode,
fnode->format_change = EINA_TRUE;
}
- while ((item = _format_parse(&s)))
+ while ((item = _format_parse(&s, EINA_FALSE)))
{
int itlen = s - item;
/* We care about all of the formats even after a - except for
@@ -10779,6 +11059,9 @@ _evas_textblock_node_text_adjust_offsets_to_start(Efl_Canvas_Textblock_Data *o,
size_t pos = 0;
int orig_end;
+ if ((start == 0) && (end == 0))
+ return EINA_FALSE;
+
itr = n->format_node;
if (!itr || (itr->text_node != n)) return EINA_FALSE;
@@ -10846,7 +11129,7 @@ _evas_textblock_node_text_adjust_offsets_to_start(Efl_Canvas_Textblock_Data *o,
if (_IS_PARAGRAPH_SEPARATOR(o, last_node->format))
{
_evas_textblock_node_format_remove(o, last_node, 0);
- return EINA_TRUE;
+ return o->multiline;//if single nothing to merge
}
}
@@ -10936,7 +11219,7 @@ _evas_textblock_node_format_pos_get(const Evas_Object_Textblock_Node_Format *fmt
return position + fmt->offset;
}
-EAPI int
+EVAS_API int
evas_textblock_cursor_pos_get(const Efl_Text_Cursor_Handle *cur)
{
if (!cur) return -1;
@@ -10956,7 +11239,7 @@ evas_textblock_cursor_pos_get(const Efl_Text_Cursor_Handle *cur)
return npos + cur->pos;
}
-EAPI void
+EVAS_API void
evas_textblock_cursor_pos_set(Efl_Text_Cursor_Handle *cur, int _pos)
{
Evas_Object_Textblock_Node_Text *n;
@@ -11004,7 +11287,7 @@ evas_textblock_cursor_pos_set(Efl_Text_Cursor_Handle *cur, int _pos)
_evas_textblock_cursor_object_changed(cur);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line)
{
Evas_Object_Textblock_Line *ln;
@@ -11025,7 +11308,7 @@ evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line)
return EINA_TRUE;
}
-EAPI void
+EVAS_API void
evas_textblock_cursor_line_jump_by(Efl_Text_Cursor_Handle *cur, int by)
{
if (!cur) return;
@@ -11087,7 +11370,7 @@ evas_textblock_cursor_line_jump_by(Efl_Text_Cursor_Handle *cur, int by)
}
}
-EAPI int
+EVAS_API int
evas_textblock_cursor_compare(const Efl_Text_Cursor_Handle *cur1,
const Efl_Text_Cursor_Handle *cur2)
{
@@ -11116,14 +11399,14 @@ evas_textblock_cursor_compare(const Efl_Text_Cursor_Handle *cur1,
return 0;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_equal(const Evas_Textblock_Cursor *cur1,
const Evas_Textblock_Cursor *cur2)
{
return ((cur1->node == cur2->node) && (cur1->pos == cur2->pos));
}
-EAPI void
+EVAS_API void
evas_textblock_cursor_copy(const Evas_Textblock_Cursor *cur_src, Efl_Text_Cursor_Handle *cur_dest)
{
if (!cur_src || !cur_dest) return;
@@ -11390,6 +11673,10 @@ _evas_textblock_changed(Efl_Canvas_Textblock_Data *o, Evas_Object *eo_obj)
o->markup_text = NULL;
}
}
+ else
+ {
+ _evas_clear_main_format(eo_obj, o);
+ }
// FIXME: emit ONCE after this following checks
_cursor_emit_if_changed(o->cursor);
@@ -11506,7 +11793,7 @@ _evas_textblock_cursor_text_append(Efl_Text_Cursor_Handle *cur, const char *_tex
return len;
}
-EAPI int
+EVAS_API int
evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *_text)
{
return _evas_textblock_cursor_text_append(cur, _text);
@@ -11526,7 +11813,7 @@ _evas_textblock_cursor_text_prepend(Efl_Text_Cursor_Handle *cur, const char *_te
return len;
}
-EAPI int
+EVAS_API int
evas_textblock_cursor_text_prepend(Efl_Text_Cursor_Handle *cur, const char *_text)
{
return _evas_textblock_cursor_text_prepend(cur, _text);
@@ -11593,12 +11880,15 @@ _evas_textblock_node_format_new(Efl_Canvas_Textblock_Data *o, const char *_forma
format_len--; /* We don't care about '/' */
n->own_closer = EINA_TRUE;
}
- else if (format_len == 2)
+ else if (format_len < 4)
{
+ /* br,ps,tab are already own_closer without '/' */
char tmp[format_len + 1];
strncpy(tmp, format, format_len);
tmp[format_len] = '\0';
- if (_IS_PARAGRAPH_SEPARATOR(o, tmp))
+ if (_IS_PARAGRAPH_SEPARATOR(o, tmp) ||
+ _IS_LINE_SEPARATOR(tmp) ||
+ _IS_TAB(tmp))
{
n->own_closer = EINA_TRUE;
}
@@ -11816,7 +12106,8 @@ _evas_textblock_cursor_format_append(Efl_Text_Cursor_Handle *cur,
_evas_textblock_cursors_update_offset(cur, cur->node, cur->pos, 1);
if (_IS_PARAGRAPH_SEPARATOR(o, format))
{
- _evas_textblock_cursor_break_paragraph(cur, n, EINA_TRUE);
+ if (o->multiline)
+ _evas_textblock_cursor_break_paragraph(cur, n, EINA_TRUE);
}
else
{
@@ -11841,7 +12132,7 @@ _evas_textblock_cursor_format_append(Efl_Text_Cursor_Handle *cur,
return is_visible;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *format)
{
return _evas_textblock_cursor_format_append(cur, format, NULL, EINA_FALSE);
@@ -11866,13 +12157,13 @@ _evas_textblock_cursor_format_prepend(Efl_Text_Cursor_Handle *cur, const char *f
return is_visible;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format)
{
return _evas_textblock_cursor_format_prepend(cur, format);
}
-EAPI void
+EVAS_API void
evas_textblock_cursor_char_delete(Efl_Text_Cursor_Handle *cur)
{
Evas_Object_Textblock_Node_Text *n, *n2;
@@ -11951,7 +12242,7 @@ evas_textblock_cursor_char_delete(Efl_Text_Cursor_Handle *cur)
_evas_textblock_cursor_object_changed(cur);
}
-EAPI void
+EVAS_API void
evas_textblock_cursor_range_delete(Efl_Text_Cursor_Handle *cur1, Efl_Text_Cursor_Handle *cur2)
{
if (!cur1) return;
@@ -12058,7 +12349,7 @@ evas_textblock_cursor_range_delete(Efl_Text_Cursor_Handle *cur1, Efl_Text_Cursor
efl_event_callback_call(cur1->obj, EFL_CANVAS_TEXTBLOCK_EVENT_CHANGED, NULL);
}
-EAPI char *
+EVAS_API char *
evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur)
{
if (!cur || !cur->node) return NULL;
@@ -12256,7 +12547,7 @@ _evas_textblock_cursor_range_text_plain_get(const Efl_Text_Cursor_Handle *cur1,
}
}
-EAPI Eina_List *
+EVAS_API Eina_List *
evas_textblock_cursor_range_formats_get(const Efl_Text_Cursor_Handle *cur1, const Evas_Textblock_Cursor *cur2)
{
Evas_Object *eo_obj;
@@ -12348,13 +12639,13 @@ _evas_textblock_cursor_range_text_get(const Efl_Text_Cursor_Handle *cur1, const
}
// Add to legacy api
-EAPI char *
+EVAS_API char *
evas_textblock_cursor_range_text_get(const Efl_Text_Cursor_Handle *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format)
{
return _evas_textblock_cursor_range_text_get(cur1, cur2, format);
}
-EAPI const char *
+EVAS_API const char *
evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur)
{
Efl_Text_Cursor_Handle cur1, cur2;
@@ -12377,7 +12668,7 @@ evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur)
return cur->node->utf8;
}
-EAPI int
+EVAS_API int
evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur)
{
int len;
@@ -12393,7 +12684,7 @@ evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur
return len;
}
-EAPI const Evas_Object_Textblock_Node_Format *
+EVAS_API const Evas_Object_Textblock_Node_Format *
evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur)
{
if (!cur) return NULL;
@@ -12403,7 +12694,7 @@ evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur)
return _evas_textblock_cursor_node_format_at_pos_get(cur);
}
-EAPI const char *
+EVAS_API const char *
evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *fmt)
{
static char *ret = NULL;
@@ -12454,7 +12745,7 @@ _evas_textblock_cursor_at_format_set(Efl_Text_Cursor_Handle *cur,
cur->pos = _evas_textblock_node_format_pos_get(fmt);
}
-EAPI void
+EVAS_API void
evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt)
{
_evas_textblock_cursor_at_format_set(cur, fmt);
@@ -12474,7 +12765,7 @@ _evas_textblock_cursor_format_is_visible_get(const Efl_Text_Cursor_Handle *cur)
return EVAS_TEXTBLOCK_IS_VISIBLE_FORMAT_CHAR(text[cur->pos]);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur)
{
return _evas_textblock_cursor_format_is_visible_get(cur);
@@ -12500,7 +12791,7 @@ _find_layout_line_by_item(Evas_Object_Textblock_Paragraph *par, Evas_Object_Text
}
#endif
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_geometry_bidi_get(const Efl_Text_Cursor_Handle *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_Coord *cx2, Evas_Coord *cy2, Evas_Coord *cw2, Evas_Coord *ch2, Evas_Textblock_Cursor_Type ctype)
{
if (!cur) return EINA_FALSE;
@@ -12685,7 +12976,7 @@ evas_textblock_cursor_geometry_bidi_get(const Efl_Text_Cursor_Handle *cur, Evas_
return EINA_FALSE;
}
-EAPI int
+EVAS_API int
evas_textblock_cursor_geometry_get(const Efl_Text_Cursor_Handle *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_BiDi_Direction *dir, Evas_Textblock_Cursor_Type ctype)
{
int ret = -1;
@@ -12875,7 +13166,7 @@ _evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *dat
return ln->par->line_no + ln->line_no;
}
-EAPI int
+EVAS_API int
evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
{
if (!cur) return -1;
@@ -12885,7 +13176,7 @@ evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C
ENFN->font_char_coords_get, cur, cx, cy, cw, ch);
}
-EAPI int
+EVAS_API int
evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
{
if (!cur) return -1;
@@ -12895,7 +13186,7 @@ evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Co
ENFN->font_pen_coords_get, cur, cx, cy, cw, ch);
}
-EAPI int
+EVAS_API int
evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
{
Evas_Object_Textblock_Line *ln = NULL;
@@ -12929,7 +13220,7 @@ evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C
return ln->par->line_no + ln->line_no;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_visible_range_get(Efl_Text_Cursor_Handle *start, Evas_Textblock_Cursor *end)
{
Eo * eo_obj = start->obj;
@@ -12952,11 +13243,11 @@ evas_textblock_cursor_visible_range_get(Efl_Text_Cursor_Handle *start, Evas_Text
EOLIAN static Eina_Bool
_efl_canvas_textblock_visible_range_get(Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Textblock_Data *pd EINA_UNUSED,
- Efl_Text_Cursor *start, Efl_Text_Cursor *end)
+ Efl_Text_Cursor_Object *start, Efl_Text_Cursor_Object *end)
{
return evas_textblock_cursor_visible_range_get(
- efl_text_cursor_handle_get(start),
- efl_text_cursor_handle_get(end)
+ efl_text_cursor_object_handle_get(start),
+ efl_text_cursor_object_handle_get(end)
);
}
@@ -13052,21 +13343,26 @@ _evas_textblock_cursor_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_
* try to move cursor to a nearest breakable position. */
if (grapheme_breaks && (grapheme_breaks[pos + it->text_pos - 1] != GRAPHEMEBREAK_BREAK))
{
- size_t left_index = pos + it->text_pos - 1;
+ int left_index = pos + it->text_pos - 1;
size_t right_index = pos + it->text_pos - 1;
+ int temp_index;
int lx, rx;
/* To the left */
- while ((left_index > 0) &&
+ while ((left_index >= 0) &&
(grapheme_breaks[left_index] != GRAPHEMEBREAK_BREAK))
{
left_index--;
}
+ temp_index = left_index - it->text_pos + 1;
+ if (temp_index < 0)
+ temp_index = 0;
+
ENFN->font_pen_coords_get(ENC,
ti->parent.format->font.font,
&ti->text_props,
- left_index - it->text_pos + 1,
+ temp_index,
&lx, NULL, NULL, NULL);
/* To the right */
@@ -13130,7 +13426,7 @@ _evas_textblock_cursor_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_
if (o->paragraphs)
{
Evas_Object_Textblock_Line *first_line = o->paragraphs->lines;
- if (y >= o->paragraphs->y + o->formatted.h)
+ if (y >= o->paragraphs->y + o->formatted.h + o->style_pad.t + o->style_pad.b)
{
/* If we are after the last paragraph, use the last position in the
* text. */
@@ -13154,19 +13450,19 @@ end:
return ret;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y)
{
return _evas_textblock_cursor_coord_set(cur, x, y, EINA_FALSE);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_cluster_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y)
{
return _evas_textblock_cursor_coord_set(cur, x, y, EINA_TRUE);
}
-EAPI int
+EVAS_API int
evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y)
{
Evas_Object_Textblock_Paragraph *found_par;
@@ -13204,7 +13500,7 @@ evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y)
}
}
}
- else if (o->paragraphs && (y >= o->paragraphs->y + o->formatted.h))
+ else if (o->paragraphs && (y >= o->paragraphs->y + o->formatted.h + o->style_pad.t + o->style_pad.b))
{
int line_no = 0;
/* If we are after the last paragraph, use the last position in the
@@ -13590,7 +13886,7 @@ _line_fill_rect_get(const Evas_Object_Textblock_Line *ln,
return tr;
}
-EAPI Eina_Iterator *
+EVAS_API Eina_Iterator *
evas_textblock_cursor_range_simple_geometry_get(const Efl_Text_Cursor_Handle *cur1, const Evas_Textblock_Cursor *cur2)
{
if (!cur1) return NULL;
@@ -13773,7 +14069,7 @@ _efl_canvas_textblock_range_geometry_list_get(Eo *eo_obj EINA_UNUSED,
return rects;
}
-EAPI Eina_List *
+EVAS_API Eina_List *
evas_textblock_cursor_range_geometry_get(const Efl_Text_Cursor_Handle *cur1, const Evas_Textblock_Cursor *cur2_obj)
{
Efl_Canvas_Textblock_Data *o;
@@ -13816,13 +14112,13 @@ _evas_textblock_cursor_format_item_geometry_get(const Efl_Text_Cursor_Handle *cu
return EINA_TRUE;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
{
return _evas_textblock_cursor_format_item_geometry_get(cur, cx, cy, cw, ch);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur)
{
Eina_Bool ret = EINA_FALSE;
@@ -13842,7 +14138,7 @@ evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur)
}
/* general controls */
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_textblock_line_number_geometry_get(const Eo *eo_obj, int line, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(eo_obj, EINA_FALSE);
@@ -13868,17 +14164,13 @@ _evas_object_textblock_clear(Evas_Object *eo_obj)
Eina_List *l;
Efl_Text_Cursor_Handle *cur;
Efl_Text_Cursor_Handle *co;
- Evas *eo_e;
- Evas_Public_Data *evas;
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
- eo_e = evas_object_evas_get(eo_obj);
- evas = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
evas_object_async_block(obj);
Efl_Canvas_Textblock_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
if (o->paragraphs)
{
- _paragraphs_free(evas, o, obj, o->paragraphs);
+ _paragraphs_free(o, obj, o->paragraphs);
o->paragraphs = NULL;
}
@@ -13897,7 +14189,7 @@ _evas_object_textblock_clear(Evas_Object *eo_obj)
_evas_textblock_changed(o, eo_obj);
}
-EAPI void
+EVAS_API void
evas_object_textblock_clear(Evas_Object *eo_obj)
{
TB_HEAD();
@@ -14259,7 +14551,7 @@ evas_object_textblock_init(Evas_Object *eo_obj)
linebreak_init = EINA_TRUE;
init_linebreak();
init_wordbreak();
- init_graphemebreak();
+ init_graphemebreak();
}
o = obj->private_data;
@@ -14337,11 +14629,7 @@ evas_object_textblock_free(Evas_Object *eo_obj)
if (o->repch) eina_stringshare_del(o->repch);
if (o->ellip_ti)
{
- Evas *eo_e;
- Evas_Public_Data *evas;
- eo_e = evas_object_evas_get(eo_obj);
- evas = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
- _item_free(evas, o, obj, NULL, _ITEM(o->ellip_ti));
+ _item_free(o, obj, NULL, _ITEM(o->ellip_ti));
}
if (o->bidi_delimiters) eina_stringshare_del(o->bidi_delimiters);
_format_command_shutdown();
@@ -14357,6 +14645,8 @@ evas_object_textblock_free(Evas_Object *eo_obj)
o->fit_content_config.p_size_array = NULL;
}
+ _evas_clear_main_format(eo_obj, o);
+
#ifdef HAVE_HYPHEN
/* Hyphenation */
if (o->hyphenating)
@@ -15345,6 +15635,7 @@ _efl_canvas_textblock_efl_gfx_filter_filter_data_set(Eo *obj, Efl_Canvas_Textblo
else
{
db = calloc(1, sizeof(*db));
+ if (!db) return;
pd->gfx_filter.data_bindings = (Evas_Filter_Data_Binding *)
eina_inlist_append(EINA_INLIST_GET(pd->gfx_filter.data_bindings), EINA_INLIST_GET(db));
db->name = eina_stringshare_add(name);
@@ -15407,6 +15698,7 @@ _efl_canvas_textblock_efl_gfx_filter_filter_source_set(Eo *eo_obj, Efl_Canvas_Te
else
{
pb = calloc(1, sizeof(*pb));
+ if (!pb) return;
pb->eo_proxy = eo_obj;
pb->eo_source = eo_source;
pb->name = eina_stringshare_add(name);
@@ -15515,8 +15807,8 @@ evas_object_textblock_coords_recalc(Evas_Object *eo_obj,
static void
evas_object_textblock_render_pre(Evas_Object *eo_obj,
- Evas_Object_Protected_Data *obj,
- void *type_private_data)
+ Evas_Object_Protected_Data *obj,
+ void *type_private_data)
{
Efl_Canvas_Textblock_Data *o = type_private_data;
ASYNC_BLOCK;
@@ -15544,13 +15836,13 @@ evas_object_textblock_render_pre(Evas_Object *eo_obj,
}
//evas_object_textblock_coords_recalc(eo_obj, obj, obj->private_data);
- if (!_relayout_if_needed(eo_obj, o))
+ is_v = evas_object_is_visible(obj);
+ was_v = evas_object_was_visible(obj);
+ if (is_v && !_relayout_if_needed(eo_obj, o))
{
o->redraw = 0;
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
eo_obj, obj);
- is_v = evas_object_is_visible(obj);
- was_v = evas_object_was_visible(obj);
goto done;
}
if (o->changed)
@@ -15559,8 +15851,6 @@ evas_object_textblock_render_pre(Evas_Object *eo_obj,
o->redraw = 0;
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
eo_obj, obj);
- is_v = evas_object_is_visible(obj);
- was_v = evas_object_was_visible(obj);
goto done;
}
@@ -15569,14 +15859,10 @@ evas_object_textblock_render_pre(Evas_Object *eo_obj,
o->redraw = 0;
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
eo_obj, obj);
- is_v = evas_object_is_visible(obj);
- was_v = evas_object_was_visible(obj);
goto done;
}
/* now figure what changed and add draw rects */
/* if it just became visible or invisible */
- is_v = evas_object_is_visible(obj);
- was_v = evas_object_was_visible(obj);
if (is_v != was_v)
{
evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes,
@@ -16081,7 +16367,7 @@ _evas_textblock_annotations_insert(Eo *eo_obj, Efl_Text_Cursor_Handle *start, Ef
/* Sanitize the string and reject format items, closing '/' marks. */
buf = eina_strbuf_new();
- while ((item = _format_parse(&format)))
+ while ((item = _format_parse(&format, EINA_FALSE)))
{
int itlen = format - item;
/* We care about all of the formats even after a - except for
@@ -16132,6 +16418,7 @@ static void
_canvas_text_format_changed(Eo *eo_obj, Efl_Canvas_Textblock_Data *o)
{
o->format_changed = EINA_TRUE;
+ _evas_clear_main_format(eo_obj, o);
_evas_textblock_invalidate_all(o);
_evas_textblock_changed(o, eo_obj);
efl_event_callback_call(eo_obj, EFL_CANVAS_TEXTBLOCK_EVENT_CHANGED, NULL);
@@ -16349,6 +16636,10 @@ _efl_canvas_textblock_efl_text_font_properties_font_bitmap_scalable_get(const Eo
if (_FMT(x) == v) return; \
_FMT(x) = v; \
_canvas_text_format_changed(obj, o);
+#define _FMT_SETD(x, v) \
+ if (EINA_DBL_EQ(_FMT(x), v)) return; \
+ _FMT(x) = v; \
+ _canvas_text_format_changed(obj, o);
/* Helper: updates format field of extended format information, and informs if changed. */
#define _FMT_INFO_SET_START(x, v) \
@@ -16412,19 +16703,25 @@ static struct
};
static void
-_efl_canvas_textblock_efl_text_style_text_underline_type_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, Efl_Text_Style_Underline_Type type EINA_UNUSED)
+_efl_canvas_textblock_efl_text_style_text_underline_type_set(Eo *obj, Efl_Canvas_Textblock_Data *o, Efl_Text_Style_Underline_Type type)
{
- ASYNC_BLOCK;
- _FMT_SET(underline, _style_underline_map[type].underline_single);
- _FMT_SET(underline2, _style_underline_map[type].underline_double);
- _FMT_SET(underline_dash, _style_underline_map[type].underline_dashed);
+ if (efl_text_underline_type_get(obj) == type)
+ return;
+ ASYNC_BLOCK;
+ _FMT(underline) = _style_underline_map[type].underline_single;
+ _FMT(underline2) = _style_underline_map[type].underline_double;
+ _FMT(underline_dash) = _style_underline_map[type].underline_dashed;
+ _canvas_text_format_changed(obj, o);
}
static Efl_Text_Style_Underline_Type
-_efl_canvas_textblock_efl_text_style_text_underline_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED)
+_efl_canvas_textblock_efl_text_style_text_underline_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o)
{
- return _FMT(underline);
+ if(_FMT(underline_dash)) return EFL_TEXT_STYLE_UNDERLINE_TYPE_DASHED;
+ else if (_FMT(underline2)) return EFL_TEXT_STYLE_UNDERLINE_TYPE_DOUBLE;
+ else if (_FMT(underline)) return EFL_TEXT_STYLE_UNDERLINE_TYPE_SINGLE;
+ else return EFL_TEXT_STYLE_UNDERLINE_TYPE_NONE;
}
static void
@@ -16444,7 +16741,7 @@ static void
_efl_canvas_textblock_efl_text_style_text_underline_height_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, double height EINA_UNUSED)
{
ASYNC_BLOCK;
- _FMT_SET(underline_height, height);
+ _FMT_SETD(underline_height, height);
}
static double
@@ -16489,18 +16786,18 @@ _efl_canvas_textblock_efl_text_style_text_underline_dashed_gap_set(Eo *obj EINA_
static int
_efl_canvas_textblock_efl_text_style_text_underline_dashed_gap_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED)
{
- return _FMT(underline_dash_width);
+ return _FMT(underline_dash_gap);
}
static void
-_efl_canvas_textblock_efl_text_style_text_underline2_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED)
+_efl_canvas_textblock_efl_text_style_text_secondary_underline_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED)
{
ASYNC_BLOCK;
_FMT_COLOR_SET(underline2);
}
static void
-_efl_canvas_textblock_efl_text_style_text_underline2_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED)
+_efl_canvas_textblock_efl_text_style_text_secondary_underline_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED)
{
_FMT_COLOR_RET(underline2);
}
@@ -16667,14 +16964,14 @@ _efl_canvas_textblock_efl_text_style_text_glow_color_get(const Eo *obj EINA_UNUS
}
static void
-_efl_canvas_textblock_efl_text_style_text_glow2_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED)
+_efl_canvas_textblock_efl_text_style_text_secondary_glow_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED)
{
ASYNC_BLOCK;
_FMT_COLOR_SET(glow2);
}
static void
-_efl_canvas_textblock_efl_text_style_text_glow2_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED)
+_efl_canvas_textblock_efl_text_style_text_secondary_glow_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED)
{
_FMT_COLOR_RET(glow2);
}
@@ -16706,14 +17003,14 @@ _efl_canvas_textblock_efl_text_style_text_gfx_filter_set(Eo *obj EINA_UNUSED, Ef
static const char *
_efl_canvas_textblock_efl_text_style_text_gfx_filter_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED)
{
- return _FMT(gfx_filter)?_FMT(gfx_filter->name):NULL;
+ return _FMT_INFO(gfx_filter_name)?_FMT_INFO(gfx_filter_name):NULL;
}
static void
_efl_canvas_textblock_efl_text_format_ellipsis_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, double value EINA_UNUSED)
{
ASYNC_BLOCK;
- _FMT_SET(ellipsis, value);
+ _FMT_SETD(ellipsis, value);
}
static double
@@ -16740,12 +17037,206 @@ _efl_canvas_textblock_efl_text_format_wrap_get(const Eo *obj EINA_UNUSED, Efl_Ca
return _FMT_INFO(wrap);
}
+void
+clean_cursors_at_node(Eina_List **all_cursors,
+ Evas_Object_Textblock_Node_Text *tn,
+ Evas_Object_Textblock_Node_Text *main_node,
+ unsigned int len)
+{
+ Eina_List *l, *ll;
+ Efl_Text_Cursor_Handle *itr_cursor;
+ EINA_LIST_FOREACH_SAFE (*all_cursors, l, ll, itr_cursor)
+ {
+ if (tn == itr_cursor->node)
+ {
+ itr_cursor->pos += len;
+ itr_cursor->node = main_node;
+ itr_cursor->changed = EINA_TRUE;
+ *all_cursors = eina_list_remove(*all_cursors, itr_cursor);
+ }
+ }
+}
+
+/**
+ * @internal
+ * Combine all text nodes in a single node, for convert from multi-line to single-line.
+ * @param obj The evas object, must not be NULL.
+ * @return EINA_TRUE if text nodes merged, else return EINA_FALSE
+ */
+static void
+_merge_to_first_text_nodes(const Evas_Object *eo_obj)
+{
+ Efl_Canvas_Textblock_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
+ Evas_Object_Textblock_Node_Text *main_node, *tn;
+ Evas_Object_Textblock_Node_Format *fn;
+ int len, temp_len;
+
+ if (!o->text_nodes || !(EINA_INLIST_GET(o->text_nodes)->next))
+ return;
+
+ main_node = o->text_nodes;
+ main_node->dirty = EINA_TRUE;
+ len = (int) eina_ustrbuf_length_get(main_node->unicode);
+
+ Eina_List *all_cursors;
+ all_cursors = eina_list_clone(o->cursors);
+ all_cursors = eina_list_append(all_cursors, o->cursor);
+
+ while (o->text_nodes && (tn = _NODE_TEXT(EINA_INLIST_GET(o->text_nodes)->next)))
+ {
+ fn = tn->format_node;
+
+ if (fn && (fn->text_node == tn))
+ {
+ fn->offset++; //add prev ps
+ }
+
+ while (fn && (fn->text_node == tn))
+ {
+ fn->text_node = main_node;
+ fn->format_change = EINA_TRUE;
+
+ fn = _NODE_FORMAT(EINA_INLIST_GET(fn)->next);
+ }
+
+ temp_len = (int) eina_ustrbuf_length_get(tn->unicode);
+ eina_ustrbuf_append_length(main_node->unicode, eina_ustrbuf_string_get(tn->unicode), temp_len);
+
+ clean_cursors_at_node(&all_cursors, tn, main_node, len);
+
+ len += temp_len;
+
+ o->text_nodes = _NODE_TEXT(eina_inlist_remove(
+ EINA_INLIST_GET(o->text_nodes), EINA_INLIST_GET(tn)));
+ _evas_textblock_node_text_free(tn);
+ }
+
+ eina_list_free(all_cursors);
+}
+
+void
+clean_cursors_in_range(Eina_List **all_cursors, Evas_Object_Textblock_Node_Text *tn, unsigned int start, unsigned int end)
+{
+ Eina_List *l, *ll;
+ Efl_Text_Cursor_Handle *itr_cursor;
+ EINA_LIST_FOREACH_SAFE (*all_cursors, l, ll, itr_cursor)
+ {
+ if (itr_cursor->pos >= start && itr_cursor->pos <= end)
+ {
+ itr_cursor->pos -= start;
+ itr_cursor->node = tn;
+ itr_cursor->changed = EINA_TRUE;
+ *all_cursors = eina_list_remove(*all_cursors, itr_cursor);
+ }
+ }
+}
+
+/**
+ * @internal
+ * split text node into multiple text nodes based on ps, called for convert from singleline to multiline.
+ * @param obj The evas object, must not be NULL.
+ * @return EINA_TRUE if text nodes splitted, else return EINA_FALSE
+ */
+static void
+_split_text_nodes(const Evas_Object *eo_obj)
+{
+ Efl_Canvas_Textblock_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
+ Evas_Object_Textblock_Node_Text *tn;
+ Evas_Object_Textblock_Node_Format *fn;
+ Eina_Unicode *all_unicode;
+ Eina_List *all_cursors;
+ unsigned int len = 0, str_start = 0;
+
+ if (!o->text_nodes || !o->format_nodes)
+ return;
+
+ tn = o->text_nodes;
+ fn = tn->format_node;
+
+ while (fn && !_IS_PARAGRAPH_SEPARATOR_SIMPLE(fn->format))
+ {
+ len += fn->offset;
+ fn = _NODE_FORMAT(EINA_INLIST_GET(fn)->next);
+ }
+
+ if(!fn) return;
+
+ tn->dirty = EINA_TRUE;
+ len += fn->offset + 1;
+ all_unicode = eina_ustrbuf_string_steal(tn->unicode);
+
+ eina_ustrbuf_append_n(tn->unicode, all_unicode, len);
+
+ str_start += len;
+
+ tn = _evas_textblock_node_text_new();
+ o->text_nodes = _NODE_TEXT(eina_inlist_append(
+ EINA_INLIST_GET(o->text_nodes),
+ EINA_INLIST_GET(tn)));
+
+ fn = _NODE_FORMAT(EINA_INLIST_GET(fn)->next);
+
+ all_cursors = eina_list_clone(o->cursors);
+ all_cursors = eina_list_append(all_cursors, o->cursor);
+
+ while (fn)
+ {
+ len = 0;
+ tn->format_node = fn;
+ tn->format_node->offset--;
+
+ while (fn && !_IS_PARAGRAPH_SEPARATOR_SIMPLE(fn->format))
+ {
+ len += fn->offset;
+ fn->text_node = tn;
+ fn->format_change = EINA_TRUE;
+ fn = _NODE_FORMAT(EINA_INLIST_GET(fn)->next);
+ }
+
+ if (!fn) break;
+
+ fn->text_node = tn;
+ fn->format_change = EINA_TRUE;
+ len += fn->offset + 1;
+ eina_ustrbuf_append_n(tn->unicode, all_unicode + str_start, len);
+
+ clean_cursors_in_range(&all_cursors, tn, str_start, str_start + len);
+
+ str_start += len;
+
+ tn = _evas_textblock_node_text_new();
+ o->text_nodes = _NODE_TEXT(eina_inlist_append(
+ EINA_INLIST_GET(o->text_nodes),
+ EINA_INLIST_GET(tn)));
+
+ fn = _NODE_FORMAT(EINA_INLIST_GET(fn)->next);
+ }
+
+ if (!tn->format_node)
+ tn->format_node = _NODE_FORMAT(EINA_INLIST_GET(o->format_nodes)->last);
+
+ len = eina_unicode_strlen(all_unicode + str_start);
+ eina_ustrbuf_append_n(tn->unicode, all_unicode + str_start, len);
+
+ clean_cursors_in_range(&all_cursors, tn, str_start, str_start + len);
+ eina_list_free(all_cursors);
+
+ free(all_unicode);
+}
+
static void
_efl_canvas_textblock_efl_text_format_multiline_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, Eina_Bool enabled EINA_UNUSED)
{
ASYNC_BLOCK;
+
if (o->multiline == enabled) return;
o->multiline = enabled;
+
+ if (!o->multiline)
+ _merge_to_first_text_nodes(obj);
+ else
+ _split_text_nodes(obj);
+
_canvas_text_format_changed(obj, o);
}
@@ -16763,7 +17254,7 @@ _efl_canvas_textblock_efl_text_format_text_horizontal_align_auto_type_set(Eo *ob
{
_FMT_SET(halign_auto, EVAS_TEXTBLOCK_ALIGN_AUTO_NONE);
}
- else if (type == EFL_TEXT_FORMAT_HORIZONTAL_ALIGNMENT_AUTO_TYPE_NORMAL)
+ else if (type == EFL_TEXT_FORMAT_HORIZONTAL_ALIGNMENT_AUTO_TYPE_AUTO)
{
_FMT_SET(halign_auto, EVAS_TEXTBLOCK_ALIGN_AUTO_NORMAL);
}
@@ -16771,7 +17262,7 @@ _efl_canvas_textblock_efl_text_format_text_horizontal_align_auto_type_set(Eo *ob
{
_FMT_SET(halign_auto, EVAS_TEXTBLOCK_ALIGN_AUTO_LOCALE);
}
- else if (type == EFL_TEXT_FORMAT_HORIZONTAL_ALIGNMENT_AUTO_TYPE_END)
+ else if (type == EFL_TEXT_FORMAT_HORIZONTAL_ALIGNMENT_AUTO_TYPE_OPPOSITE)
{
_FMT_SET(halign_auto, EVAS_TEXTBLOCK_ALIGN_AUTO_END);
}
@@ -16785,11 +17276,11 @@ _efl_canvas_textblock_efl_text_format_text_horizontal_align_auto_type_get(const
if (_FMT(halign_auto) == EVAS_TEXTBLOCK_ALIGN_AUTO_NORMAL)
{
- ret = EFL_TEXT_FORMAT_HORIZONTAL_ALIGNMENT_AUTO_TYPE_NORMAL;
+ ret = EFL_TEXT_FORMAT_HORIZONTAL_ALIGNMENT_AUTO_TYPE_AUTO;
}
else if (_FMT(halign_auto) == EVAS_TEXTBLOCK_ALIGN_AUTO_END)
{
- ret = EFL_TEXT_FORMAT_HORIZONTAL_ALIGNMENT_AUTO_TYPE_END;
+ ret = EFL_TEXT_FORMAT_HORIZONTAL_ALIGNMENT_AUTO_TYPE_OPPOSITE;
}
else if (_FMT(halign_auto) == EVAS_TEXTBLOCK_ALIGN_AUTO_LOCALE)
{
@@ -16805,7 +17296,7 @@ _efl_canvas_textblock_efl_text_format_text_horizontal_align_set(Eo *obj, Efl_Can
ASYNC_BLOCK;
if (EINA_DBL_EQ(_FMT(halign), value)) return;
_FMT(halign_auto) = EVAS_TEXTBLOCK_ALIGN_AUTO_NONE;
- _FMT_SET(halign, value);
+ _FMT_SETD(halign, value);
}
static double
@@ -16841,7 +17332,7 @@ _efl_canvas_textblock_efl_text_format_line_gap_set(Eo *obj EINA_UNUSED, Efl_Canv
if (EINA_DBL_EQ(linerelgap, 0.0))
{
- _FMT_SET(linegap, value);
+ _FMT_SETD(linegap, value);
}
else
{
@@ -16866,7 +17357,7 @@ _efl_canvas_textblock_efl_text_format_line_rel_gap_set(Eo *obj EINA_UNUSED, Efl_
if (EINA_DBL_EQ(linegap, 0.0))
{
- _FMT_SET(linerelgap, value);
+ _FMT_SETD(linerelgap, value);
}
else
{
@@ -16941,7 +17432,7 @@ _efl_canvas_textblock_efl_text_format_replacement_char_get(const Eo *obj EINA_UN
#ifdef HAVE_TESTS
/* return EINA_FALSE on error, used in unit_testing */
-EAPI Eina_Bool
+EVAS_API Eina_Bool
_evas_textblock_check_item_node_link(Evas_Object *eo_obj)
{
Efl_Canvas_Textblock_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
@@ -16967,7 +17458,7 @@ _evas_textblock_check_item_node_link(Evas_Object *eo_obj)
return EINA_TRUE;
}
-EAPI int
+EVAS_API int
_evas_textblock_format_offset_get(const Evas_Object_Textblock_Node_Format *n)
{
return n->offset;
@@ -16976,7 +17467,7 @@ _evas_textblock_format_offset_get(const Evas_Object_Textblock_Node_Format *n)
#if 0
/* Good for debugging */
-EAPI void
+EVAS_API void
pfnode(Evas_Object_Textblock_Node_Format *n)
{
printf("Format Node: %p\n", n);
@@ -16985,7 +17476,7 @@ pfnode(Evas_Object_Textblock_Node_Format *n)
printf("'%s'\n", n->format);
}
-EAPI void
+EVAS_API void
ptnode(Evas_Object_Textblock_Node_Text *n)
{
printf("Text Node: %p\n", n);
@@ -16994,7 +17485,7 @@ ptnode(Evas_Object_Textblock_Node_Text *n)
printf("'%ls'\n", eina_ustrbuf_string_get(n->unicode));
}
-EAPI void
+EVAS_API void
pitem(Evas_Object_Textblock_Item *it)
{
Evas_Object_Textblock_Text_Item *ti;
@@ -17027,7 +17518,7 @@ pitem(Evas_Object_Textblock_Item *it)
}
}
-EAPI void
+EVAS_API void
ppar(Evas_Object_Textblock_Paragraph *par)
{
Evas_Object_Textblock_Item *it;
@@ -17044,7 +17535,7 @@ ppar(Evas_Object_Textblock_Paragraph *par)
#define EFL_CANVAS_TEXTBLOCK_EXTRA_OPS \
EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _efl_canvas_textblock_efl_object_dbg_info_get)
-EAPI Efl_Text_Cursor_Handle *
+EVAS_API Efl_Text_Cursor_Handle *
evas_object_textblock_cursor_get(const Evas_Object *eo_obj EINA_UNUSED)
{
TB_HEAD_RETURN(NULL);
@@ -17101,9 +17592,9 @@ _text_layout_async_done(void *todo, Ecore_Thread *thread EINA_UNUSED)
if ((c->o->paragraphs) && (!EINA_INLIST_GET(c->o->paragraphs)->next) &&
(c->o->paragraphs->lines) && (!EINA_INLIST_GET(c->o->paragraphs->lines)->next))
{
- if (c->evas_o->cur->geometry.h < c->o->formatted.h)
+ if (c->evas_o->cur->geometry.h < c->o->formatted.h + c->o->style_pad.t + c->o->style_pad.b)
{
- c->o->formatted.oneline_h = c->o->formatted.h;
+ c->o->formatted.oneline_h = c->o->formatted.h + c->o->style_pad.t + c->o->style_pad.b;
}
}
c->o->changed = 0;
@@ -17120,7 +17611,9 @@ _text_layout_async_done(void *todo, Ecore_Thread *thread EINA_UNUSED)
evas_object_change(c->obj, c->evas_o);
free(c);
- _resolve_async(td, o->formatted.w, o->formatted.h);
+ _resolve_async(td,
+ o->formatted.w + o->style_pad.l + o->style_pad.r,
+ o->formatted.h + o->style_pad.t + o->style_pad.b);
o->layout_th = NULL;
o->layout_jobs--;
@@ -17167,7 +17660,9 @@ _efl_canvas_textblock_async_layout(Eo *eo_obj EINA_UNUSED, Efl_Canvas_Textblock_
evas_object_textblock_coords_recalc(eo_obj, obj, obj->private_data);
if (o->formatted.valid)
{
- _resolve_async(ctx, o->formatted.w, o->formatted.w);
+ _resolve_async(ctx,
+ o->formatted.w + o->style_pad.l + o->style_pad.r,
+ o->formatted.h + o->style_pad.t + o->style_pad.b);
return f;
}
@@ -17237,6 +17732,10 @@ int fit_text_block(Evas_Object *eo_obj)
TEXT_FIT_CONTENT_CONFIG * fc = &o->fit_content_config;
+ // If there are no text or Paragraphs, then do nothing
+ if (efl_canvas_textblock_is_empty_get(eo_obj))
+ return EVAS_ERROR_SUCCESS;
+
if (fc->options == TEXTBLOCK_FIT_MODE_NONE && !fc->force_refit)
return EVAS_ERROR_SUCCESS;
@@ -17302,10 +17801,13 @@ int fit_text_block(Evas_Object *eo_obj)
}
else
{
+ int pad_l, pad_r, pad_t, pad_b;
+
fit_style_update(eo_obj,fc->p_size_array[mid],EINA_TRUE,bwrap);
Eina_Size2D size = efl_canvas_textblock_size_formatted_get(eo_obj);
- wf_new = size.w;
- hf_new = size.h;
+ efl_canvas_textblock_style_insets_get(eo_obj, &pad_l, &pad_r, &pad_t, &pad_b);
+ wf_new = size.w + pad_l + pad_r;
+ hf_new = size.h + pad_t + pad_b;
if (fc->p_size_array[mid]<255)
{
fc->size_cache[font_size].w = wf_new;
@@ -17369,7 +17871,7 @@ int fit_fill_internal_list(TEXT_FIT_CONTENT_CONFIG *fc)
-EAPI int evas_textblock_fit_options_set(Evas_Object *obj, unsigned int options)
+EVAS_API int evas_textblock_fit_options_set(Evas_Object *obj, unsigned int options)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EVAS_ERROR_INVALID_PARAM);
Efl_Canvas_Textblock_Data *o = efl_data_scope_get(obj, MY_CLASS);
@@ -17383,7 +17885,7 @@ EAPI int evas_textblock_fit_options_set(Evas_Object *obj, unsigned int options)
return EVAS_ERROR_SUCCESS;
}
-EAPI int evas_textblock_fit_options_get(const Evas_Object *obj, unsigned int *p_options)
+EVAS_API int evas_textblock_fit_options_get(const Evas_Object *obj, unsigned int *p_options)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EVAS_ERROR_INVALID_PARAM);
Efl_Canvas_Textblock_Data *o = efl_data_scope_get(obj, MY_CLASS);
@@ -17393,7 +17895,7 @@ EAPI int evas_textblock_fit_options_get(const Evas_Object *obj, unsigned int *p
return EVAS_ERROR_SUCCESS;
}
-EAPI int evas_textblock_fit_size_range_set(Evas_Object *obj, unsigned int min_font_size, unsigned int max_font_size)
+EVAS_API int evas_textblock_fit_size_range_set(Evas_Object *obj, unsigned int min_font_size, unsigned int max_font_size)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EVAS_ERROR_INVALID_PARAM);
Efl_Canvas_Textblock_Data *o = efl_data_scope_get(obj, MY_CLASS);
@@ -17442,7 +17944,7 @@ EAPI int evas_textblock_fit_size_range_set(Evas_Object *obj, unsigned int min_f
return EVAS_ERROR_SUCCESS;
}
-EAPI int evas_textblock_fit_size_range_get(const Evas_Object *obj, unsigned int *p_min_font_size, unsigned int *p_max_font_size)
+EVAS_API int evas_textblock_fit_size_range_get(const Evas_Object *obj, unsigned int *p_min_font_size, unsigned int *p_max_font_size)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EVAS_ERROR_INVALID_PARAM);
Efl_Canvas_Textblock_Data *o = efl_data_scope_get(obj, MY_CLASS);
@@ -17457,7 +17959,7 @@ EAPI int evas_textblock_fit_size_range_get(const Evas_Object *obj, unsigned int
return EVAS_ERROR_SUCCESS;
}
-EAPI int evas_textblock_fit_step_size_set(Evas_Object *obj, unsigned int step_size)
+EVAS_API int evas_textblock_fit_step_size_set(Evas_Object *obj, unsigned int step_size)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EVAS_ERROR_INVALID_PARAM);
Efl_Canvas_Textblock_Data *o = efl_data_scope_get(obj, MY_CLASS);
@@ -17479,7 +17981,7 @@ EAPI int evas_textblock_fit_step_size_set(Evas_Object *obj, unsigned int step_s
return EVAS_ERROR_SUCCESS;
}
-EAPI int evas_textblock_fit_step_size_get(const Evas_Object *obj, unsigned int * p_step_size)
+EVAS_API int evas_textblock_fit_step_size_get(const Evas_Object *obj, unsigned int * p_step_size)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EVAS_ERROR_INVALID_PARAM);
Efl_Canvas_Textblock_Data *o = efl_data_scope_get(obj, MY_CLASS);
@@ -17499,7 +18001,7 @@ int compareUINT(const void * a, const void * b)
else return 0;
}
-EAPI int evas_textblock_fit_size_array_set(Evas_Object *obj, const unsigned int *p_size_array, size_t size_array_len)
+EVAS_API int evas_textblock_fit_size_array_set(Evas_Object *obj, const unsigned int *p_size_array, size_t size_array_len)
{
int n_ret = EVAS_ERROR_SUCCESS;
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EVAS_ERROR_INVALID_PARAM);
@@ -17531,7 +18033,7 @@ EAPI int evas_textblock_fit_size_array_set(Evas_Object *obj, const unsigned int
return EVAS_ERROR_SUCCESS;
}
-EAPI int evas_textblock_fit_size_array_get(const Evas_Object *obj, unsigned int *p_size_array, size_t *p_size_array_len, size_t passed_array_size)
+EVAS_API int evas_textblock_fit_size_array_get(const Evas_Object *obj, unsigned int *p_size_array, size_t *p_size_array_len, size_t passed_array_size)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EVAS_ERROR_INVALID_PARAM);
Efl_Canvas_Textblock_Data *o = efl_data_scope_get(obj, MY_CLASS);
diff --git a/src/lib/evas/canvas/evas_object_textgrid.c b/src/lib/evas/canvas/evas_object_textgrid.c
index 504e8c1ffa..2d9b143452 100644
--- a/src/lib/evas/canvas/evas_object_textgrid.c
+++ b/src/lib/evas/canvas/evas_object_textgrid.c
@@ -335,7 +335,7 @@ evas_object_textgrid_row_text_append(Evas_Object_Textgrid_Row *row,
script, &codepoint, 1);
memset(&(text->text_props), 0, sizeof(Evas_Text_Props));
evas_common_text_props_script_set(&(text->text_props), script);
- ENFN->font_text_props_info_create(ENC, script_fi, &codepoint,
+ ENFN->font_text_props_info_create(ENC, cur_fi, &codepoint,
&(text->text_props), NULL, 0, 1,
EVAS_TEXT_PROPS_MODE_NONE,
o->cur.font_description_normal->lang);
@@ -868,7 +868,7 @@ _evas_textgrid_efl_gfx_entity_scale_set(Evas_Object *eo_obj, Evas_Textgrid_Data
/********************* API *********************/
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_textgrid_add(Evas *e)
{
e = evas_find(e);
@@ -991,7 +991,7 @@ _alternate_font_weight_slant(Evas_Object_Protected_Data *obj,
script, W, 1);
memset(&text_props, 0, sizeof(Evas_Text_Props));
evas_common_text_props_script_set(&text_props, script);
- ENFN->font_text_props_info_create(ENC, script_fi, W, &text_props,
+ ENFN->font_text_props_info_create(ENC, cur_fi, W, &text_props,
NULL, 0, 1,
EVAS_TEXT_PROPS_MODE_NONE,
fdesc->lang);
@@ -1073,7 +1073,7 @@ _evas_textgrid_font_reload(Eo *eo_obj, Evas_Textgrid_Data *o)
script, W, 1);
memset(&text_props, 0, sizeof(Evas_Text_Props));
evas_common_text_props_script_set(&text_props, script);
- ENFN->font_text_props_info_create(ENC, script_fi, W, &text_props,
+ ENFN->font_text_props_info_create(ENC, cur_fi, W, &text_props,
NULL, 0, 1,
EVAS_TEXT_PROPS_MODE_NONE,
fdesc->lang);
@@ -1474,13 +1474,13 @@ _evas_textgrid_efl_object_dbg_info_get(Eo *eo_obj, Evas_Textgrid_Data *o EINA_UN
}
}
-EAPI void
+EVAS_API void
evas_object_textgrid_font_source_set(Eo *obj, const char *font_source)
{
efl_text_font_source_set((Eo *) obj, font_source);
}
-EAPI const char *
+EVAS_API const char *
evas_object_textgrid_font_source_get(const Eo *obj)
{
const char *font_source = NULL;
@@ -1488,14 +1488,14 @@ evas_object_textgrid_font_source_get(const Eo *obj)
return font_source;
}
-EAPI void
+EVAS_API void
evas_object_textgrid_font_set(Eo *obj, const char *font_name, Evas_Font_Size font_size)
{
efl_text_font_family_set((Eo *) obj, font_name);
efl_text_font_size_set((Eo *) obj, font_size);
}
-EAPI void
+EVAS_API void
evas_object_textgrid_font_get(const Eo *obj, const char **font_name, Evas_Font_Size *font_size)
{
if (font_name) *font_name = efl_text_font_family_get((Eo *) obj);
diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index 35ea97d579..49fd7f7ea5 100644
--- a/src/lib/evas/canvas/evas_out.c
+++ b/src/lib/evas/canvas/evas_out.c
@@ -35,7 +35,7 @@ efl_canvas_output_info_get(Evas_Public_Data *e, Efl_Canvas_Output *output)
e->engine.func->output_info_setup(output->info);
}
-EAPI Efl_Canvas_Output *
+EVAS_API Efl_Canvas_Output *
efl_canvas_output_add(Evas *canvas)
{
Efl_Canvas_Output *r;
@@ -67,7 +67,7 @@ efl_canvas_output_add(Evas *canvas)
return r;
}
-EAPI void
+EVAS_API void
efl_canvas_output_del(Efl_Canvas_Output *output)
{
if (output->canvas)
@@ -93,7 +93,7 @@ efl_canvas_output_del(Efl_Canvas_Output *output)
free(output);
}
-EAPI void
+EVAS_API void
efl_canvas_output_view_set(Efl_Canvas_Output *output,
Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
{
@@ -117,7 +117,7 @@ efl_canvas_output_view_set(Efl_Canvas_Output *output,
// XXX: tell evas to add damage if viewport loc/size changed
}
-EAPI void
+EVAS_API void
efl_canvas_output_view_get(Efl_Canvas_Output *output,
Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
{
@@ -127,7 +127,7 @@ efl_canvas_output_view_get(Efl_Canvas_Output *output,
if (h) *h = output->geometry.h;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
efl_canvas_output_engine_info_set(Efl_Canvas_Output *output,
Evas_Engine_Info *info)
{
@@ -157,7 +157,7 @@ efl_canvas_output_engine_info_set(Efl_Canvas_Output *output,
else
{
setup:
- output->output =
+ output->output =
e->engine.func->output_setup(_evas_engine_context(e), info,
output->geometry.w, output->geometry.h);
}
@@ -165,7 +165,7 @@ efl_canvas_output_engine_info_set(Efl_Canvas_Output *output,
return !!output->output;
}
-EAPI Evas_Engine_Info*
+EVAS_API Evas_Engine_Info*
efl_canvas_output_engine_info_get(Efl_Canvas_Output *output)
{
Evas_Engine_Info *info = output->info;
@@ -176,14 +176,14 @@ efl_canvas_output_engine_info_get(Efl_Canvas_Output *output)
return output->info;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
efl_canvas_output_lock(Efl_Canvas_Output *output)
{
output->lock++;
return EINA_TRUE;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
efl_canvas_output_unlock(Efl_Canvas_Output *output)
{
return !!(--output->lock);
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 70ed55a953..f013f23aa6 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -1,5 +1,6 @@
#include "evas_common_private.h"
#include "evas_private.h"
+#include <Ecore.h>
#include <math.h>
#include <assert.h>
@@ -379,6 +380,9 @@ _evas_proxy_redraw_set(Evas_Public_Data *e, Evas_Object_Protected_Data *obj,
if (render)
{
+ /* Not good... but make it sure if the proxies have missed at update
+ if its sources are remained changed as pending objects in the prev frame. */
+ evas_object_change(eo_proxy, proxy);
proxy->func->render_pre(eo_proxy, proxy, proxy->private_data);
_evas_render_prev_cur_clip_cache_add(e, proxy);
}
@@ -386,15 +390,6 @@ _evas_proxy_redraw_set(Evas_Public_Data *e, Evas_Object_Protected_Data *obj,
//Update the proxies recursively.
_evas_proxy_redraw_set(e, proxy, render);
}
-
- if (obj->proxy->proxy_textures)
- {
- /* Flag need redraw on proxy texture source */
- EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, obj->proxy,
- Evas_Object_Proxy_Data, source)
- source->redraw = EINA_TRUE;
- EINA_COW_WRITE_END(evas_object_proxy_cow, obj->proxy, source);
- }
}
/* sets the mask redraw flag for all the objects clipped by this mask */
@@ -463,7 +458,7 @@ _evas_render_phase1_direct(Evas_Public_Data *e,
EINA_PREFETCH(&(obj->cur->clipper));
if (obj->changed) evas_object_clip_recalc(obj);
- if (obj->proxy->proxies || obj->proxy->proxy_textures)
+ if (obj->proxy->proxies)
{
/* is proxy source */
if (_evas_render_object_changed_get(obj))
@@ -495,7 +490,7 @@ _evas_render_phase1_direct(Evas_Public_Data *e,
if (!obj->smart.smart || evas_object_smart_changed_get(obj))
{
/* proxy sources */
- if (obj->proxy->proxies || obj->proxy->proxy_textures)
+ if (obj->proxy->proxies)
{
EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, obj->proxy,
Evas_Object_Proxy_Data, proxy_write)
@@ -1761,6 +1756,9 @@ _evas_render_mapped_mask(Evas_Public_Data *evas, Evas_Object_Protected_Data *obj
Evas_Proxy_Render_Data *proxy_render_data, void *output, void *ctx, int off_x, int off_y, int level, Eina_Bool do_async)
{
if (!mask) return;
+ if (proxy_render_data &&
+ !proxy_render_data->source_clip &&
+ proxy_render_data->src_obj->clip.mask == mask) return;
// This path can be hit when we're multiplying masks on top of each other...
Evas_Object_Protected_Data *prev_mask = obj->clip.prev_mask;
@@ -2156,7 +2154,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
_evas_render_mapped_mask(evas, obj, obj->cur->clipper, proxy_render_data, output, ctx, off_x, off_y, level, do_async);
else if (!proxy_src_clip && proxy_render_data)
{
- if (!_proxy_context_clip(evas, ctx, proxy_render_data, proxy_render_data->proxy_obj, off_x, off_y))
+ if (!_proxy_context_clip(evas, ctx, proxy_render_data, obj, off_x, off_y))
goto on_empty_clip;
}
@@ -2170,6 +2168,13 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
EINA_INLIST_FOREACH
(evas_object_smart_members_get_direct(eo_obj), obj2)
{
+ /* skip proxy object if its source is its smart parent.
+ who makes this relation? a proxy object working for
+ a smart object to set a filter program. the proxy
+ object should be a member of smart object to sync
+ stacking changes. */
+ if (obj2->is_filter_object) continue;
+
clean_them |= evas_render_mapped(evas, obj2->object,
obj2, ctx,
output, surface,
@@ -2202,14 +2207,13 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
if ((_evas_render_has_map(obj) && !_evas_render_can_map(obj)) ||
_evas_render_object_is_mask(obj->cur->clipper))
evas_object_clip_recalc(obj);
- if (!proxy_render_data)
- _evas_render_mapped_context_clip_set(evas, eo_obj, obj, ctx,
- proxy_render_data,
- off_x, off_y);
+ _evas_render_mapped_context_clip_set(evas, eo_obj, obj, ctx,
+ proxy_render_data,
+ off_x, off_y);
}
else if (proxy_render_data)
{
- if (!_proxy_context_clip(evas, ctx, proxy_render_data, proxy_render_data->proxy_obj, off_x, off_y))
+ if (!_proxy_context_clip(evas, ctx, proxy_render_data, obj, off_x, off_y))
goto on_empty_clip;
}
}
@@ -2232,7 +2236,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
#endif
obj->func->render(eo_obj, obj, obj->private_data,
- ENC, output, ctx, surface, off_x, off_y, EINA_FALSE);
+ ENC, output, ctx, surface, off_x, off_y, do_async);
}
}
else if (!obj->is_smart)
@@ -2267,7 +2271,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
}
else if (proxy_render_data)
{
- if (!_proxy_context_clip(evas, ctx, proxy_render_data, proxy_render_data->proxy_obj, off_x, off_y))
+ if (!_proxy_context_clip(evas, ctx, proxy_render_data, obj, off_x, off_y))
goto on_empty_clip;
}
}
@@ -2304,7 +2308,6 @@ end:
* Render the source object when a proxy is set.
* Used to force a draw if necessary, else just makes sure it's available.
* Called from: image objects and text with filters.
- * TODO: 3d objects subrender should probably be merged here as well.
*/
void
evas_render_proxy_subrender(Evas *eo_e, void *output, Evas_Object *eo_source, Evas_Object *eo_proxy,
@@ -2316,6 +2319,7 @@ evas_render_proxy_subrender(Evas *eo_e, void *output, Evas_Object *eo_source, Ev
int level = 1;
void *ctx;
int w, h, off_x = 0, off_y = 0;
+ Eina_Rectangle lr = {0, 0, 0, 0};
#ifdef REND_DBG
level = __RD_level;
@@ -2326,7 +2330,16 @@ evas_render_proxy_subrender(Evas *eo_e, void *output, Evas_Object *eo_source, Ev
source = efl_data_scope_get(eo_source, EFL_CANVAS_OBJECT_CLASS);
proxy = efl_data_scope_get(eo_proxy, EFL_CANVAS_OBJECT_CLASS);
- if (proxy->proxy->proxies || (!proxy->cur->clipper) || (!proxy->cur->has_fixed_size))
+ evas_object_image_load_region_get(eo_proxy, &lr.x, &lr.y, &lr.w, &lr.h);
+
+ if (lr.w > 0 && lr.h > 0)
+ {
+ w = lr.w;
+ h = lr.h;
+ off_x = -lr.x;
+ off_y = -lr.y;
+ }
+ else if (proxy->proxy->proxies || (!proxy->cur->clipper) || (!proxy->cur->has_fixed_size))
{
/* make full surface available if this proxy is being sampled from */
w = source->cur->geometry.w;
@@ -2713,6 +2726,15 @@ _evas_render_cutout_add(Evas_Public_Data *evas, void *context,
obj->cur->cache.clip.w, obj->cur->cache.clip.h);
}
else return;
+ if (!_is_obj_in_framespace(obj, evas))
+ {
+ int fw, fh;
+
+ fw = evas->viewport.w - evas->framespace.w;
+ fh = evas->viewport.h - evas->framespace.h;
+ RECTS_CLIP_TO_RECT(cox, coy, cow, coh,
+ 0, 0, fw, fh);
+ }
if (cutout_margin)
{
cox += cutout_margin->l;
@@ -2727,7 +2749,16 @@ _evas_render_cutout_add(Evas_Public_Data *evas, void *context,
void
evas_render_rendering_wait(Evas_Public_Data *evas)
{
- while (evas->rendering) evas_async_events_process_blocking();
+ double t0 = ecore_time_get();
+ while (evas->rendering)
+ {
+ evas_async_events_process_blocking();
+ if ((ecore_time_get() - t0) > 0.2)
+ {
+ ERR("timeout waiting for async rendering");
+ break;
+ }
+ }
}
/*
@@ -2930,7 +2961,7 @@ evas_render_pre(Evas *eo_e, Evas_Public_Data *evas)
eina_evlog("-render_pre_objects_finalize", eo_e, 0.0, NULL);
}
-EAPI void
+EVAS_API void
evas_render_pending_objects_flush(Evas *eo_e)
{
Evas_Public_Data *evas = efl_data_scope_safe_get(eo_e, EVAS_CANVAS_CLASS);
@@ -3256,6 +3287,7 @@ evas_render_updates_internal(Evas *eo_e,
EVAS_RENDER_MODE_SYNC :
EVAS_RENDER_MODE_ASYNC_INIT;
Eina_Bool haveup = EINA_FALSE;
+ static int show_update_boxes = -1;
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
return EINA_FALSE;
@@ -3283,6 +3315,11 @@ evas_render_updates_internal(Evas *eo_e,
double start_time = _time_get();
#endif
+ if (show_update_boxes == -1)
+ {
+ if (getenv("EVAS_RENDER_DEBUG_UPDATE_BOXES")) show_update_boxes = 1;
+ else show_update_boxes = 0;
+ }
evas_render_pre(eo_e, evas);
_evas_planes(e);
@@ -3331,6 +3368,7 @@ evas_render_updates_internal(Evas *eo_e,
for (i = 0; i < e->restack_objects.count; ++i)
{
obj = eina_array_data_get(&e->restack_objects, i);
+ if (!obj->private_data) continue;
if (_evas_render_object_is_mask(obj))
_evas_mask_redraw_set(e, obj);
obj->func->render_pre(obj->object, obj, obj->private_data);
@@ -3396,6 +3434,7 @@ evas_render_updates_internal(Evas *eo_e,
obj = ent->obj;
eo_obj = obj->object;
+ if (!obj->private_data) continue;
if (UNLIKELY(
(!obj->is_smart) &&
(!obj->clip.clipees) &&
@@ -3589,6 +3628,29 @@ evas_render_updates_internal(Evas *eo_e,
eina_evlog("-render_update", eo_e, 0.0, NULL);
if (!do_async)
{
+ if (show_update_boxes == 1)
+ {
+ static int fn = 0;
+ void *ctx;
+
+ fn++;
+ ctx = ENFN->context_new(ENC);
+ ENFN->context_color_set
+ (ENC, ctx, fn & 0xff, 0x40, 0x20, 0xff);
+ ENFN->rectangle_draw(ENC, out->output,
+ ctx, surface,
+ ux - out->geometry.x, uy - out->geometry.y, uw, 1, do_async);
+ ENFN->rectangle_draw(ENC, out->output,
+ ctx, surface,
+ ux - out->geometry.x, uy - out->geometry.y + uh - 1, uw, 1, do_async);
+ ENFN->rectangle_draw(ENC, out->output,
+ ctx, surface,
+ ux - out->geometry.x, uy - out->geometry.y, 1, uh, do_async);
+ ENFN->rectangle_draw(ENC, out->output,
+ ctx, surface,
+ ux - out->geometry.x + uw - 1, uy - out->geometry.y, 1, uh, do_async);
+ ENFN->context_free(ENC, ctx);
+ }
eina_evlog("+render_push", eo_e, 0.0, NULL);
ENFN->output_redraws_next_update_push(ENC, out->output, surface,
ux - out->geometry.x, uy - out->geometry.y, uw, uh,
@@ -3599,6 +3661,33 @@ evas_render_updates_internal(Evas *eo_e,
eina_evlog("-render_surface", eo_e, 0.0, NULL);
}
+ else if (make_updates)
+ {
+ Render_Updates *ru;
+ void *surface;
+ int ux, uy, uw, uh;
+ int cx, cy, cw, ch;
+ while ((surface =
+ ENFN->output_redraws_next_update_get
+ (ENC, out->output,
+ &ux, &uy, &uw, &uh,
+ &cx, &cy, &cw, &ch)))
+ {
+ haveup = EINA_TRUE;
+
+ /* adjust the rendering rectangle to the output offset */
+ ux += out->geometry.x;
+ uy += out->geometry.y;
+ ru = malloc(sizeof(*ru));
+ ru->surface = surface;
+ //XXX: need a way of reffing output surfaces
+ NEW_RECT(ru->area, ux, uy, uw, uh);
+ eina_spinlock_take(&(e->render.lock));
+ out->updates = eina_list_append(out->updates, ru);
+ eina_spinlock_release(&(e->render.lock));
+ }
+
+ }
}
/* First process all output, then flush */
@@ -3636,6 +3725,11 @@ evas_render_updates_internal(Evas *eo_e,
}
eina_evlog("-render_phase8", eo_e, 0.0, NULL);
+ if (evas_font_data_cache_get(EVAS_FONT_DATA_CACHE_TEXTURE) == 0)
+ ENFN->font_glyphs_gc_collect(ENC, 1.0f, NULL, NULL, EINA_TRUE);
+ else
+ ENFN->font_glyphs_gc_collect(ENC, 0.33f, NULL, NULL, EINA_TRUE);
+
eina_evlog("+render_clear", eo_e, 0.0, NULL);
if (!do_async && rendering)
{
@@ -3655,6 +3749,7 @@ evas_render_updates_internal(Evas *eo_e,
obj = ent->obj;
eo_obj = obj->object;
+ if (!obj->private_data) continue;
obj->pre_render_done = EINA_FALSE;
RD(0, " OBJ %s changed:%i do_draw:%i\n", RDNAME(obj), obj->changed, do_draw);
if ((clean_them) || (obj->changed && do_draw))
@@ -3715,6 +3810,7 @@ evas_render_updates_internal(Evas *eo_e,
{
obj = eina_array_data_get(&e->render_objects, i);
eo_obj = obj->object;
+ if (!obj->private_data) continue;
obj->pre_render_done = EINA_FALSE;
if ((obj->changed) && (do_draw))
{
@@ -3725,6 +3821,14 @@ evas_render_updates_internal(Evas *eo_e,
}
eina_evlog("-render_post_reset", eo_e, 0.0, NULL);
+ for (i = 0; i < e->render_post_change_objects.count; ++i)
+ {
+ obj = eina_array_data_get(&e->render_post_change_objects, i);
+ eo_obj = obj->object;
+ evas_object_change(eo_obj, obj);
+ }
+ OBJS_ARRAY_CLEAN(&e->render_post_change_objects);
+
eina_evlog("+render_end", eo_e, 0.0, NULL);
e->changed = EINA_FALSE;
e->viewport.changed = EINA_FALSE;
@@ -3770,14 +3874,17 @@ evas_render_updates_internal(Evas *eo_e,
Render_Updates *ru;
post.updated_area = NULL;
- EINA_LIST_FOREACH(e->outputs, l1, out)
+ if (haveup)
{
- if (!out->output) continue ;
- EINA_LIST_FOREACH(out->updates, l2, ru)
+ EINA_LIST_FOREACH(e->outputs, l1, out)
{
- post.updated_area = eina_list_append(post.updated_area, ru->area);
- //XXX: need a way of unreffing output surfaces
- ru->surface = NULL;
+ if (!out->output) continue ;
+ EINA_LIST_FOREACH(out->updates, l2, ru)
+ {
+ post.updated_area = eina_list_append(post.updated_area, ru->area);
+ //XXX: need a way of unreffing output surfaces
+ ru->surface = NULL;
+ }
}
}
eina_spinlock_take(&(e->render.lock));
@@ -3842,6 +3949,10 @@ evas_render_wakeup(Evas *eo_e)
}
eina_spinlock_release(&(evas->render.lock));
+ /* post rendering */
+ _rendering_evases = eina_list_remove_list(_rendering_evases, evas->rendering);
+ evas->rendering = NULL;
+
/* flush redraws */
if (haveup)
{
@@ -3863,17 +3974,17 @@ evas_render_wakeup(Evas *eo_e)
/* unref queues */
eina_array_foreach(&evas->scie_unref_queue, _drop_scie_ref, NULL);
- eina_array_clean(&evas->scie_unref_queue);
+ eina_array_flush(&evas->scie_unref_queue);
evas_common_rgba_image_scalecache_prune();
eina_array_foreach(&evas->image_unref_queue, _drop_image_cache_ref, NULL);
- eina_array_clean(&evas->image_unref_queue);
+ eina_array_flush(&evas->image_unref_queue);
eina_array_foreach(&evas->glyph_unref_queue, _drop_glyph_ref, NULL);
- eina_array_clean(&evas->glyph_unref_queue);
+ eina_array_flush(&evas->glyph_unref_queue);
eina_array_foreach(&evas->texts_unref_queue, _drop_texts_ref, NULL);
- eina_array_clean(&evas->texts_unref_queue);
+ eina_array_flush(&evas->texts_unref_queue);
SLKL(evas->post_render.lock);
jobs_il = EINA_INLIST_GET(evas->post_render.jobs);
@@ -3889,10 +4000,6 @@ evas_render_wakeup(Evas *eo_e)
free(job);
}
- /* post rendering */
- _rendering_evases = eina_list_remove_list(_rendering_evases, evas->rendering);
- evas->rendering = NULL;
-
post.updated_area = ret_updates;
_cb_always_call(eo_e, evas, EVAS_CALLBACK_RENDER_POST, &post);
evas->inside_post_render = EINA_FALSE;
@@ -3924,9 +4031,11 @@ evas_render_pipe_wakeup(void *data)
Render_Updates *ru;
Evas_Public_Data *evas = data;
Efl_Canvas_Output *out;
+ Evas *e;
eina_evlog("+render_pipe_wakeup", evas->evas, 0.0, NULL);
eina_spinlock_take(&(evas->render.lock));
+ e = evas->evas;
EINA_LIST_FOREACH(evas->outputs, ll, out)
{
if (!out->output) continue ;
@@ -3948,10 +4057,11 @@ evas_render_pipe_wakeup(void *data)
}
eina_spinlock_release(&(evas->render.lock));
evas_async_events_put(data, 0, NULL, evas_render_async_wakeup);
- eina_evlog("-render_pipe_wakeup", evas->evas, 0.0, NULL);
+ /* use local pointer to avoid data race with 'evas' deref after releasing lock */
+ eina_evlog("-render_pipe_wakeup", e, 0.0, NULL);
}
-EAPI void
+EVAS_API void
evas_render_updates_free(Eina_List *updates)
{
Eina_Rectangle *r;
@@ -4039,12 +4149,19 @@ _evas_canvas_render(Eo *eo_e, Evas_Public_Data *e)
EOLIAN void
_evas_canvas_norender(Eo *eo_e, Evas_Public_Data *e)
{
+ evas_canvas_async_block(e);
+ evas_render_updates_internal_wait(eo_e, 0, 0);
+}
+
+EVAS_API void
+evas_norender_with_updates(Eo *eo_e)
+{
+ Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
Eina_List *ret;
Render_Updates *ru;
evas_canvas_async_block(e);
- // if (!e->changed) return;
- ret = evas_render_updates_internal_wait(eo_e, 0, 0);
+ ret = evas_render_updates_internal_wait(eo_e, 1, 0);
EINA_LIST_FREE(ret, ru)
{
eina_rectangle_free(ru->area);
@@ -4078,6 +4195,7 @@ _evas_canvas_render_idle_flush(Eo *eo_e, Evas_Public_Data *evas)
OBJS_ARRAY_FLUSH(&evas->delete_objects);
OBJS_ARRAY_FLUSH(&evas->obscuring_objects);
OBJS_ARRAY_FLUSH(&evas->temporary_objects);
+ OBJS_ARRAY_FLUSH(&evas->map_clip_objects);
eina_array_foreach(&evas->clip_changes, _evas_clip_changes_free, NULL);
eina_array_clean(&evas->clip_changes);
@@ -4194,6 +4312,7 @@ if (Cow) while (eina_cow_gc(Cow))
OBJS_ARRAY_FLUSH(&evas->delete_objects);
OBJS_ARRAY_FLUSH(&evas->obscuring_objects);
OBJS_ARRAY_FLUSH(&evas->temporary_objects);
+ OBJS_ARRAY_FLUSH(&evas->map_clip_objects);
eina_array_foreach(&evas->clip_changes, _evas_clip_changes_free, NULL);
eina_array_clean(&evas->clip_changes);
@@ -4219,6 +4338,7 @@ evas_render_invalidate(Evas *eo_e)
OBJS_ARRAY_FLUSH(&e->delete_objects);
OBJS_ARRAY_FLUSH(&e->snapshot_objects);
+ OBJS_ARRAY_FLUSH(&e->map_clip_objects);
e->invalidate = EINA_TRUE;
}
@@ -4275,5 +4395,16 @@ evas_post_render_job_add(Evas_Public_Data *pd, void (*func)(void *), void *data)
SLKU(pd->post_render.lock);
}
+void
+evas_render_post_change_object_push(Evas_Object_Protected_Data *obj)
+{
+ Evas_Public_Data *e;
+
+ if (!obj || !obj->layer || !obj->layer->evas) return;
+
+ e = obj->layer->evas;
+ OBJ_ARRAY_PUSH(&e->render_post_change_objects, obj);
+}
+
/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
diff --git a/src/lib/evas/canvas/evas_smart.c b/src/lib/evas/canvas/evas_smart.c
index b33ccaef23..470fd8f6a4 100644
--- a/src/lib/evas/canvas/evas_smart.c
+++ b/src/lib/evas/canvas/evas_smart.c
@@ -7,7 +7,7 @@ static void _evas_smart_class_interfaces_create(Evas_Smart *s);
/* all public */
-EAPI void
+EVAS_API void
evas_smart_free(Evas_Smart *s)
{
MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART);
@@ -22,7 +22,7 @@ evas_smart_free(Evas_Smart *s)
free(s);
}
-EAPI Evas_Smart *
+EVAS_API Evas_Smart *
evas_smart_class_new(const Evas_Smart_Class *sc)
{
Evas_Smart *s;
@@ -44,7 +44,7 @@ evas_smart_class_new(const Evas_Smart_Class *sc)
return s;
}
-EAPI const Evas_Smart_Class *
+EVAS_API const Evas_Smart_Class *
evas_smart_class_get(const Evas_Smart *s)
{
MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART);
@@ -53,7 +53,7 @@ evas_smart_class_get(const Evas_Smart *s)
return s->smart_class;
}
-EAPI void *
+EVAS_API void *
evas_smart_data_get(const Evas_Smart *s)
{
MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART);
@@ -62,7 +62,7 @@ evas_smart_data_get(const Evas_Smart *s)
return (void *)s->smart_class->data;
}
-EAPI const Evas_Smart_Cb_Description **
+EVAS_API const Evas_Smart_Cb_Description **
evas_smart_callbacks_descriptions_get(const Evas_Smart *s, unsigned int *count)
{
MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART);
@@ -74,7 +74,7 @@ evas_smart_callbacks_descriptions_get(const Evas_Smart *s, unsigned int *count)
return s->callbacks.array;
}
-EAPI const Evas_Smart_Cb_Description *
+EVAS_API const Evas_Smart_Cb_Description *
evas_smart_callback_description_find(const Evas_Smart *s, const char *name)
{
if (!name) return NULL;
@@ -84,7 +84,7 @@ evas_smart_callback_description_find(const Evas_Smart *s, const char *name)
return evas_smart_cb_description_find(&s->callbacks, name);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_smart_class_inherit_full(Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size)
{
unsigned int off;
@@ -116,7 +116,7 @@ evas_smart_class_inherit_full(Evas_Smart_Class *sc, const Evas_Smart_Class *pare
return EINA_TRUE;
}
-EAPI int
+EVAS_API int
evas_smart_usage_get(const Evas_Smart *s)
{
MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART);
diff --git a/src/lib/evas/canvas/evas_stack.x b/src/lib/evas/canvas/evas_stack.x
index 914d04731e..d390b01759 100644
--- a/src/lib/evas/canvas/evas_stack.x
+++ b/src/lib/evas/canvas/evas_stack.x
@@ -34,7 +34,7 @@ evas_object_below_get_internal(const Evas_Object_Protected_Data *obj)
return NULL;
}
-EAPI void
+EVAS_API void
evas_object_raise(Evas_Object *obj)
{
efl_gfx_stack_raise_to_top((Evas_Object *)obj);
@@ -83,7 +83,7 @@ _efl_canvas_object_efl_gfx_stack_raise_to_top(Eo *eo_obj, Evas_Object_Protected_
}
}
-EAPI void
+EVAS_API void
evas_object_lower(Evas_Object *obj)
{
efl_gfx_stack_lower_to_bottom((Evas_Object *)obj);
@@ -133,7 +133,7 @@ _efl_canvas_object_efl_gfx_stack_lower_to_bottom(Eo *eo_obj, Evas_Object_Protect
}
}
-EAPI void
+EVAS_API void
evas_object_stack_above(Evas_Object *obj, Evas_Object *above)
{
efl_gfx_stack_above((Evas_Object *)obj, above);
@@ -152,6 +152,8 @@ _efl_canvas_object_efl_gfx_stack_stack_above(Eo *eo_obj, Evas_Object_Protected_D
if (eo_obj == eo_above) return;
if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_STACK_ABOVE, 1, eo_above)) return;
Evas_Object_Protected_Data *above = efl_data_scope_get(eo_above, EFL_CANVAS_OBJECT_CLASS);
+ if (!above) return;
+
if ((EINA_INLIST_GET(obj))->prev == EINA_INLIST_GET(above))
{
evas_object_inform_call_restack(eo_obj, obj);
@@ -225,7 +227,7 @@ _efl_canvas_object_efl_gfx_stack_stack_above(Eo *eo_obj, Evas_Object_Protected_D
}
}
-EAPI void
+EVAS_API void
evas_object_stack_below(Evas_Object *obj, Evas_Object *below)
{
efl_gfx_stack_below((Evas_Object *)obj, below);
@@ -242,6 +244,8 @@ _efl_canvas_object_efl_gfx_stack_stack_below(Eo *eo_obj, Evas_Object_Protected_D
if (eo_obj == eo_below) return;
if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_STACK_BELOW, 1, eo_below)) return;
Evas_Object_Protected_Data *below = efl_data_scope_get(eo_below, EFL_CANVAS_OBJECT_CLASS);
+ if (!below) return;
+
if ((EINA_INLIST_GET(obj))->next == EINA_INLIST_GET(below))
{
evas_object_inform_call_restack(eo_obj, obj);
@@ -315,7 +319,7 @@ _efl_canvas_object_efl_gfx_stack_stack_below(Eo *eo_obj, Evas_Object_Protected_D
}
}
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_above_get(const Evas_Object *obj)
{
return efl_gfx_stack_above_get((Evas_Object *)obj);
@@ -344,7 +348,7 @@ _efl_canvas_object_efl_gfx_stack_above_get(Eo *eo_obj EINA_UNUSED,
return NULL;
}
-EAPI Evas_Object *
+EVAS_API Evas_Object *
evas_object_below_get(const Evas_Object *obj)
{
return efl_gfx_stack_below_get((Evas_Object *)obj);
@@ -400,19 +404,22 @@ _evas_canvas_object_top_get(const Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
list = EINA_INLIST_GET(e->layers);
if (!list) return NULL;
- layer = (Evas_Layer *) list->last;
- if (!layer) return NULL;
+ //just in case if layer has no valid objects in the list.
+ EINA_INLIST_REVERSE_FOREACH(list, layer)
+ {
+ if (!layer->objects) continue;
- list = EINA_INLIST_GET(layer->objects);
- if (!list) return NULL;
+ list = EINA_INLIST_GET(layer->objects);
+ if (!list) return NULL;
- obj = (Evas_Object_Protected_Data *) list->last;
- if (!obj) return NULL;
+ obj = (Evas_Object_Protected_Data *) list->last;
+ if (!obj) return NULL;
- while (obj)
- {
- if (!obj->delete_me) return obj->object;
- obj = evas_object_below_get_internal(obj);
+ while (obj)
+ {
+ if (!obj->delete_me) return obj->object;
+ obj = evas_object_below_get_internal(obj);
+ }
}
return NULL;
diff --git a/src/lib/evas/canvas/evas_stats.c b/src/lib/evas/canvas/evas_stats.c
index f178fba088..e889c15cf4 100644
--- a/src/lib/evas/canvas/evas_stats.c
+++ b/src/lib/evas/canvas/evas_stats.c
@@ -2,48 +2,48 @@
#include "evas_private.h"
//#include "evas_cs.h"
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_cserve_want_get(void)
{
return 0;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_cserve_connected_get(void)
{
return 0;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_cserve_stats_get(Evas_Cserve_Stats *stats EINA_UNUSED)
{
return 0;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_cserve_image_cache_contents_get(Evas_Cserve_Image_Cache *cache EINA_UNUSED)
{
return 0;
}
-EAPI void
+EVAS_API void
evas_cserve_image_cache_contents_clean(Evas_Cserve_Image_Cache *cache EINA_UNUSED)
{
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_cserve_config_get(Evas_Cserve_Config *config EINA_UNUSED)
{
return 0;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_cserve_config_set(const Evas_Cserve_Config *config EINA_UNUSED)
{
return 0;
}
-EAPI void
+EVAS_API void
evas_cserve_disconnect(void)
{
}
diff --git a/src/lib/evas/canvas/evas_table_eo.c b/src/lib/evas/canvas/evas_table_eo.c
index 0369d7ced1..d6c05cfb2d 100644
--- a/src/lib/evas/canvas/evas_table_eo.c
+++ b/src/lib/evas/canvas/evas_table_eo.c
@@ -1,71 +1,71 @@
void _evas_table_homogeneous_set(Eo *obj, Evas_Table_Data *pd, Evas_Object_Table_Homogeneous_Mode homogeneous);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_table_homogeneous_set, EFL_FUNC_CALL(homogeneous), Evas_Object_Table_Homogeneous_Mode homogeneous);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_table_homogeneous_set, EFL_FUNC_CALL(homogeneous), Evas_Object_Table_Homogeneous_Mode homogeneous);
Evas_Object_Table_Homogeneous_Mode _evas_table_homogeneous_get(const Eo *obj, Evas_Table_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_table_homogeneous_get, Evas_Object_Table_Homogeneous_Mode, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_table_homogeneous_get, Evas_Object_Table_Homogeneous_Mode, 0);
void _evas_table_align_set(Eo *obj, Evas_Table_Data *pd, double horizontal, double vertical);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_table_align_set, EFL_FUNC_CALL(horizontal, vertical), double horizontal, double vertical);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_table_align_set, EFL_FUNC_CALL(horizontal, vertical), double horizontal, double vertical);
void _evas_table_align_get(const Eo *obj, Evas_Table_Data *pd, double *horizontal, double *vertical);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_table_align_get, EFL_FUNC_CALL(horizontal, vertical), double *horizontal, double *vertical);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_obj_table_align_get, EFL_FUNC_CALL(horizontal, vertical), double *horizontal, double *vertical);
void _evas_table_padding_set(Eo *obj, Evas_Table_Data *pd, int horizontal, int vertical);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_table_padding_set, EFL_FUNC_CALL(horizontal, vertical), int horizontal, int vertical);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_table_padding_set, EFL_FUNC_CALL(horizontal, vertical), int horizontal, int vertical);
void _evas_table_padding_get(const Eo *obj, Evas_Table_Data *pd, int *horizontal, int *vertical);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_table_padding_get, EFL_FUNC_CALL(horizontal, vertical), int *horizontal, int *vertical);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_obj_table_padding_get, EFL_FUNC_CALL(horizontal, vertical), int *horizontal, int *vertical);
void _evas_table_col_row_size_get(const Eo *obj, Evas_Table_Data *pd, int *cols, int *rows);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_table_col_row_size_get, EFL_FUNC_CALL(cols, rows), int *cols, int *rows);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_obj_table_col_row_size_get, EFL_FUNC_CALL(cols, rows), int *cols, int *rows);
Eina_List *_evas_table_children_get(const Eo *obj, Evas_Table_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_table_children_get, Eina_List *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_table_children_get, Eina_List *, NULL);
Efl_Canvas_Object *_evas_table_child_get(const Eo *obj, Evas_Table_Data *pd, unsigned short col, unsigned short row);
-EOAPI EFL_FUNC_BODYV_CONST(evas_obj_table_child_get, Efl_Canvas_Object *, NULL, EFL_FUNC_CALL(col, row), unsigned short col, unsigned short row);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_obj_table_child_get, Efl_Canvas_Object *, NULL, EFL_FUNC_CALL(col, row), unsigned short col, unsigned short row);
void _evas_table_clear(Eo *obj, Evas_Table_Data *pd, Eina_Bool clear);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_table_clear, EFL_FUNC_CALL(clear), Eina_Bool clear);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_table_clear, EFL_FUNC_CALL(clear), Eina_Bool clear);
Eina_Accessor *_evas_table_accessor_new(const Eo *obj, Evas_Table_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_table_accessor_new, Eina_Accessor *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_table_accessor_new, Eina_Accessor *, NULL);
Eina_Iterator *_evas_table_iterator_new(const Eo *obj, Evas_Table_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_table_iterator_new, Eina_Iterator *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_table_iterator_new, Eina_Iterator *, NULL);
Efl_Canvas_Object *_evas_table_add_to(Eo *obj, Evas_Table_Data *pd);
-EOAPI EFL_FUNC_BODY(evas_obj_table_add_to, Efl_Canvas_Object *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY(evas_obj_table_add_to, Efl_Canvas_Object *, NULL);
Eina_Bool _evas_table_pack_get(const Eo *obj, Evas_Table_Data *pd, Efl_Canvas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan);
-EOAPI EFL_FUNC_BODYV_CONST(evas_obj_table_pack_get, Eina_Bool, 0, EFL_FUNC_CALL(child, col, row, colspan, rowspan), Efl_Canvas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_obj_table_pack_get, Eina_Bool, 0, EFL_FUNC_CALL(child, col, row, colspan, rowspan), Efl_Canvas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan);
Eina_Bool _evas_table_pack(Eo *obj, Evas_Table_Data *pd, Efl_Canvas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
-EOAPI EFL_FUNC_BODYV(evas_obj_table_pack, Eina_Bool, 0, EFL_FUNC_CALL(child, col, row, colspan, rowspan), Efl_Canvas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_table_pack, Eina_Bool, 0, EFL_FUNC_CALL(child, col, row, colspan, rowspan), Efl_Canvas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
Eina_Bool _evas_table_unpack(Eo *obj, Evas_Table_Data *pd, Efl_Canvas_Object *child);
-EOAPI EFL_FUNC_BODYV(evas_obj_table_unpack, Eina_Bool, 0, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV(evas_obj_table_unpack, Eina_Bool, 0, EFL_FUNC_CALL(child), Efl_Canvas_Object *child);
int _evas_table_count(Eo *obj, Evas_Table_Data *pd);
-EOAPI EFL_FUNC_BODY(evas_obj_table_count, int, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY(evas_obj_table_count, int, 0);
Efl_Object *_evas_table_efl_object_constructor(Eo *obj, Evas_Table_Data *pd);
@@ -137,6 +137,6 @@ static const Efl_Class_Description _evas_table_class_desc = {
NULL
};
-EFL_DEFINE_CLASS(evas_table_class_get, &_evas_table_class_desc, EFL_CANVAS_GROUP_CLASS, NULL);
+EFL_DEFINE_CLASS(evas_table_class_get, &_evas_table_class_desc, EFL_CANVAS_GROUP_CLASS, EFL_UI_I18N_INTERFACE, NULL);
#include "evas_table_eo.legacy.c"
diff --git a/src/lib/evas/canvas/evas_table_eo.h b/src/lib/evas/canvas/evas_table_eo.h
index 576e109320..f4c2f0c272 100644
--- a/src/lib/evas/canvas/evas_table_eo.h
+++ b/src/lib/evas/canvas/evas_table_eo.h
@@ -17,7 +17,7 @@ typedef Eo Evas_Table;
* See @ref evas_obj_table_homogeneous_get for an explanation of the function
* of each one.
*
- * @ingroup Evas_Object_Table
+ * @ingroup Evas_Object_Table_Group
*/
typedef enum
{
@@ -34,7 +34,7 @@ typedef enum
*/
#define EVAS_TABLE_CLASS evas_table_class_get()
-EWAPI const Efl_Class *evas_table_class_get(void);
+EVAS_API EVAS_API_WEAK const Efl_Class *evas_table_class_get(void) EINA_CONST;
/**
* @brief Set how this table should layout children.
@@ -78,7 +78,7 @@ EWAPI const Efl_Class *evas_table_class_get(void);
*
* @ingroup Evas_Table
*/
-EOAPI void evas_obj_table_homogeneous_set(Eo *obj, Evas_Object_Table_Homogeneous_Mode homogeneous);
+EVAS_API EVAS_API_WEAK void evas_obj_table_homogeneous_set(Eo *obj, Evas_Object_Table_Homogeneous_Mode homogeneous);
/**
* @brief Set how this table should layout children.
@@ -123,7 +123,7 @@ EOAPI void evas_obj_table_homogeneous_set(Eo *obj, Evas_Object_Table_Homogeneous
*
* @ingroup Evas_Table
*/
-EOAPI Evas_Object_Table_Homogeneous_Mode evas_obj_table_homogeneous_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK Evas_Object_Table_Homogeneous_Mode evas_obj_table_homogeneous_get(const Eo *obj);
/**
* @brief Control the alignment of the whole bounding box of contents.
@@ -134,7 +134,7 @@ EOAPI Evas_Object_Table_Homogeneous_Mode evas_obj_table_homogeneous_get(const Eo
*
* @ingroup Evas_Table
*/
-EOAPI void evas_obj_table_align_set(Eo *obj, double horizontal, double vertical);
+EVAS_API EVAS_API_WEAK void evas_obj_table_align_set(Eo *obj, double horizontal, double vertical);
/**
* @brief Control the alignment of the whole bounding box of contents.
@@ -145,7 +145,7 @@ EOAPI void evas_obj_table_align_set(Eo *obj, double horizontal, double vertical)
*
* @ingroup Evas_Table
*/
-EOAPI void evas_obj_table_align_get(const Eo *obj, double *horizontal, double *vertical);
+EVAS_API EVAS_API_WEAK void evas_obj_table_align_get(const Eo *obj, double *horizontal, double *vertical);
/**
* @brief Control the padding between cells.
@@ -156,7 +156,7 @@ EOAPI void evas_obj_table_align_get(const Eo *obj, double *horizontal, double *v
*
* @ingroup Evas_Table
*/
-EOAPI void evas_obj_table_padding_set(Eo *obj, int horizontal, int vertical);
+EVAS_API EVAS_API_WEAK void evas_obj_table_padding_set(Eo *obj, int horizontal, int vertical);
/**
* @brief Control the padding between cells.
@@ -167,7 +167,7 @@ EOAPI void evas_obj_table_padding_set(Eo *obj, int horizontal, int vertical);
*
* @ingroup Evas_Table
*/
-EOAPI void evas_obj_table_padding_get(const Eo *obj, int *horizontal, int *vertical);
+EVAS_API EVAS_API_WEAK void evas_obj_table_padding_get(const Eo *obj, int *horizontal, int *vertical);
/**
* @brief Get the number of columns and rows this table takes.
@@ -182,7 +182,7 @@ EOAPI void evas_obj_table_padding_get(const Eo *obj, int *horizontal, int *verti
*
* @ingroup Evas_Table
*/
-EOAPI void evas_obj_table_col_row_size_get(const Eo *obj, int *cols, int *rows);
+EVAS_API EVAS_API_WEAK void evas_obj_table_col_row_size_get(const Eo *obj, int *cols, int *rows);
/**
* @brief Get the list of children for the table.
@@ -198,7 +198,7 @@ EOAPI void evas_obj_table_col_row_size_get(const Eo *obj, int *cols, int *rows);
*
* @ingroup Evas_Table
*/
-EOAPI Eina_List *evas_obj_table_children_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Eina_List *evas_obj_table_children_get(const Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Get the child of the table at the given coordinates
@@ -213,7 +213,7 @@ EOAPI Eina_List *evas_obj_table_children_get(const Eo *obj) EINA_WARN_UNUSED_RES
*
* @ingroup Evas_Table
*/
-EOAPI Efl_Canvas_Object *evas_obj_table_child_get(const Eo *obj, unsigned short col, unsigned short row);
+EVAS_API EVAS_API_WEAK Efl_Canvas_Object *evas_obj_table_child_get(const Eo *obj, unsigned short col, unsigned short row);
/**
* @brief Faster way to remove all child objects from a table object.
@@ -223,7 +223,7 @@ EOAPI Efl_Canvas_Object *evas_obj_table_child_get(const Eo *obj, unsigned short
*
* @ingroup Evas_Table
*/
-EOAPI void evas_obj_table_clear(Eo *obj, Eina_Bool clear);
+EVAS_API EVAS_API_WEAK void evas_obj_table_clear(Eo *obj, Eina_Bool clear);
/**
* @brief Get an accessor to get random access to the list of children for the
@@ -237,7 +237,7 @@ EOAPI void evas_obj_table_clear(Eo *obj, Eina_Bool clear);
*
* @ingroup Evas_Table
*/
-EOAPI Eina_Accessor *evas_obj_table_accessor_new(const Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Eina_Accessor *evas_obj_table_accessor_new(const Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Get an iterator to walk the list of children for the table.
@@ -250,7 +250,7 @@ EOAPI Eina_Accessor *evas_obj_table_accessor_new(const Eo *obj) EINA_WARN_UNUSED
*
* @ingroup Evas_Table
*/
-EOAPI Eina_Iterator *evas_obj_table_iterator_new(const Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Eina_Iterator *evas_obj_table_iterator_new(const Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Create a table that is child of a given element @c parent.
@@ -261,7 +261,7 @@ EOAPI Eina_Iterator *evas_obj_table_iterator_new(const Eo *obj) EINA_WARN_UNUSED
*
* @ingroup Evas_Table
*/
-EOAPI Efl_Canvas_Object *evas_obj_table_add_to(Eo *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API EVAS_API_WEAK Efl_Canvas_Object *evas_obj_table_add_to(Eo *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Get packing location of a child of table
@@ -282,7 +282,7 @@ EOAPI Efl_Canvas_Object *evas_obj_table_add_to(Eo *obj) EINA_WARN_UNUSED_RESULT;
*
* @ingroup Evas_Table
*/
-EOAPI Eina_Bool evas_obj_table_pack_get(const Eo *obj, Efl_Canvas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan);
+EVAS_API EVAS_API_WEAK Eina_Bool evas_obj_table_pack_get(const Eo *obj, Efl_Canvas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan);
/**
* @brief Add a new child to a table object or set its current packing.
@@ -306,7 +306,7 @@ EOAPI Eina_Bool evas_obj_table_pack_get(const Eo *obj, Efl_Canvas_Object *child,
*
* @ingroup Evas_Table
*/
-EOAPI Eina_Bool evas_obj_table_pack(Eo *obj, Efl_Canvas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK Eina_Bool evas_obj_table_pack(Eo *obj, Efl_Canvas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) EINA_ARG_NONNULL(2);
/**
* @brief Remove child from table.
@@ -322,7 +322,7 @@ EOAPI Eina_Bool evas_obj_table_pack(Eo *obj, Efl_Canvas_Object *child, unsigned
*
* @ingroup Evas_Table
*/
-EOAPI Eina_Bool evas_obj_table_unpack(Eo *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
+EVAS_API EVAS_API_WEAK Eina_Bool evas_obj_table_unpack(Eo *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
/**
* @brief Returns the number of items in the table
@@ -333,6 +333,6 @@ EOAPI Eina_Bool evas_obj_table_unpack(Eo *obj, Efl_Canvas_Object *child) EINA_AR
*
* @ingroup Evas_Table
*/
-EOAPI int evas_obj_table_count(Eo *obj);
+EVAS_API EVAS_API_WEAK int evas_obj_table_count(Eo *obj);
#endif
diff --git a/src/lib/evas/canvas/evas_table_eo.legacy.c b/src/lib/evas/canvas/evas_table_eo.legacy.c
index 9e449a38d9..bbec2b6eab 100644
--- a/src/lib/evas/canvas/evas_table_eo.legacy.c
+++ b/src/lib/evas/canvas/evas_table_eo.legacy.c
@@ -1,95 +1,95 @@
-EAPI void
+EVAS_API void
evas_object_table_homogeneous_set(Evas_Table *obj, Evas_Object_Table_Homogeneous_Mode homogeneous)
{
evas_obj_table_homogeneous_set(obj, homogeneous);
}
-EAPI Evas_Object_Table_Homogeneous_Mode
+EVAS_API Evas_Object_Table_Homogeneous_Mode
evas_object_table_homogeneous_get(const Evas_Table *obj)
{
return evas_obj_table_homogeneous_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_table_align_set(Evas_Table *obj, double horizontal, double vertical)
{
evas_obj_table_align_set(obj, horizontal, vertical);
}
-EAPI void
+EVAS_API void
evas_object_table_align_get(const Evas_Table *obj, double *horizontal, double *vertical)
{
evas_obj_table_align_get(obj, horizontal, vertical);
}
-EAPI void
+EVAS_API void
evas_object_table_padding_set(Evas_Table *obj, int horizontal, int vertical)
{
evas_obj_table_padding_set(obj, horizontal, vertical);
}
-EAPI void
+EVAS_API void
evas_object_table_padding_get(const Evas_Table *obj, int *horizontal, int *vertical)
{
evas_obj_table_padding_get(obj, horizontal, vertical);
}
-EAPI void
+EVAS_API void
evas_object_table_col_row_size_get(const Evas_Table *obj, int *cols, int *rows)
{
evas_obj_table_col_row_size_get(obj, cols, rows);
}
-EAPI Eina_List *
+EVAS_API Eina_List *
evas_object_table_children_get(const Evas_Table *obj)
{
return evas_obj_table_children_get(obj);
}
-EAPI Efl_Canvas_Object *
+EVAS_API Efl_Canvas_Object *
evas_object_table_child_get(const Evas_Table *obj, unsigned short col, unsigned short row)
{
return evas_obj_table_child_get(obj, col, row);
}
-EAPI void
+EVAS_API void
evas_object_table_clear(Evas_Table *obj, Eina_Bool clear)
{
evas_obj_table_clear(obj, clear);
}
-EAPI Eina_Accessor *
+EVAS_API Eina_Accessor *
evas_object_table_accessor_new(const Evas_Table *obj)
{
return evas_obj_table_accessor_new(obj);
}
-EAPI Eina_Iterator *
+EVAS_API Eina_Iterator *
evas_object_table_iterator_new(const Evas_Table *obj)
{
return evas_obj_table_iterator_new(obj);
}
-EAPI Efl_Canvas_Object *
+EVAS_API Efl_Canvas_Object *
evas_object_table_add_to(Evas_Table *obj)
{
return evas_obj_table_add_to(obj);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_table_pack_get(const Evas_Table *obj, Efl_Canvas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan)
{
return evas_obj_table_pack_get(obj, child, col, row, colspan, rowspan);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_table_pack(Evas_Table *obj, Efl_Canvas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
{
return evas_obj_table_pack(obj, child, col, row, colspan, rowspan);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_table_unpack(Evas_Table *obj, Efl_Canvas_Object *child)
{
return evas_obj_table_unpack(obj, child);
diff --git a/src/lib/evas/canvas/evas_table_eo.legacy.h b/src/lib/evas/canvas/evas_table_eo.legacy.h
index d7fc5d1b1b..70ae788c32 100644
--- a/src/lib/evas/canvas/evas_table_eo.legacy.h
+++ b/src/lib/evas/canvas/evas_table_eo.legacy.h
@@ -71,7 +71,7 @@ typedef enum
*
* @ingroup Evas_Object_Table_Group
*/
-EAPI void evas_object_table_homogeneous_set(Evas_Table *obj, Evas_Object_Table_Homogeneous_Mode homogeneous);
+EVAS_API void evas_object_table_homogeneous_set(Evas_Table *obj, Evas_Object_Table_Homogeneous_Mode homogeneous);
/**
* @brief Set how this table should layout children.
@@ -116,7 +116,7 @@ EAPI void evas_object_table_homogeneous_set(Evas_Table *obj, Evas_Object_Table_H
*
* @ingroup Evas_Object_Table_Group
*/
-EAPI Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get(const Evas_Table *obj);
+EVAS_API Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get(const Evas_Table *obj);
/**
* @brief Control the alignment of the whole bounding box of contents.
@@ -127,7 +127,7 @@ EAPI Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get(const
*
* @ingroup Evas_Object_Table_Group
*/
-EAPI void evas_object_table_align_set(Evas_Table *obj, double horizontal, double vertical);
+EVAS_API void evas_object_table_align_set(Evas_Table *obj, double horizontal, double vertical);
/**
* @brief Control the alignment of the whole bounding box of contents.
@@ -138,7 +138,7 @@ EAPI void evas_object_table_align_set(Evas_Table *obj, double horizontal, double
*
* @ingroup Evas_Object_Table_Group
*/
-EAPI void evas_object_table_align_get(const Evas_Table *obj, double *horizontal, double *vertical);
+EVAS_API void evas_object_table_align_get(const Evas_Table *obj, double *horizontal, double *vertical);
/**
* @brief Control the padding between cells.
@@ -149,7 +149,7 @@ EAPI void evas_object_table_align_get(const Evas_Table *obj, double *horizontal,
*
* @ingroup Evas_Object_Table_Group
*/
-EAPI void evas_object_table_padding_set(Evas_Table *obj, int horizontal, int vertical);
+EVAS_API void evas_object_table_padding_set(Evas_Table *obj, int horizontal, int vertical);
/**
* @brief Control the padding between cells.
@@ -160,7 +160,7 @@ EAPI void evas_object_table_padding_set(Evas_Table *obj, int horizontal, int ver
*
* @ingroup Evas_Object_Table_Group
*/
-EAPI void evas_object_table_padding_get(const Evas_Table *obj, int *horizontal, int *vertical);
+EVAS_API void evas_object_table_padding_get(const Evas_Table *obj, int *horizontal, int *vertical);
/**
* @brief Get the number of columns and rows this table takes.
@@ -175,7 +175,7 @@ EAPI void evas_object_table_padding_get(const Evas_Table *obj, int *horizontal,
*
* @ingroup Evas_Object_Table_Group
*/
-EAPI void evas_object_table_col_row_size_get(const Evas_Table *obj, int *cols, int *rows);
+EVAS_API void evas_object_table_col_row_size_get(const Evas_Table *obj, int *cols, int *rows);
/**
* @brief Get the list of children for the table.
@@ -191,7 +191,7 @@ EAPI void evas_object_table_col_row_size_get(const Evas_Table *obj, int *cols, i
*
* @ingroup Evas_Object_Table_Group
*/
-EAPI Eina_List *evas_object_table_children_get(const Evas_Table *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Eina_List *evas_object_table_children_get(const Evas_Table *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Get the child of the table at the given coordinates
@@ -206,7 +206,7 @@ EAPI Eina_List *evas_object_table_children_get(const Evas_Table *obj) EINA_WARN_
*
* @ingroup Evas_Object_Table_Group
*/
-EAPI Efl_Canvas_Object *evas_object_table_child_get(const Evas_Table *obj, unsigned short col, unsigned short row);
+EVAS_API Efl_Canvas_Object *evas_object_table_child_get(const Evas_Table *obj, unsigned short col, unsigned short row);
/**
* @brief Faster way to remove all child objects from a table object.
@@ -216,7 +216,7 @@ EAPI Efl_Canvas_Object *evas_object_table_child_get(const Evas_Table *obj, unsig
*
* @ingroup Evas_Object_Table_Group
*/
-EAPI void evas_object_table_clear(Evas_Table *obj, Eina_Bool clear);
+EVAS_API void evas_object_table_clear(Evas_Table *obj, Eina_Bool clear);
/**
* @brief Get an accessor to get random access to the list of children for the
@@ -230,7 +230,7 @@ EAPI void evas_object_table_clear(Evas_Table *obj, Eina_Bool clear);
*
* @ingroup Evas_Object_Table_Group
*/
-EAPI Eina_Accessor *evas_object_table_accessor_new(const Evas_Table *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Eina_Accessor *evas_object_table_accessor_new(const Evas_Table *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Get an iterator to walk the list of children for the table.
@@ -243,7 +243,7 @@ EAPI Eina_Accessor *evas_object_table_accessor_new(const Evas_Table *obj) EINA_W
*
* @ingroup Evas_Object_Table_Group
*/
-EAPI Eina_Iterator *evas_object_table_iterator_new(const Evas_Table *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Eina_Iterator *evas_object_table_iterator_new(const Evas_Table *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Create a table that is child of a given element @c parent.
@@ -254,7 +254,7 @@ EAPI Eina_Iterator *evas_object_table_iterator_new(const Evas_Table *obj) EINA_W
*
* @ingroup Evas_Object_Table_Group
*/
-EAPI Efl_Canvas_Object *evas_object_table_add_to(Evas_Table *obj) EINA_WARN_UNUSED_RESULT;
+EVAS_API Efl_Canvas_Object *evas_object_table_add_to(Evas_Table *obj) EINA_WARN_UNUSED_RESULT;
/**
* @brief Get packing location of a child of table
@@ -275,7 +275,7 @@ EAPI Efl_Canvas_Object *evas_object_table_add_to(Evas_Table *obj) EINA_WARN_UNUS
*
* @ingroup Evas_Object_Table_Group
*/
-EAPI Eina_Bool evas_object_table_pack_get(const Evas_Table *obj, Efl_Canvas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan);
+EVAS_API Eina_Bool evas_object_table_pack_get(const Evas_Table *obj, Efl_Canvas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan);
/**
* @brief Add a new child to a table object or set its current packing.
@@ -299,7 +299,7 @@ EAPI Eina_Bool evas_object_table_pack_get(const Evas_Table *obj, Efl_Canvas_Obje
*
* @ingroup Evas_Object_Table_Group
*/
-EAPI Eina_Bool evas_object_table_pack(Evas_Table *obj, Efl_Canvas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) EINA_ARG_NONNULL(2);
+EVAS_API Eina_Bool evas_object_table_pack(Evas_Table *obj, Efl_Canvas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) EINA_ARG_NONNULL(2);
/**
* @brief Remove child from table.
@@ -315,7 +315,7 @@ EAPI Eina_Bool evas_object_table_pack(Evas_Table *obj, Efl_Canvas_Object *child,
*
* @ingroup Evas_Object_Table_Group
*/
-EAPI Eina_Bool evas_object_table_unpack(Evas_Table *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
+EVAS_API Eina_Bool evas_object_table_unpack(Evas_Table *obj, Efl_Canvas_Object *child) EINA_ARG_NONNULL(2);
#endif
diff --git a/src/lib/evas/canvas/evas_text_eo.c b/src/lib/evas/canvas/evas_text_eo.c
index b2139f82d1..6cc1824163 100644
--- a/src/lib/evas/canvas/evas_text_eo.c
+++ b/src/lib/evas/canvas/evas_text_eo.c
@@ -1,11 +1,11 @@
void _evas_text_shadow_color_set(Eo *obj, Evas_Text_Data *pd, int r, int g, int b, int a);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_text_shadow_color_set, EFL_FUNC_CALL(r, g, b, a), int r, int g, int b, int a);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_text_shadow_color_set, EFL_FUNC_CALL(r, g, b, a), int r, int g, int b, int a);
void _evas_text_shadow_color_get(const Eo *obj, Evas_Text_Data *pd, int *r, int *g, int *b, int *a);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_text_shadow_color_get, EFL_FUNC_CALL(r, g, b, a), int *r, int *g, int *b, int *a);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_obj_text_shadow_color_get, EFL_FUNC_CALL(r, g, b, a), int *r, int *g, int *b, int *a);
void _evas_text_ellipsis_set(Eo *obj, Evas_Text_Data *pd, double ellipsis);
@@ -25,7 +25,7 @@ __eolian_evas_text_ellipsis_set_reflect(Eo *obj, Eina_Value val)
return r;
}
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_text_ellipsis_set, EFL_FUNC_CALL(ellipsis), double ellipsis);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_text_ellipsis_set, EFL_FUNC_CALL(ellipsis), double ellipsis);
double _evas_text_ellipsis_get(const Eo *obj, Evas_Text_Data *pd);
@@ -37,7 +37,7 @@ __eolian_evas_text_ellipsis_get_reflect(const Eo *obj)
return eina_value_double_init(val);
}
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_ellipsis_get, double, -1.000000 /* +1.000000 */);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_text_ellipsis_get, double, -1.000000 /* +1.000000 */);
void _evas_text_bidi_delimiters_set(Eo *obj, Evas_Text_Data *pd, const char *delim);
@@ -57,7 +57,7 @@ __eolian_evas_text_bidi_delimiters_set_reflect(Eo *obj, Eina_Value val)
return r;
}
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_text_bidi_delimiters_set, EFL_FUNC_CALL(delim), const char *delim);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_text_bidi_delimiters_set, EFL_FUNC_CALL(delim), const char *delim);
const char *_evas_text_bidi_delimiters_get(const Eo *obj, Evas_Text_Data *pd);
@@ -69,87 +69,87 @@ __eolian_evas_text_bidi_delimiters_get_reflect(const Eo *obj)
return eina_value_string_init(val);
}
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_bidi_delimiters_get, const char *, NULL);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_text_bidi_delimiters_get, const char *, NULL);
void _evas_text_outline_color_set(Eo *obj, Evas_Text_Data *pd, int r, int g, int b, int a);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_text_outline_color_set, EFL_FUNC_CALL(r, g, b, a), int r, int g, int b, int a);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_text_outline_color_set, EFL_FUNC_CALL(r, g, b, a), int r, int g, int b, int a);
void _evas_text_outline_color_get(const Eo *obj, Evas_Text_Data *pd, int *r, int *g, int *b, int *a);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_text_outline_color_get, EFL_FUNC_CALL(r, g, b, a), int *r, int *g, int *b, int *a);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_obj_text_outline_color_get, EFL_FUNC_CALL(r, g, b, a), int *r, int *g, int *b, int *a);
void _evas_text_glow2_color_set(Eo *obj, Evas_Text_Data *pd, int r, int g, int b, int a);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_text_glow2_color_set, EFL_FUNC_CALL(r, g, b, a), int r, int g, int b, int a);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_text_glow2_color_set, EFL_FUNC_CALL(r, g, b, a), int r, int g, int b, int a);
void _evas_text_glow2_color_get(const Eo *obj, Evas_Text_Data *pd, int *r, int *g, int *b, int *a);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_text_glow2_color_get, EFL_FUNC_CALL(r, g, b, a), int *r, int *g, int *b, int *a);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_obj_text_glow2_color_get, EFL_FUNC_CALL(r, g, b, a), int *r, int *g, int *b, int *a);
void _evas_text_style_set(Eo *obj, Evas_Text_Data *pd, Evas_Text_Style_Type style);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_text_style_set, EFL_FUNC_CALL(style), Evas_Text_Style_Type style);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_text_style_set, EFL_FUNC_CALL(style), Evas_Text_Style_Type style);
Evas_Text_Style_Type _evas_text_style_get(const Eo *obj, Evas_Text_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_style_get, Evas_Text_Style_Type, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_text_style_get, Evas_Text_Style_Type, 0);
void _evas_text_glow_color_set(Eo *obj, Evas_Text_Data *pd, int r, int g, int b, int a);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_text_glow_color_set, EFL_FUNC_CALL(r, g, b, a), int r, int g, int b, int a);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_text_glow_color_set, EFL_FUNC_CALL(r, g, b, a), int r, int g, int b, int a);
void _evas_text_glow_color_get(const Eo *obj, Evas_Text_Data *pd, int *r, int *g, int *b, int *a);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_text_glow_color_get, EFL_FUNC_CALL(r, g, b, a), int *r, int *g, int *b, int *a);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_obj_text_glow_color_get, EFL_FUNC_CALL(r, g, b, a), int *r, int *g, int *b, int *a);
int _evas_text_max_descent_get(const Eo *obj, Evas_Text_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_max_descent_get, int, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_text_max_descent_get, int, 0);
void _evas_text_style_pad_get(const Eo *obj, Evas_Text_Data *pd, int *l, int *r, int *t, int *b);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_text_style_pad_get, EFL_FUNC_CALL(l, r, t, b), int *l, int *r, int *t, int *b);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_obj_text_style_pad_get, EFL_FUNC_CALL(l, r, t, b), int *l, int *r, int *t, int *b);
Efl_Text_Bidirectional_Type _evas_text_direction_get(const Eo *obj, Evas_Text_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_direction_get, Efl_Text_Bidirectional_Type, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_text_direction_get, Efl_Text_Bidirectional_Type, 0);
int _evas_text_ascent_get(const Eo *obj, Evas_Text_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_ascent_get, int, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_text_ascent_get, int, 0);
int _evas_text_horiz_advance_get(const Eo *obj, Evas_Text_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_horiz_advance_get, int, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_text_horiz_advance_get, int, 0);
int _evas_text_inset_get(const Eo *obj, Evas_Text_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_inset_get, int, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_text_inset_get, int, 0);
int _evas_text_max_ascent_get(const Eo *obj, Evas_Text_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_max_ascent_get, int, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_text_max_ascent_get, int, 0);
int _evas_text_vert_advance_get(const Eo *obj, Evas_Text_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_vert_advance_get, int, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_text_vert_advance_get, int, 0);
int _evas_text_descent_get(const Eo *obj, Evas_Text_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_text_descent_get, int, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_text_descent_get, int, 0);
int _evas_text_last_up_to_pos(const Eo *obj, Evas_Text_Data *pd, int x, int y);
-EOAPI EFL_FUNC_BODYV_CONST(evas_obj_text_last_up_to_pos, int, -1 /* +1 */, EFL_FUNC_CALL(x, y), int x, int y);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_obj_text_last_up_to_pos, int, -1 /* +1 */, EFL_FUNC_CALL(x, y), int x, int y);
int _evas_text_char_coords_get(const Eo *obj, Evas_Text_Data *pd, int x, int y, int *cx, int *cy, int *cw, int *ch);
-EOAPI EFL_FUNC_BODYV_CONST(evas_obj_text_char_coords_get, int, 0, EFL_FUNC_CALL(x, y, cx, cy, cw, ch), int x, int y, int *cx, int *cy, int *cw, int *ch);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_obj_text_char_coords_get, int, 0, EFL_FUNC_CALL(x, y, cx, cy, cw, ch), int x, int y, int *cx, int *cy, int *cw, int *ch);
Eina_Bool _evas_text_char_pos_get(const Eo *obj, Evas_Text_Data *pd, int pos, int *cx, int *cy, int *cw, int *ch);
-EOAPI EFL_FUNC_BODYV_CONST(evas_obj_text_char_pos_get, Eina_Bool, 0, EFL_FUNC_CALL(pos, cx, cy, cw, ch), int pos, int *cx, int *cy, int *cw, int *ch);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_obj_text_char_pos_get, Eina_Bool, 0, EFL_FUNC_CALL(pos, cx, cy, cw, ch), int pos, int *cx, int *cy, int *cw, int *ch);
Efl_Object *_evas_text_efl_object_constructor(Eo *obj, Evas_Text_Data *pd);
diff --git a/src/lib/evas/canvas/evas_text_eo.h b/src/lib/evas/canvas/evas_text_eo.h
index 93ce36e834..c1c7e6b94d 100644
--- a/src/lib/evas/canvas/evas_text_eo.h
+++ b/src/lib/evas/canvas/evas_text_eo.h
@@ -19,7 +19,7 @@ typedef Eo Evas_Text;
*/
#define EVAS_TEXT_CLASS evas_text_class_get()
-EWAPI const Efl_Class *evas_text_class_get(void);
+EVAS_API EVAS_API_WEAK const Efl_Class *evas_text_class_get(void) EINA_CONST;
/**
* @brief Controls the shadow color for the given text object.
@@ -46,7 +46,7 @@ EWAPI const Efl_Class *evas_text_class_get(void);
*
* @ingroup Evas_Text
*/
-EOAPI void evas_obj_text_shadow_color_set(Eo *obj, int r, int g, int b, int a);
+EVAS_API EVAS_API_WEAK void evas_obj_text_shadow_color_set(Eo *obj, int r, int g, int b, int a);
/**
* @brief Controls the shadow color for the given text object.
@@ -76,7 +76,7 @@ EOAPI void evas_obj_text_shadow_color_set(Eo *obj, int r, int g, int b, int a);
*
* @ingroup Evas_Text
*/
-EOAPI void evas_obj_text_shadow_color_get(const Eo *obj, int *r, int *g, int *b, int *a);
+EVAS_API EVAS_API_WEAK void evas_obj_text_shadow_color_get(const Eo *obj, int *r, int *g, int *b, int *a);
/**
* @brief Controls the ellipsis that should be used for the text object.
@@ -94,7 +94,7 @@ EOAPI void evas_obj_text_shadow_color_get(const Eo *obj, int *r, int *g, int *b,
*
* @ingroup Evas_Text
*/
-EOAPI void evas_obj_text_ellipsis_set(Eo *obj, double ellipsis);
+EVAS_API EVAS_API_WEAK void evas_obj_text_ellipsis_set(Eo *obj, double ellipsis);
/**
* @brief Controls the ellipsis that should be used for the text object.
@@ -113,7 +113,7 @@ EOAPI void evas_obj_text_ellipsis_set(Eo *obj, double ellipsis);
*
* @ingroup Evas_Text
*/
-EOAPI double evas_obj_text_ellipsis_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK double evas_obj_text_ellipsis_get(const Eo *obj);
/**
* @brief Sets the BiDi delimiters used in the textblock.
@@ -129,7 +129,7 @@ EOAPI double evas_obj_text_ellipsis_get(const Eo *obj);
*
* @ingroup Evas_Text
*/
-EOAPI void evas_obj_text_bidi_delimiters_set(Eo *obj, const char *delim);
+EVAS_API EVAS_API_WEAK void evas_obj_text_bidi_delimiters_set(Eo *obj, const char *delim);
/**
* @brief Sets the BiDi delimiters used in the textblock.
@@ -146,7 +146,7 @@ EOAPI void evas_obj_text_bidi_delimiters_set(Eo *obj, const char *delim);
*
* @ingroup Evas_Text
*/
-EOAPI const char *evas_obj_text_bidi_delimiters_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK const char *evas_obj_text_bidi_delimiters_get(const Eo *obj);
/**
* @brief Controls the outline color for the given text object.
@@ -165,7 +165,7 @@ EOAPI const char *evas_obj_text_bidi_delimiters_get(const Eo *obj);
*
* @ingroup Evas_Text
*/
-EOAPI void evas_obj_text_outline_color_set(Eo *obj, int r, int g, int b, int a);
+EVAS_API EVAS_API_WEAK void evas_obj_text_outline_color_set(Eo *obj, int r, int g, int b, int a);
/**
* @brief Controls the outline color for the given text object.
@@ -184,7 +184,7 @@ EOAPI void evas_obj_text_outline_color_set(Eo *obj, int r, int g, int b, int a);
*
* @ingroup Evas_Text
*/
-EOAPI void evas_obj_text_outline_color_get(const Eo *obj, int *r, int *g, int *b, int *a);
+EVAS_API EVAS_API_WEAK void evas_obj_text_outline_color_get(const Eo *obj, int *r, int *g, int *b, int *a);
/**
* @brief Sets the 'glow 2' color for the given text object.
@@ -202,7 +202,7 @@ EOAPI void evas_obj_text_outline_color_get(const Eo *obj, int *r, int *g, int *b
*
* @ingroup Evas_Text
*/
-EOAPI void evas_obj_text_glow2_color_set(Eo *obj, int r, int g, int b, int a);
+EVAS_API EVAS_API_WEAK void evas_obj_text_glow2_color_set(Eo *obj, int r, int g, int b, int a);
/**
* @brief Sets the 'glow 2' color for the given text object.
@@ -220,7 +220,7 @@ EOAPI void evas_obj_text_glow2_color_set(Eo *obj, int r, int g, int b, int a);
*
* @ingroup Evas_Text
*/
-EOAPI void evas_obj_text_glow2_color_get(const Eo *obj, int *r, int *g, int *b, int *a);
+EVAS_API EVAS_API_WEAK void evas_obj_text_glow2_color_get(const Eo *obj, int *r, int *g, int *b, int *a);
/**
* @brief Controls the style to apply on the given text object.
@@ -237,7 +237,7 @@ EOAPI void evas_obj_text_glow2_color_get(const Eo *obj, int *r, int *g, int *b,
*
* @ingroup Evas_Text
*/
-EOAPI void evas_obj_text_style_set(Eo *obj, Evas_Text_Style_Type style);
+EVAS_API EVAS_API_WEAK void evas_obj_text_style_set(Eo *obj, Evas_Text_Style_Type style);
/**
* @brief Controls the style to apply on the given text object.
@@ -255,7 +255,7 @@ EOAPI void evas_obj_text_style_set(Eo *obj, Evas_Text_Style_Type style);
*
* @ingroup Evas_Text
*/
-EOAPI Evas_Text_Style_Type evas_obj_text_style_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK Evas_Text_Style_Type evas_obj_text_style_get(const Eo *obj);
/**
* @brief Sets the glow color for the given text object.
@@ -276,7 +276,7 @@ EOAPI Evas_Text_Style_Type evas_obj_text_style_get(const Eo *obj);
*
* @ingroup Evas_Text
*/
-EOAPI void evas_obj_text_glow_color_set(Eo *obj, int r, int g, int b, int a);
+EVAS_API EVAS_API_WEAK void evas_obj_text_glow_color_set(Eo *obj, int r, int g, int b, int a);
/**
* @brief Sets the glow color for the given text object.
@@ -297,7 +297,7 @@ EOAPI void evas_obj_text_glow_color_set(Eo *obj, int r, int g, int b, int a);
*
* @ingroup Evas_Text
*/
-EOAPI void evas_obj_text_glow_color_get(const Eo *obj, int *r, int *g, int *b, int *a);
+EVAS_API EVAS_API_WEAK void evas_obj_text_glow_color_get(const Eo *obj, int *r, int *g, int *b, int *a);
/**
* @brief Maximal descent property
@@ -308,7 +308,7 @@ EOAPI void evas_obj_text_glow_color_get(const Eo *obj, int *r, int *g, int *b, i
*
* @ingroup Evas_Text
*/
-EOAPI int evas_obj_text_max_descent_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK int evas_obj_text_max_descent_get(const Eo *obj);
/**
* @brief Gets the text style pad of a text object.
@@ -321,7 +321,7 @@ EOAPI int evas_obj_text_max_descent_get(const Eo *obj);
*
* @ingroup Evas_Text
*/
-EOAPI void evas_obj_text_style_pad_get(const Eo *obj, int *l, int *r, int *t, int *b);
+EVAS_API EVAS_API_WEAK void evas_obj_text_style_pad_get(const Eo *obj, int *l, int *r, int *t, int *b);
/**
* @brief Retrieves the direction of the text currently being displayed in the
@@ -333,7 +333,7 @@ EOAPI void evas_obj_text_style_pad_get(const Eo *obj, int *l, int *r, int *t, in
*
* @ingroup Evas_Text
*/
-EOAPI Efl_Text_Bidirectional_Type evas_obj_text_direction_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK Efl_Text_Bidirectional_Type evas_obj_text_direction_get(const Eo *obj);
/**
* @brief Ascent property
@@ -344,7 +344,7 @@ EOAPI Efl_Text_Bidirectional_Type evas_obj_text_direction_get(const Eo *obj);
*
* @ingroup Evas_Text
*/
-EOAPI int evas_obj_text_ascent_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK int evas_obj_text_ascent_get(const Eo *obj);
/**
* @brief Horizontal advance property
@@ -355,7 +355,7 @@ EOAPI int evas_obj_text_ascent_get(const Eo *obj);
*
* @ingroup Evas_Text
*/
-EOAPI int evas_obj_text_horiz_advance_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK int evas_obj_text_horiz_advance_get(const Eo *obj);
/**
* @brief Inset property
@@ -366,7 +366,7 @@ EOAPI int evas_obj_text_horiz_advance_get(const Eo *obj);
*
* @ingroup Evas_Text
*/
-EOAPI int evas_obj_text_inset_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK int evas_obj_text_inset_get(const Eo *obj);
/**
* @brief Maximal ascent property
@@ -377,7 +377,7 @@ EOAPI int evas_obj_text_inset_get(const Eo *obj);
*
* @ingroup Evas_Text
*/
-EOAPI int evas_obj_text_max_ascent_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK int evas_obj_text_max_ascent_get(const Eo *obj);
/**
* @brief Vertical advance property
@@ -388,7 +388,7 @@ EOAPI int evas_obj_text_max_ascent_get(const Eo *obj);
*
* @ingroup Evas_Text
*/
-EOAPI int evas_obj_text_vert_advance_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK int evas_obj_text_vert_advance_get(const Eo *obj);
/**
* @brief descent property
@@ -399,7 +399,7 @@ EOAPI int evas_obj_text_vert_advance_get(const Eo *obj);
*
* @ingroup Evas_Text
*/
-EOAPI int evas_obj_text_descent_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK int evas_obj_text_descent_get(const Eo *obj);
/**
* @brief Returns the logical position of the last char in the text up to the
@@ -416,7 +416,7 @@ EOAPI int evas_obj_text_descent_get(const Eo *obj);
*
* @ingroup Evas_Text
*/
-EOAPI int evas_obj_text_last_up_to_pos(const Eo *obj, int x, int y);
+EVAS_API EVAS_API_WEAK int evas_obj_text_last_up_to_pos(const Eo *obj, int x, int y);
/**
* @brief Get character coordinates
@@ -433,7 +433,7 @@ EOAPI int evas_obj_text_last_up_to_pos(const Eo *obj, int x, int y);
*
* @ingroup Evas_Text
*/
-EOAPI int evas_obj_text_char_coords_get(const Eo *obj, int x, int y, int *cx, int *cy, int *cw, int *ch);
+EVAS_API EVAS_API_WEAK int evas_obj_text_char_coords_get(const Eo *obj, int x, int y, int *cx, int *cy, int *cw, int *ch);
/**
* @brief Retrieve position and dimension information of a character within a
@@ -457,6 +457,6 @@ EOAPI int evas_obj_text_char_coords_get(const Eo *obj, int x, int y, int *cx, in
*
* @ingroup Evas_Text
*/
-EOAPI Eina_Bool evas_obj_text_char_pos_get(const Eo *obj, int pos, int *cx, int *cy, int *cw, int *ch);
+EVAS_API EVAS_API_WEAK Eina_Bool evas_obj_text_char_pos_get(const Eo *obj, int pos, int *cx, int *cy, int *cw, int *ch);
#endif
diff --git a/src/lib/evas/canvas/evas_text_eo.legacy.c b/src/lib/evas/canvas/evas_text_eo.legacy.c
index dca5395e10..03a1672a61 100644
--- a/src/lib/evas/canvas/evas_text_eo.legacy.c
+++ b/src/lib/evas/canvas/evas_text_eo.legacy.c
@@ -1,155 +1,155 @@
-EAPI void
+EVAS_API void
evas_object_text_shadow_color_set(Evas_Text *obj, int r, int g, int b, int a)
{
evas_obj_text_shadow_color_set(obj, r, g, b, a);
}
-EAPI void
+EVAS_API void
evas_object_text_shadow_color_get(const Evas_Text *obj, int *r, int *g, int *b, int *a)
{
evas_obj_text_shadow_color_get(obj, r, g, b, a);
}
-EAPI void
+EVAS_API void
evas_object_text_ellipsis_set(Evas_Text *obj, double ellipsis)
{
evas_obj_text_ellipsis_set(obj, ellipsis);
}
-EAPI double
+EVAS_API double
evas_object_text_ellipsis_get(const Evas_Text *obj)
{
return evas_obj_text_ellipsis_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_text_bidi_delimiters_set(Evas_Text *obj, const char *delim)
{
evas_obj_text_bidi_delimiters_set(obj, delim);
}
-EAPI const char *
+EVAS_API const char *
evas_object_text_bidi_delimiters_get(const Evas_Text *obj)
{
return evas_obj_text_bidi_delimiters_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_text_outline_color_set(Evas_Text *obj, int r, int g, int b, int a)
{
evas_obj_text_outline_color_set(obj, r, g, b, a);
}
-EAPI void
+EVAS_API void
evas_object_text_outline_color_get(const Evas_Text *obj, int *r, int *g, int *b, int *a)
{
evas_obj_text_outline_color_get(obj, r, g, b, a);
}
-EAPI void
+EVAS_API void
evas_object_text_glow2_color_set(Evas_Text *obj, int r, int g, int b, int a)
{
evas_obj_text_glow2_color_set(obj, r, g, b, a);
}
-EAPI void
+EVAS_API void
evas_object_text_glow2_color_get(const Evas_Text *obj, int *r, int *g, int *b, int *a)
{
evas_obj_text_glow2_color_get(obj, r, g, b, a);
}
-EAPI void
+EVAS_API void
evas_object_text_style_set(Evas_Text *obj, Evas_Text_Style_Type style)
{
evas_obj_text_style_set(obj, style);
}
-EAPI Evas_Text_Style_Type
+EVAS_API Evas_Text_Style_Type
evas_object_text_style_get(const Evas_Text *obj)
{
return evas_obj_text_style_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_text_glow_color_set(Evas_Text *obj, int r, int g, int b, int a)
{
evas_obj_text_glow_color_set(obj, r, g, b, a);
}
-EAPI void
+EVAS_API void
evas_object_text_glow_color_get(const Evas_Text *obj, int *r, int *g, int *b, int *a)
{
evas_obj_text_glow_color_get(obj, r, g, b, a);
}
-EAPI int
+EVAS_API int
evas_object_text_max_descent_get(const Evas_Text *obj)
{
return evas_obj_text_max_descent_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_text_style_pad_get(const Evas_Text *obj, int *l, int *r, int *t, int *b)
{
evas_obj_text_style_pad_get(obj, l, r, t, b);
}
-EAPI Efl_Text_Bidirectional_Type
+EVAS_API Efl_Text_Bidirectional_Type
evas_object_text_direction_get(const Evas_Text *obj)
{
return evas_obj_text_direction_get(obj);
}
-EAPI int
+EVAS_API int
evas_object_text_ascent_get(const Evas_Text *obj)
{
return evas_obj_text_ascent_get(obj);
}
-EAPI int
+EVAS_API int
evas_object_text_horiz_advance_get(const Evas_Text *obj)
{
return evas_obj_text_horiz_advance_get(obj);
}
-EAPI int
+EVAS_API int
evas_object_text_inset_get(const Evas_Text *obj)
{
return evas_obj_text_inset_get(obj);
}
-EAPI int
+EVAS_API int
evas_object_text_max_ascent_get(const Evas_Text *obj)
{
return evas_obj_text_max_ascent_get(obj);
}
-EAPI int
+EVAS_API int
evas_object_text_vert_advance_get(const Evas_Text *obj)
{
return evas_obj_text_vert_advance_get(obj);
}
-EAPI int
+EVAS_API int
evas_object_text_descent_get(const Evas_Text *obj)
{
return evas_obj_text_descent_get(obj);
}
-EAPI int
+EVAS_API int
evas_object_text_last_up_to_pos(const Evas_Text *obj, int x, int y)
{
return evas_obj_text_last_up_to_pos(obj, x, y);
}
-EAPI int
+EVAS_API int
evas_object_text_char_coords_get(const Evas_Text *obj, int x, int y, int *cx, int *cy, int *cw, int *ch)
{
return evas_obj_text_char_coords_get(obj, x, y, cx, cy, cw, ch);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_object_text_char_pos_get(const Evas_Text *obj, int pos, int *cx, int *cy, int *cw, int *ch)
{
return evas_obj_text_char_pos_get(obj, pos, cx, cy, cw, ch);
diff --git a/src/lib/evas/canvas/evas_text_eo.legacy.h b/src/lib/evas/canvas/evas_text_eo.legacy.h
index 9d43f65ee0..50183fbd74 100644
--- a/src/lib/evas/canvas/evas_text_eo.legacy.h
+++ b/src/lib/evas/canvas/evas_text_eo.legacy.h
@@ -39,7 +39,7 @@ typedef Eo Evas_Text;
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI void evas_object_text_shadow_color_set(Evas_Text *obj, int r, int g, int b, int a);
+EVAS_API void evas_object_text_shadow_color_set(Evas_Text *obj, int r, int g, int b, int a);
/**
* @brief Controls the shadow color for the given text object.
@@ -69,7 +69,7 @@ EAPI void evas_object_text_shadow_color_set(Evas_Text *obj, int r, int g, int b,
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI void evas_object_text_shadow_color_get(const Evas_Text *obj, int *r, int *g, int *b, int *a);
+EVAS_API void evas_object_text_shadow_color_get(const Evas_Text *obj, int *r, int *g, int *b, int *a);
/**
* @brief Controls the ellipsis that should be used for the text object.
@@ -87,7 +87,7 @@ EAPI void evas_object_text_shadow_color_get(const Evas_Text *obj, int *r, int *g
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI void evas_object_text_ellipsis_set(Evas_Text *obj, double ellipsis);
+EVAS_API void evas_object_text_ellipsis_set(Evas_Text *obj, double ellipsis);
/**
* @brief Controls the ellipsis that should be used for the text object.
@@ -106,7 +106,7 @@ EAPI void evas_object_text_ellipsis_set(Evas_Text *obj, double ellipsis);
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI double evas_object_text_ellipsis_get(const Evas_Text *obj);
+EVAS_API double evas_object_text_ellipsis_get(const Evas_Text *obj);
/**
* @brief Sets the BiDi delimiters used in the textblock.
@@ -122,7 +122,7 @@ EAPI double evas_object_text_ellipsis_get(const Evas_Text *obj);
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI void evas_object_text_bidi_delimiters_set(Evas_Text *obj, const char *delim);
+EVAS_API void evas_object_text_bidi_delimiters_set(Evas_Text *obj, const char *delim);
/**
* @brief Sets the BiDi delimiters used in the textblock.
@@ -139,7 +139,7 @@ EAPI void evas_object_text_bidi_delimiters_set(Evas_Text *obj, const char *delim
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI const char *evas_object_text_bidi_delimiters_get(const Evas_Text *obj);
+EVAS_API const char *evas_object_text_bidi_delimiters_get(const Evas_Text *obj);
/**
* @brief Controls the outline color for the given text object.
@@ -158,7 +158,7 @@ EAPI const char *evas_object_text_bidi_delimiters_get(const Evas_Text *obj);
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI void evas_object_text_outline_color_set(Evas_Text *obj, int r, int g, int b, int a);
+EVAS_API void evas_object_text_outline_color_set(Evas_Text *obj, int r, int g, int b, int a);
/**
* @brief Controls the outline color for the given text object.
@@ -177,7 +177,7 @@ EAPI void evas_object_text_outline_color_set(Evas_Text *obj, int r, int g, int b
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI void evas_object_text_outline_color_get(const Evas_Text *obj, int *r, int *g, int *b, int *a);
+EVAS_API void evas_object_text_outline_color_get(const Evas_Text *obj, int *r, int *g, int *b, int *a);
/**
* @brief Sets the 'glow 2' color for the given text object.
@@ -195,7 +195,7 @@ EAPI void evas_object_text_outline_color_get(const Evas_Text *obj, int *r, int *
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI void evas_object_text_glow2_color_set(Evas_Text *obj, int r, int g, int b, int a);
+EVAS_API void evas_object_text_glow2_color_set(Evas_Text *obj, int r, int g, int b, int a);
/**
* @brief Sets the 'glow 2' color for the given text object.
@@ -213,7 +213,7 @@ EAPI void evas_object_text_glow2_color_set(Evas_Text *obj, int r, int g, int b,
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI void evas_object_text_glow2_color_get(const Evas_Text *obj, int *r, int *g, int *b, int *a);
+EVAS_API void evas_object_text_glow2_color_get(const Evas_Text *obj, int *r, int *g, int *b, int *a);
/**
* @brief Controls the style to apply on the given text object.
@@ -230,7 +230,7 @@ EAPI void evas_object_text_glow2_color_get(const Evas_Text *obj, int *r, int *g,
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI void evas_object_text_style_set(Evas_Text *obj, Evas_Text_Style_Type style);
+EVAS_API void evas_object_text_style_set(Evas_Text *obj, Evas_Text_Style_Type style);
/**
* @brief Controls the style to apply on the given text object.
@@ -248,7 +248,7 @@ EAPI void evas_object_text_style_set(Evas_Text *obj, Evas_Text_Style_Type style)
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI Evas_Text_Style_Type evas_object_text_style_get(const Evas_Text *obj);
+EVAS_API Evas_Text_Style_Type evas_object_text_style_get(const Evas_Text *obj);
/**
* @brief Sets the glow color for the given text object.
@@ -269,7 +269,7 @@ EAPI Evas_Text_Style_Type evas_object_text_style_get(const Evas_Text *obj);
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI void evas_object_text_glow_color_set(Evas_Text *obj, int r, int g, int b, int a);
+EVAS_API void evas_object_text_glow_color_set(Evas_Text *obj, int r, int g, int b, int a);
/**
* @brief Sets the glow color for the given text object.
@@ -290,7 +290,7 @@ EAPI void evas_object_text_glow_color_set(Evas_Text *obj, int r, int g, int b, i
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI void evas_object_text_glow_color_get(const Evas_Text *obj, int *r, int *g, int *b, int *a);
+EVAS_API void evas_object_text_glow_color_get(const Evas_Text *obj, int *r, int *g, int *b, int *a);
/**
* @brief Maximal descent property
@@ -301,7 +301,7 @@ EAPI void evas_object_text_glow_color_get(const Evas_Text *obj, int *r, int *g,
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI int evas_object_text_max_descent_get(const Evas_Text *obj);
+EVAS_API int evas_object_text_max_descent_get(const Evas_Text *obj);
/**
* @brief Gets the text style pad of a text object.
@@ -314,7 +314,7 @@ EAPI int evas_object_text_max_descent_get(const Evas_Text *obj);
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI void evas_object_text_style_pad_get(const Evas_Text *obj, int *l, int *r, int *t, int *b);
+EVAS_API void evas_object_text_style_pad_get(const Evas_Text *obj, int *l, int *r, int *t, int *b);
/**
* @brief Retrieves the direction of the text currently being displayed in the
@@ -326,7 +326,7 @@ EAPI void evas_object_text_style_pad_get(const Evas_Text *obj, int *l, int *r, i
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI Efl_Text_Bidirectional_Type evas_object_text_direction_get(const Evas_Text *obj);
+EVAS_API Efl_Text_Bidirectional_Type evas_object_text_direction_get(const Evas_Text *obj);
/**
* @brief Ascent property
@@ -337,7 +337,7 @@ EAPI Efl_Text_Bidirectional_Type evas_object_text_direction_get(const Evas_Text
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI int evas_object_text_ascent_get(const Evas_Text *obj);
+EVAS_API int evas_object_text_ascent_get(const Evas_Text *obj);
/**
* @brief Horizontal advance property
@@ -348,7 +348,7 @@ EAPI int evas_object_text_ascent_get(const Evas_Text *obj);
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI int evas_object_text_horiz_advance_get(const Evas_Text *obj);
+EVAS_API int evas_object_text_horiz_advance_get(const Evas_Text *obj);
/**
* @brief Inset property
@@ -359,7 +359,7 @@ EAPI int evas_object_text_horiz_advance_get(const Evas_Text *obj);
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI int evas_object_text_inset_get(const Evas_Text *obj);
+EVAS_API int evas_object_text_inset_get(const Evas_Text *obj);
/**
* @brief Maximal ascent property
@@ -370,7 +370,7 @@ EAPI int evas_object_text_inset_get(const Evas_Text *obj);
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI int evas_object_text_max_ascent_get(const Evas_Text *obj);
+EVAS_API int evas_object_text_max_ascent_get(const Evas_Text *obj);
/**
* @brief Vertical advance property
@@ -381,7 +381,7 @@ EAPI int evas_object_text_max_ascent_get(const Evas_Text *obj);
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI int evas_object_text_vert_advance_get(const Evas_Text *obj);
+EVAS_API int evas_object_text_vert_advance_get(const Evas_Text *obj);
/**
* @brief descent property
@@ -392,7 +392,7 @@ EAPI int evas_object_text_vert_advance_get(const Evas_Text *obj);
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI int evas_object_text_descent_get(const Evas_Text *obj);
+EVAS_API int evas_object_text_descent_get(const Evas_Text *obj);
/**
* @brief Returns the logical position of the last char in the text up to the
@@ -409,7 +409,7 @@ EAPI int evas_object_text_descent_get(const Evas_Text *obj);
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI int evas_object_text_last_up_to_pos(const Evas_Text *obj, int x, int y);
+EVAS_API int evas_object_text_last_up_to_pos(const Evas_Text *obj, int x, int y);
/**
* @brief Get character coordinates
@@ -426,7 +426,7 @@ EAPI int evas_object_text_last_up_to_pos(const Evas_Text *obj, int x, int y);
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI int evas_object_text_char_coords_get(const Evas_Text *obj, int x, int y, int *cx, int *cy, int *cw, int *ch);
+EVAS_API int evas_object_text_char_coords_get(const Evas_Text *obj, int x, int y, int *cx, int *cy, int *cw, int *ch);
/**
* @brief Retrieve position and dimension information of a character within a
@@ -450,6 +450,6 @@ EAPI int evas_object_text_char_coords_get(const Evas_Text *obj, int x, int y, in
*
* @ingroup Evas_Object_Text_Group
*/
-EAPI Eina_Bool evas_object_text_char_pos_get(const Evas_Text *obj, int pos, int *cx, int *cy, int *cw, int *ch);
+EVAS_API Eina_Bool evas_object_text_char_pos_get(const Evas_Text *obj, int pos, int *cx, int *cy, int *cw, int *ch);
#endif
diff --git a/src/lib/evas/canvas/evas_textblock_legacy.h b/src/lib/evas/canvas/evas_textblock_legacy.h
index b852c0d61b..b7905eec0d 100644
--- a/src/lib/evas/canvas/evas_textblock_legacy.h
+++ b/src/lib/evas/canvas/evas_textblock_legacy.h
@@ -1,8 +1,8 @@
/**
- * @defgroup Evas_Object_Textblock Textblock Object Functions
+ * @defgroup Evas_Object_Textblock_Group Textblock Object Functions
*
* Functions used to create and manipulate textblock objects. Unlike
- * @ref Evas_Object_Text, these handle complex text, doing multiple
+ * @ref Evas_Object_Text_Group, these handle complex text, doing multiple
* styles and multiline text based on HTML-like tags. Of these extra
* features will be heavier on memory and processing cost.
*
@@ -118,8 +118,7 @@
* @li password - "on" or "off". This is used to specifically turn replacing chars with the replacement char (i.e password mode) on and off.
*
* @warning We don't guarantee any proper results if you create a Textblock
- * object
- * without setting the evas engine.
+ * object without setting the evas engine.
*
* @todo put here some usage examples
*
@@ -196,7 +195,7 @@ typedef enum _Evas_Textblock_Cursor_Type
* @param escape the string to be escaped
* @return the unescaped version of escape
*/
-EAPI const char *evas_textblock_escape_string_get(const char *escape) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+EVAS_API const char *evas_textblock_escape_string_get(const char *escape) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
/**
* Returns the escaped version of the string.
@@ -204,7 +203,7 @@ EAPI const char *evas_textblock_escape_string_get(c
* @param len_ret the len of the part of the string that was used.
* @return the escaped string.
*/
-EAPI const char *evas_textblock_string_escape_get(const char *string, int *len_ret) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+EVAS_API const char *evas_textblock_string_escape_get(const char *string, int *len_ret) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
/**
* Return the unescaped version of the string between start and end.
@@ -213,19 +212,19 @@ EAPI const char *evas_textblock_string_escape_get(c
* @param escape_end the end of the string.
* @return the unescaped version of the range
*/
-EAPI const char *evas_textblock_escape_string_range_get(const char *escape_start, const char *escape_end) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
+EVAS_API const char *evas_textblock_escape_string_range_get(const char *escape_start, const char *escape_end) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
/**
* Creates a new textblock style.
* @return The new textblock style.
*/
-EAPI Evas_Textblock_Style *evas_textblock_style_new(void) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
+EVAS_API Evas_Textblock_Style *evas_textblock_style_new(void) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
/**
* Destroys a textblock style.
* @param ts The textblock style to free.
*/
-EAPI void evas_textblock_style_free(Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1);
+EVAS_API void evas_textblock_style_free(Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1);
/**
* Sets the style ts to the style passed as text by text.
@@ -235,14 +234,14 @@ EAPI void evas_textblock_style_free(Evas_Tex
* @param text the text to parse - NOT NULL.
* @return Returns no value.
*/
-EAPI void evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) EINA_ARG_NONNULL(1);
+EVAS_API void evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) EINA_ARG_NONNULL(1);
/**
* Return the text of the style ts.
* @param ts the style to get it's text.
* @return the text of the style or null on error.
*/
-EAPI const char *evas_textblock_style_get(const Evas_Textblock_Style *ts) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+EVAS_API const char *evas_textblock_style_get(const Evas_Textblock_Style *ts) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
/**
* Returns the next format node (after n)
@@ -250,7 +249,7 @@ EAPI const char *evas_textblock_style_get(const Eva
* @param n the current format node - not null.
* @return Returns the next format node, may be null.
*/
-EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_next_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1);
+EVAS_API const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_next_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1);
/**
* Returns the prev format node (after n)
@@ -258,7 +257,7 @@ EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_next_ge
* @param n the current format node - not null.
* @return Returns the prev format node, may be null.
*/
-EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_prev_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1);
+EVAS_API const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_prev_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1);
/**
* Sets the cursor to point to the place where format points to.
@@ -267,7 +266,7 @@ EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_prev_ge
* @param n the format node to update according.
* @deprecated duplicate of evas_textblock_cursor_at_format_set
*/
-EAPI void evas_textblock_cursor_set_at_format(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2);
+EVAS_API void evas_textblock_cursor_set_at_format(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2);
/**
* Return the format node at the position pointed by cur.
@@ -276,7 +275,7 @@ EAPI void evas_textblock_cursor_set_at_forma
* @return the format node if found, @c NULL otherwise.
* @see evas_textblock_cursor_format_is_visible_get()
*/
-EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+EVAS_API const Evas_Object_Textblock_Node_Format *evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
/**
* Get the text format representation of the format node.
@@ -284,7 +283,7 @@ EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_cursor_format_get(c
* @param fnode the format node.
* @return the textual format of the format node.
*/
-EAPI const char *evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *fnode) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+EVAS_API const char *evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *fnode) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
/**
* Set the cursor to point to the position of fmt.
@@ -292,7 +291,7 @@ EAPI const char *evas_textblock_node_format_text_ge
* @param cur the cursor to update
* @param fmt the format to update according to.
*/
-EAPI void evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt) EINA_ARG_NONNULL(1, 2);
+EVAS_API void evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt) EINA_ARG_NONNULL(1, 2);
/**
* Check if the current cursor position is a visible format. This way is more
@@ -304,7 +303,7 @@ EAPI void evas_textblock_cursor_at_format_se
* otherwise.
* @see evas_textblock_cursor_format_get()
*/
-EAPI Eina_Bool evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+EVAS_API Eina_Bool evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
/**
* Advances to the next format node
@@ -312,7 +311,7 @@ EAPI Eina_Bool evas_textblock_cursor_format_is_vi
* @param cur the cursor to be updated.
* @return @c EINA_TRUE on success @c EINA_FALSE otherwise.
*/
-EAPI Eina_Bool evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+EVAS_API Eina_Bool evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
/**
* Advances to the previous format node.
@@ -320,7 +319,7 @@ EAPI Eina_Bool evas_textblock_cursor_format_next(
* @param cur the cursor to update.
* @return @c EINA_TRUE on success @c EINA_FALSE otherwise.
*/
-EAPI Eina_Bool evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+EVAS_API Eina_Bool evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
/**
* Returns true if the cursor points to a format.
@@ -329,7 +328,7 @@ EAPI Eina_Bool evas_textblock_cursor_format_prev(
* @return @c EINA_TRUE if a cursor points to a format @c EINA_FALSE
* otherwise.
*/
-EAPI Eina_Bool evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
+EVAS_API Eina_Bool evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
/**
* Return the current cursor pos.
@@ -337,7 +336,7 @@ EAPI Eina_Bool evas_textblock_cursor_is_format(co
* @param cur the cursor to take the position from.
* @return the position or -1 on error
*/
-EAPI int evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+EVAS_API int evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
/**
* Go to the start of the line passed
@@ -346,7 +345,7 @@ EAPI int evas_textblock_cursor_pos_get(cons
* @param line number to set.
* @return @c EINA_TRUE on success, @c EINA_FALSE on error.
*/
-EAPI Eina_Bool evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line) EINA_ARG_NONNULL(1);
+EVAS_API Eina_Bool evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line) EINA_ARG_NONNULL(1);
/**
* Adds format to the current cursor position. If the format being added is a
@@ -371,7 +370,7 @@ EAPI Eina_Bool evas_textblock_cursor_line_set(Eva
* @param cur the cursor to look at.
* @return @c EINA_TRUE if the cursor points to the terminating null, @c EINA_FALSE otherwise.
*/
-EAPI Eina_Bool evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2);
+EVAS_API Eina_Bool evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2);
/**
* Adds format to the current cursor position. If the format being added is a
@@ -388,7 +387,7 @@ EAPI Eina_Bool evas_textblock_cursor_format_appen
* @return Returns true if a visible format was added, false otherwise.
* @see evas_textblock_cursor_format_prepend()
*/
-EAPI Eina_Bool evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2);
+EVAS_API Eina_Bool evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2);
/**
* Delete the range between cur1 and cur2.
@@ -397,7 +396,7 @@ EAPI Eina_Bool evas_textblock_cursor_format_prepe
* @param cur2 the second side of the range
* @return Returns no value.
*/
-EAPI void evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_Cursor *cur2) EINA_ARG_NONNULL(1, 2);
+EVAS_API void evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_Cursor *cur2) EINA_ARG_NONNULL(1, 2);
/**
* Return the text of the paragraph cur points to - returns the text in markup.
@@ -405,7 +404,7 @@ EAPI void evas_textblock_cursor_range_delete
* @param cur the cursor pointing to the paragraph.
* @return the text on success, @c NULL otherwise.
*/
-EAPI const char *evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+EVAS_API const char *evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
/**
* Return the length of the paragraph, cheaper the eina_unicode_strlen()
@@ -413,7 +412,7 @@ EAPI const char *evas_textblock_cursor_paragraph_te
* @param cur the position of the paragraph.
* @return the length of the paragraph on success, -1 otehrwise.
*/
-EAPI int evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+EVAS_API int evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
/**
* Return the currently visible range.
@@ -423,7 +422,7 @@ EAPI int evas_textblock_cursor_paragraph_te
* @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
* @since 1.1
*/
-EAPI Eina_Bool evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end) EINA_ARG_NONNULL(1, 2);
+EVAS_API Eina_Bool evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end) EINA_ARG_NONNULL(1, 2);
/**
* Return the format nodes in the range between cur1 and cur2.
@@ -433,7 +432,7 @@ EAPI Eina_Bool evas_textblock_cursor_visible_rang
* @return the foramt nodes in the range. You have to free it.
* @since 1.1
*/
-EAPI Eina_List *evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
+EVAS_API Eina_List *evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
/**
* Return the text in the range between cur1 and cur2
@@ -444,7 +443,7 @@ EAPI Eina_List *evas_textblock_cursor_range_format
* @return the text in the range
* @see elm_entry_markup_to_utf8()
*/
-EAPI char *evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
+EVAS_API char *evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
/**
* Return the content of the cursor.
@@ -454,7 +453,7 @@ EAPI char *evas_textblock_cursor_range_text_g
* @param cur the cursor
* @return the text in the range, terminated by a nul byte (may be utf8).
*/
-EAPI char *evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+EVAS_API char *evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
/**
* Returns the geometry of two cursors ("split cursor"), if logical cursor is
@@ -479,7 +478,7 @@ EAPI char *evas_textblock_cursor_content_get(
* @return @c EINA_TRUE for split cursor, @c EINA_FALSE otherwise
* @since 1.8
*/
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_textblock_cursor_geometry_bidi_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_Coord *cx2, Evas_Coord *cy2, Evas_Coord *cw2, Evas_Coord *ch2, Evas_Textblock_Cursor_Type ctype);
/**
@@ -504,7 +503,7 @@ evas_textblock_cursor_geometry_bidi_get(const Evas_Textblock_Cursor *cur, Evas_C
* @param ctype the type of the cursor.
* @return line number of the char on success, -1 on error.
*/
-EAPI int evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_BiDi_Direction *dir, Evas_Textblock_Cursor_Type ctype) EINA_ARG_NONNULL(1);
+EVAS_API int evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_BiDi_Direction *dir, Evas_Textblock_Cursor_Type ctype) EINA_ARG_NONNULL(1);
/**
* Returns the geometry of the char at cur.
@@ -516,7 +515,7 @@ EAPI int evas_textblock_cursor_geometry_get
* @param ch the h of the char.
* @return line number of the char on success, -1 on error.
*/
-EAPI int evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
+EVAS_API int evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
/**
* Returns the geometry of the pen at cur.
@@ -528,7 +527,7 @@ EAPI int evas_textblock_cursor_char_geometr
* @param ch the h of the char.
* @return line number of the char on success, -1 on error.
*/
-EAPI int evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cpen_x, Evas_Coord *cy, Evas_Coord *cadv, Evas_Coord *ch) EINA_ARG_NONNULL(1);
+EVAS_API int evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cpen_x, Evas_Coord *cy, Evas_Coord *cadv, Evas_Coord *ch) EINA_ARG_NONNULL(1);
/**
* Returns the geometry of the line at cur.
@@ -540,7 +539,7 @@ EAPI int evas_textblock_cursor_pen_geometry
* @param ch the height of the line.
* @return line number of the line on success, -1 on error.
*/
-EAPI int evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
+EVAS_API int evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
/**
* Set the cursor position according to the y coord.
@@ -549,7 +548,7 @@ EAPI int evas_textblock_cursor_line_geometr
* @param y the coord to set by.
* @return the line number found, -1 on error.
*/
-EAPI int evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y) EINA_ARG_NONNULL(1);
+EVAS_API int evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y) EINA_ARG_NONNULL(1);
/**
* Get the geometry of a range.
@@ -558,11 +557,11 @@ EAPI int evas_textblock_cursor_line_coord_s
* @param cur2 other side of the range.
* @return a list of Rectangles representing the geometry of the range.
*/
-EAPI Eina_List *evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
+EVAS_API Eina_List *evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
/**
* Get the simple geometry of a range.
- * The simple geometry is the geomtry in which rectangles in middle
+ * The simple geometry is the geometry in which rectangles in middle
* lines of range are merged into one big rectangle.
* @since 1.13
*
@@ -570,15 +569,11 @@ EAPI Eina_List *evas_textblock_cursor_range_geomet
* @param cur2 other side of the range.
* @return an iterator of rectangles representing the geometry of the range.
*/
-EAPI Eina_Iterator *evas_textblock_cursor_range_simple_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
+EVAS_API Eina_Iterator *evas_textblock_cursor_range_simple_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
/**
- * Get the geometry of ?
- *
- * @param cur one side of the range.
- * @param cur2 other side of the range.
*/
-EAPI Eina_Bool evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
+EVAS_API Eina_Bool evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
/**
* Checks if the cursor points to the end of the line.
@@ -586,14 +581,14 @@ EAPI Eina_Bool evas_textblock_cursor_format_item_
* @param cur the cursor to check.
* @return @c EINA_TRUE if true, @c EINA_FALSE otherwise.
*/
-EAPI Eina_Bool evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
+EVAS_API Eina_Bool evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
/**
* @brief Advances the cursor one char backwards.
*
* @return @c true on success, @c false otherwise.
*/
-EAPI Eina_Bool evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *obj);
+EVAS_API Eina_Bool evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *obj);
/**
* @brief Advances the cursor one char forward.
@@ -602,14 +597,14 @@ EAPI Eina_Bool evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *obj);
*
* @ingroup Evas_Textblock_Cursor
*/
-EAPI Eina_Bool evas_textblock_cursor_char_next(Evas_Textblock_Cursor *obj);
+EVAS_API Eina_Bool evas_textblock_cursor_char_next(Evas_Textblock_Cursor *obj);
/**
* @brief Advances the cursor one grapheme cluster backwards.
*
* @return @c true on success, @c false otherwise.
*/
-EAPI Eina_Bool evas_textblock_cursor_cluster_prev(Evas_Textblock_Cursor *obj);
+EVAS_API Eina_Bool evas_textblock_cursor_cluster_prev(Evas_Textblock_Cursor *obj);
/**
* @brief Advances the cursor one grapheme cluster forward.
@@ -618,7 +613,7 @@ EAPI Eina_Bool evas_textblock_cursor_cluster_prev(Evas_Textblock_Cursor *obj);
*
* @ingroup Evas_Textblock_Cursor
*/
-EAPI Eina_Bool evas_textblock_cursor_cluster_next(Evas_Textblock_Cursor *obj);
+EVAS_API Eina_Bool evas_textblock_cursor_cluster_next(Evas_Textblock_Cursor *obj);
/**
* @brief Advances to the start of the next text node
@@ -627,7 +622,7 @@ EAPI Eina_Bool evas_textblock_cursor_cluster_next(Evas_Textblock_Cursor *obj);
*
* @ingroup Evas_Textblock_Cursor
*/
-EAPI Eina_Bool evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *obj);
+EVAS_API Eina_Bool evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *obj);
/**
* @brief Advances to the end of the previous text node
@@ -636,7 +631,7 @@ EAPI Eina_Bool evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *obj);
*
* @ingroup Evas_Textblock_Cursor
*/
-EAPI Eina_Bool evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *obj);
+EVAS_API Eina_Bool evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *obj);
/**
* @brief Moves the cursor to the start of the word under the cursor
@@ -645,7 +640,7 @@ EAPI Eina_Bool evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *obj);
*
* @ingroup Evas_Textblock_Cursor
*/
-EAPI Eina_Bool evas_textblock_cursor_word_start(Evas_Textblock_Cursor *obj);
+EVAS_API Eina_Bool evas_textblock_cursor_word_start(Evas_Textblock_Cursor *obj);
/**
* @brief Moves the cursor to the end of the word under the cursor
@@ -654,14 +649,14 @@ EAPI Eina_Bool evas_textblock_cursor_word_start(Evas_Textblock_Cursor *obj);
*
* @ingroup Evas_Textblock_Cursor
*/
-EAPI Eina_Bool evas_textblock_cursor_word_end(Evas_Textblock_Cursor *obj);
+EVAS_API Eina_Bool evas_textblock_cursor_word_end(Evas_Textblock_Cursor *obj);
/**
* @}
*/
/**
- * @ingroup Evas_Object_Textblock
+ * @addtogroup Evas_Object_Textblock_Group
*
* @{
*/
@@ -671,7 +666,7 @@ EAPI Eina_Bool evas_textblock_cursor_word_end(Evas_Textblock_Cursor *obj);
* @param e The given evas.
* @return The new textblock object.
*/
-EAPI Evas_Object *evas_object_textblock_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+EVAS_API Evas_Object *evas_object_textblock_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
/**
* Return the plain version of the markup.
@@ -686,7 +681,7 @@ EAPI Evas_Object *evas_object_textblock_add(Evas *e)
* @return An allocated plain text version of the markup.
* @since 1.2
*/
-EAPI char *evas_textblock_text_markup_to_utf8(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
+EVAS_API char *evas_textblock_text_markup_to_utf8(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
/**
* Return the markup version of the plain text.
@@ -700,7 +695,7 @@ EAPI char *evas_textblock_text_markup_to_utf8
* @return An allocated markup version of the plain text.
* @since 1.2
*/
-EAPI char *evas_textblock_text_utf8_to_markup(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
+EVAS_API char *evas_textblock_text_utf8_to_markup(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
/**
* Clear the textblock object.
@@ -709,7 +704,7 @@ EAPI char *evas_textblock_text_utf8_to_markup
* @param obj the object to clear.
* @return nothing.
*/
-EAPI void evas_object_textblock_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
+EVAS_API void evas_object_textblock_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* Sets given text as markup for the textblock object.
@@ -720,7 +715,7 @@ EAPI void evas_object_textblock_clear(Evas_O
* @param text the markup text to set.
* @return Returns no value.
*/
-EAPI void evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
+EVAS_API void evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
/**
* Gets the current markup text of the textblock object.
@@ -728,7 +723,7 @@ EAPI void evas_object_textblock_text_markup_set(Evas_Object *obj, const char *te
* @param obj the textblock object.
* @return Returns the current markup text.
*/
-EAPI const char *evas_object_textblock_text_markup_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
+EVAS_API const char *evas_object_textblock_text_markup_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* Prepends markup to the cursor cur.
@@ -739,7 +734,7 @@ EAPI const char *evas_object_textblock_text_markup_get(Evas_Object *obj) EINA_AR
* @param text the markup text to prepend.
* @return Return no value.
*/
-EAPI void evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
+EVAS_API void evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
/**
* Sets object's style to given style.
@@ -749,7 +744,7 @@ EAPI void evas_object_textblock_text_markup_
* @return Returns no value.
* @see evas_textblock_style_user_push()
*/
-EAPI void evas_object_textblock_style_set(Evas_Object *obj, const Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1, 2);
+EVAS_API void evas_object_textblock_style_set(Evas_Object *obj, const Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1, 2);
/**
* Gets the object's current style.
@@ -758,7 +753,7 @@ EAPI void evas_object_textblock_style_set(Ev
* @return Returns the current active style.
* @see evas_textblock_style_user_peek()
*/
-EAPI Evas_Textblock_Style *evas_object_textblock_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+EVAS_API Evas_Textblock_Style *evas_object_textblock_style_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
@@ -776,7 +771,7 @@ EAPI Evas_Textblock_Style *evas_object_textblock_style_get(c
*
* @since 1.2
*/
-EAPI void evas_object_textblock_style_user_push(Evas_Object *obj, Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1,2);
+EVAS_API void evas_object_textblock_style_user_push(Evas_Object *obj, Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1,2);
/**
* Peeks at the user-styles stack
@@ -785,7 +780,7 @@ EAPI void evas_object_textblock_style_user_
* @return Returns the user style at the top of the user style stack.
* @see evas_textblock_style_user_pop()
*/
-EAPI const Evas_Textblock_Style *evas_object_textblock_style_user_peek(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+EVAS_API const Evas_Textblock_Style *evas_object_textblock_style_user_peek(const Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* Removes the style at the top of the user-style stack
@@ -794,7 +789,7 @@ EAPI const Evas_Textblock_Style *evas_object_textblock_style_user_
* @return Returns no value.
* @see evas_textblock_style_user_peek()
*/
-EAPI void evas_object_textblock_style_user_pop(Evas_Object *obj) EINA_ARG_NONNULL(1);
+EVAS_API void evas_object_textblock_style_user_pop(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* Gets the first format node
@@ -802,7 +797,7 @@ EAPI void evas_object_textblock_style_user_p
* @param obj The textblock object.
* @return Returns the first format node.
*/
-EAPI const Evas_Object_Textblock_Node_Format* evas_textblock_node_format_first_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
+EVAS_API const Evas_Object_Textblock_Node_Format* evas_textblock_node_format_first_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* Gets the last format node
@@ -810,7 +805,7 @@ EAPI const Evas_Object_Textblock_Node_Format* evas_textblock_node_format_first_g
* @param obj The textblock object.
* @return Returns the first format node.
*/
-EAPI const Evas_Object_Textblock_Node_Format* evas_textblock_node_format_last_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
+EVAS_API const Evas_Object_Textblock_Node_Format* evas_textblock_node_format_last_get(Evas_Object *obj) EINA_ARG_NONNULL(1);
/**
* Gets a list of format nodes that match given format.
@@ -819,7 +814,7 @@ EAPI const Evas_Object_Textblock_Node_Format* evas_textblock_node_format_last_ge
* @param anchor The format to find in the textblock.
* @return Returns a list of format nodes that match the given format.
*/
-EAPI const Eina_List *evas_textblock_node_format_list_get(const Evas_Object *obj, const char *anchor) EINA_ARG_NONNULL(1);
+EVAS_API const Eina_List *evas_textblock_node_format_list_get(const Evas_Object *obj, const char *anchor) EINA_ARG_NONNULL(1);
/**
* Removes format node and its matching format node.
@@ -828,7 +823,7 @@ EAPI const Eina_List *evas_textblock_node_format_list_get(const Evas_Object *obj
* @param n The format node to remove.
* @return Returns no value.
*/
-EAPI void evas_textblock_node_format_remove_pair(Evas_Object *obj, Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2);
+EVAS_API void evas_textblock_node_format_remove_pair(Evas_Object *obj, Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2);
/**
* Gets the geometry of the line specified by its number.
@@ -837,7 +832,7 @@ EAPI void evas_textblock_node_format_remove_pair(Evas_Object *obj, Evas_Object_T
* @param line the line number of the queried line.
* @return Returns no value.
*/
-EAPI Eina_Bool evas_object_textblock_line_number_geometry_get(const Evas_Object *obj, int line, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
+EVAS_API Eina_Bool evas_object_textblock_line_number_geometry_get(const Evas_Object *obj, int line, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
/**
* Make cur_dest point to the same place as cur. Does not work if they don't
@@ -847,7 +842,7 @@ EAPI Eina_Bool evas_object_textblock_line_number_geometry_get(const Evas_Object
* @param cur_dest destination cursor.
* @return Returns no value.
*/
-EAPI void evas_textblock_cursor_copy(const Evas_Textblock_Cursor *cur, Evas_Textblock_Cursor *cur_dest);
+EVAS_API void evas_textblock_cursor_copy(const Evas_Textblock_Cursor *cur, Evas_Textblock_Cursor *cur_dest);
/**
* Create a new cursor, associate it to the obj and init it to point
@@ -864,7 +859,7 @@ EAPI void evas_textblock_cursor_copy(const E
* @param obj The textblock to which the new cursor will associate.
* @return Returns a new cursor associated with the given textblock object.
*/
-EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_new(const Evas_Object *obj);
+EVAS_API Evas_Textblock_Cursor *evas_object_textblock_cursor_new(const Evas_Object *obj);
/**
* @brief Sets the position of the cursor according to the X and Y coordinates.
@@ -873,7 +868,7 @@ EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_new(const Evas_Object *
*
* @return @c true on success, @c false otherwise.
*/
-EAPI Eina_Bool evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *obj, Evas_Coord x, Evas_Coord y);
+EVAS_API Eina_Bool evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *obj, Evas_Coord x, Evas_Coord y);
/**
* @brief Sets the position of the cursor according to the X and Y coordinates and
@@ -883,7 +878,7 @@ EAPI Eina_Bool evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *obj,
*
* @return @c true on success, @c false otherwise.
*/
-EAPI Eina_Bool evas_textblock_cursor_cluster_coord_set(Evas_Textblock_Cursor *obj, Evas_Coord x, Evas_Coord y);
+EVAS_API Eina_Bool evas_textblock_cursor_cluster_coord_set(Evas_Textblock_Cursor *obj, Evas_Coord x, Evas_Coord y);
/**
* Free the cursor and unassociate it from the object.
@@ -892,7 +887,7 @@ EAPI Eina_Bool evas_textblock_cursor_cluster_coord_set(Evas_Textblock_Cursor *ob
* @param cur the cursor to free.
* @return Returns no value.
*/
-EAPI void evas_textblock_cursor_free(Evas_Textblock_Cursor *cur);
+EVAS_API void evas_textblock_cursor_free(Evas_Textblock_Cursor *cur);
/**
* Adds text to the current cursor position and set the cursor to *before*
@@ -903,7 +898,7 @@ EAPI void evas_textblock_cursor_free(Evas_Textblock_Cursor *cur);
* @return Returns the len of the text added.
* @see evas_textblock_cursor_text_prepend()
*/
-EAPI int evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
+EVAS_API int evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
/**
* Adds text to the current cursor position and set the cursor to *after*
@@ -914,7 +909,7 @@ EAPI int evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const cha
* @return Returns the len of the text added.
* @see evas_textblock_cursor_text_append()
*/
-EAPI int evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
+EVAS_API int evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
/**
* @brief The "replacement character" to use for the given textblock object.
@@ -923,7 +918,7 @@ EAPI int evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const ch
*
* @ingroup Efl_Canvas_Textblock
*/
-EAPI void evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch);
+EVAS_API void evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch);
/**
* @brief The "replacement character" to use for the given textblock object.
@@ -932,7 +927,7 @@ EAPI void evas_object_textblock_replace_char_set(Evas_Object *obj, const char *c
*
* @ingroup Efl_Canvas_Textblock
*/
-EAPI const char *evas_object_textblock_replace_char_get(const Evas_Object *obj);
+EVAS_API const char *evas_object_textblock_replace_char_get(const Evas_Object *obj);
/**
* @brief The vertical alignment of text within the textblock object as a
@@ -947,7 +942,7 @@ EAPI const char *evas_object_textblock_replace_char_get(const Evas_Object *obj);
*
* @ingroup Efl_Canvas_Textblock
*/
-EAPI void evas_object_textblock_valign_set(Evas_Object *obj, double align);
+EVAS_API void evas_object_textblock_valign_set(Evas_Object *obj, double align);
/**
* @brief The vertical alignment of text within the textblock object as a
@@ -962,7 +957,7 @@ EAPI void evas_object_textblock_valign_set(Evas_Object *obj, double align);
*
* @ingroup Efl_Canvas_Textblock
*/
-EAPI double evas_object_textblock_valign_get(const Evas_Object *obj);
+EVAS_API double evas_object_textblock_valign_get(const Evas_Object *obj);
/**
* Sets the cursor to the start of the first text node.
@@ -970,7 +965,7 @@ EAPI double evas_object_textblock_valign_get(const Evas_Object *obj);
* @param cur the cursor to update.
* @return Returns no value.
*/
-EAPI void evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur);
+EVAS_API void evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur);
/**
* sets the cursor to the end of the last text node.
@@ -978,7 +973,7 @@ EAPI void evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur);
* @param cur the cursor to set.
* @return Returns no value.
*/
-EAPI void evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur);
+EVAS_API void evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur);
/**
* Compare two cursors.
@@ -987,7 +982,7 @@ EAPI void evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur);
* @param cur2 the second cursor.
* @return -1 if cur1 < cur2, 0 if cur1 == cur2 and 1 otherwise.
*/
-EAPI int evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2);
+EVAS_API int evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2);
/**
* @brief Checks if two cursors are equal
@@ -1001,7 +996,7 @@ EAPI int evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const
*
* @since 1.18
*/
-EAPI Eina_Bool evas_textblock_cursor_equal(const Evas_Textblock_Cursor *obj, const Evas_Textblock_Cursor *cur);
+EVAS_API Eina_Bool evas_textblock_cursor_equal(const Evas_Textblock_Cursor *obj, const Evas_Textblock_Cursor *cur);
/**
* Go to the start of the current line
@@ -1009,7 +1004,7 @@ EAPI Eina_Bool evas_textblock_cursor_equal(const Evas_Textblock_Cursor *obj, con
* @param cur the cursor to update.
* @return Returns no value.
*/
-EAPI void evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur);
+EVAS_API void evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur);
/**
* Go to the end of the current line.
@@ -1017,15 +1012,15 @@ EAPI void evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur);
* @param cur the cursor to update.
* @return Returns no value.
*/
-EAPI void evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur);
+EVAS_API void evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur);
/**
* Set the cursor pos.
*
* @param cur the cursor to be set.
- * @param pos the pos to set.
+ * @param _pos the pos to set.
*/
-EAPI void evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int _pos);
+EVAS_API void evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int _pos);
/**
* Go to the first char in the node the cursor is pointing on.
@@ -1033,7 +1028,7 @@ EAPI void evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int _pos);
* @param cur the cursor to update.
* @return Returns no value.
*/
-EAPI void evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur);
+EVAS_API void evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur);
/**
* Go to the last char in a text node.
@@ -1041,7 +1036,7 @@ EAPI void evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur)
* @param cur the cursor to update.
* @return Returns no value.
*/
-EAPI void evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur);
+EVAS_API void evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur);
/**
* Deletes a single character from position pointed by given cursor.
@@ -1049,13 +1044,13 @@ EAPI void evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur);
* @param cur the cursor to update.
* @return Returns no value.
*/
-EAPI void evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur);
+EVAS_API void evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur);
/** Get the object's main cursor.
*
* @ingroup Evas_Textblock
*/
-EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_get(const Evas_Object *obj);
+EVAS_API Evas_Textblock_Cursor *evas_object_textblock_cursor_get(const Evas_Object *obj);
@@ -1073,21 +1068,21 @@ EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_get(const Evas_Object *
#define EVAS_ERROR_INVALID_OPERATION 0x0003
-/** Get the object's content it options.
+/** Get the object's content fit options.
*
* @param obj The textblock object.
- * @param[out] options content fitting options.
+ * @param[out] p_options content fitting options.
* @return Returns error code.
*/
-EAPI int evas_textblock_fit_options_get(const Evas_Object *obj, unsigned int * p_options);
+EVAS_API int evas_textblock_fit_options_get(const Evas_Object *obj, unsigned int * p_options);
-/** Set the object's content it options.
+/** Set the object's content fit options.
*
* @param obj The textblock object.
* @param[in] options content fitting options.
* @return Returns error code.
*/
-EAPI int evas_textblock_fit_options_set(Evas_Object *obj, unsigned int options);
+EVAS_API int evas_textblock_fit_options_set(Evas_Object *obj, unsigned int options);
/** Get the object's max and min font sizes used for fitting content.
*
@@ -1096,7 +1091,7 @@ EAPI int evas_textblock_fit_options_set(Evas_Object *obj, unsigned int options)
* @param[out] p_max_font_size max font size used when fitting content.
* @return Returns error code.
*/
-EAPI int evas_textblock_fit_size_range_get(const Evas_Object *obj, unsigned int *p_min_font_size, unsigned int *p_max_font_size);
+EVAS_API int evas_textblock_fit_size_range_get(const Evas_Object *obj, unsigned int *p_min_font_size, unsigned int *p_max_font_size);
/** Set the object's max and min font sizes used for fitting content.
*
@@ -1105,7 +1100,7 @@ EAPI int evas_textblock_fit_size_range_get(const Evas_Object *obj, unsigned int
* @param[in] max_font_size max font size used when fitting content.
* @return Returns error code.
*/
-EAPI int evas_textblock_fit_size_range_set(Evas_Object *obj, unsigned int min_font_size, unsigned int max_font_size);
+EVAS_API int evas_textblock_fit_size_range_set(Evas_Object *obj, unsigned int min_font_size, unsigned int max_font_size);
/** Get the object's fitting step size when trying fonts between min font size and
@@ -1115,7 +1110,7 @@ EAPI int evas_textblock_fit_size_range_set(Evas_Object *obj, unsigned int min_f
* @param[out] p_step_size step jumps between min and max font size.
* @return Returns error code.
*/
-EAPI int evas_textblock_fit_step_size_get(const Evas_Object *obj, unsigned int *p_step_size);
+EVAS_API int evas_textblock_fit_step_size_get(const Evas_Object *obj, unsigned int *p_step_size);
/** Set the object's fitting step size when trying fonts between min font size and
@@ -1125,7 +1120,7 @@ EAPI int evas_textblock_fit_step_size_get(const Evas_Object *obj, unsigned int
* @param[out] step_size step jumps between min and max font size.
* @return Returns error code.
*/
-EAPI int evas_textblock_fit_step_size_set(Evas_Object *obj, unsigned int step_size);
+EVAS_API int evas_textblock_fit_step_size_set(Evas_Object *obj, unsigned int step_size);
/** Get copy of the object's fitting font size array used internally
*
@@ -1135,7 +1130,7 @@ EAPI int evas_textblock_fit_step_size_set(Evas_Object *obj, unsigned int step_s
* @param[out] request_size_array request to fill specific amount in p_size_array.
* @return Returns error code.
*/
-EAPI int evas_textblock_fit_size_array_get(const Evas_Object *obj, unsigned int *p_size_array, size_t *p_size_array_len,size_t request_size_array);
+EVAS_API int evas_textblock_fit_size_array_get(const Evas_Object *obj, unsigned int *p_size_array, size_t *p_size_array_len,size_t request_size_array);
/** Set the object's fitting font size array that will be used internally
* Changing fitting step_size,min_font_size,max_font size will generate new array
@@ -1146,7 +1141,7 @@ EAPI int evas_textblock_fit_size_array_get(const Evas_Object *obj, unsigned int
* @param[in] size_array_len the length passed font sizes array.
* @return Returns error code.
*/
-EAPI int evas_textblock_fit_size_array_set(Evas_Object *obj, const unsigned int *p_size_array, size_t size_array_len);
+EVAS_API int evas_textblock_fit_size_array_set(Evas_Object *obj, const unsigned int *p_size_array, size_t size_array_len);
diff --git a/src/lib/evas/canvas/evas_textgrid_eo.c b/src/lib/evas/canvas/evas_textgrid_eo.c
index bbe4614766..1522cba0f1 100644
--- a/src/lib/evas/canvas/evas_textgrid_eo.c
+++ b/src/lib/evas/canvas/evas_textgrid_eo.c
@@ -1,43 +1,43 @@
void _evas_textgrid_supported_font_styles_set(Eo *obj, Evas_Textgrid_Data *pd, Evas_Textgrid_Font_Style styles);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_textgrid_supported_font_styles_set, EFL_FUNC_CALL(styles), Evas_Textgrid_Font_Style styles);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_textgrid_supported_font_styles_set, EFL_FUNC_CALL(styles), Evas_Textgrid_Font_Style styles);
Evas_Textgrid_Font_Style _evas_textgrid_supported_font_styles_get(const Eo *obj, Evas_Textgrid_Data *pd);
-EOAPI EFL_FUNC_BODY_CONST(evas_obj_textgrid_supported_font_styles_get, Evas_Textgrid_Font_Style, 0);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODY_CONST(evas_obj_textgrid_supported_font_styles_get, Evas_Textgrid_Font_Style, 0);
void _evas_textgrid_grid_size_set(Eo *obj, Evas_Textgrid_Data *pd, int w, int h);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_textgrid_grid_size_set, EFL_FUNC_CALL(w, h), int w, int h);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_textgrid_grid_size_set, EFL_FUNC_CALL(w, h), int w, int h);
void _evas_textgrid_grid_size_get(const Eo *obj, Evas_Textgrid_Data *pd, int *w, int *h);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_textgrid_grid_size_get, EFL_FUNC_CALL(w, h), int *w, int *h);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_obj_textgrid_grid_size_get, EFL_FUNC_CALL(w, h), int *w, int *h);
void _evas_textgrid_cell_size_get(const Eo *obj, Evas_Textgrid_Data *pd, int *width, int *height);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_textgrid_cell_size_get, EFL_FUNC_CALL(width, height), int *width, int *height);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_obj_textgrid_cell_size_get, EFL_FUNC_CALL(width, height), int *width, int *height);
void _evas_textgrid_update_add(Eo *obj, Evas_Textgrid_Data *pd, int x, int y, int w, int h);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_textgrid_update_add, EFL_FUNC_CALL(x, y, w, h), int x, int y, int w, int h);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_textgrid_update_add, EFL_FUNC_CALL(x, y, w, h), int x, int y, int w, int h);
void _evas_textgrid_cellrow_set(Eo *obj, Evas_Textgrid_Data *pd, int y, const Evas_Textgrid_Cell *row);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_textgrid_cellrow_set, EFL_FUNC_CALL(y, row), int y, const Evas_Textgrid_Cell *row);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_textgrid_cellrow_set, EFL_FUNC_CALL(y, row), int y, const Evas_Textgrid_Cell *row);
Evas_Textgrid_Cell *_evas_textgrid_cellrow_get(const Eo *obj, Evas_Textgrid_Data *pd, int y);
-EOAPI EFL_FUNC_BODYV_CONST(evas_obj_textgrid_cellrow_get, Evas_Textgrid_Cell *, NULL, EFL_FUNC_CALL(y), int y);
+EVAS_API EVAS_API_WEAK EFL_FUNC_BODYV_CONST(evas_obj_textgrid_cellrow_get, Evas_Textgrid_Cell *, NULL, EFL_FUNC_CALL(y), int y);
void _evas_textgrid_palette_set(Eo *obj, Evas_Textgrid_Data *pd, Evas_Textgrid_Palette pal, int idx, int r, int g, int b, int a);
-EOAPI EFL_VOID_FUNC_BODYV(evas_obj_textgrid_palette_set, EFL_FUNC_CALL(pal, idx, r, g, b, a), Evas_Textgrid_Palette pal, int idx, int r, int g, int b, int a);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV(evas_obj_textgrid_palette_set, EFL_FUNC_CALL(pal, idx, r, g, b, a), Evas_Textgrid_Palette pal, int idx, int r, int g, int b, int a);
void _evas_textgrid_palette_get(const Eo *obj, Evas_Textgrid_Data *pd, Evas_Textgrid_Palette pal, int idx, int *r, int *g, int *b, int *a);
-EOAPI EFL_VOID_FUNC_BODYV_CONST(evas_obj_textgrid_palette_get, EFL_FUNC_CALL(pal, idx, r, g, b, a), Evas_Textgrid_Palette pal, int idx, int *r, int *g, int *b, int *a);
+EVAS_API EVAS_API_WEAK EFL_VOID_FUNC_BODYV_CONST(evas_obj_textgrid_palette_get, EFL_FUNC_CALL(pal, idx, r, g, b, a), Evas_Textgrid_Palette pal, int idx, int *r, int *g, int *b, int *a);
Efl_Object *_evas_textgrid_efl_object_constructor(Eo *obj, Evas_Textgrid_Data *pd);
diff --git a/src/lib/evas/canvas/evas_textgrid_eo.h b/src/lib/evas/canvas/evas_textgrid_eo.h
index 0b88b67db8..1635f26230 100644
--- a/src/lib/evas/canvas/evas_textgrid_eo.h
+++ b/src/lib/evas/canvas/evas_textgrid_eo.h
@@ -53,7 +53,7 @@ typedef struct _Evas_Textgrid_Cell Evas_Textgrid_Cell;
*/
#define EVAS_TEXTGRID_CLASS evas_textgrid_class_get()
-EWAPI const Efl_Class *evas_textgrid_class_get(void);
+EVAS_API EVAS_API_WEAK const Efl_Class *evas_textgrid_class_get(void) EINA_CONST;
/**
* @brief This function is not implemented yet, do not use.
@@ -63,7 +63,7 @@ EWAPI const Efl_Class *evas_textgrid_class_get(void);
*
* @ingroup Evas_Textgrid
*/
-EOAPI void evas_obj_textgrid_supported_font_styles_set(Eo *obj, Evas_Textgrid_Font_Style styles);
+EVAS_API EVAS_API_WEAK void evas_obj_textgrid_supported_font_styles_set(Eo *obj, Evas_Textgrid_Font_Style styles);
/**
* @brief This function is not implemented yet, do not use.
@@ -74,7 +74,7 @@ EOAPI void evas_obj_textgrid_supported_font_styles_set(Eo *obj, Evas_Textgrid_Fo
*
* @ingroup Evas_Textgrid
*/
-EOAPI Evas_Textgrid_Font_Style evas_obj_textgrid_supported_font_styles_get(const Eo *obj);
+EVAS_API EVAS_API_WEAK Evas_Textgrid_Font_Style evas_obj_textgrid_supported_font_styles_get(const Eo *obj);
/**
* @brief Set the size of the textgrid object.
@@ -91,7 +91,7 @@ EOAPI Evas_Textgrid_Font_Style evas_obj_textgrid_supported_font_styles_get(const
*
* @ingroup Evas_Textgrid
*/
-EOAPI void evas_obj_textgrid_grid_size_set(Eo *obj, int w, int h);
+EVAS_API EVAS_API_WEAK void evas_obj_textgrid_grid_size_set(Eo *obj, int w, int h);
/**
* @brief Get the size of the textgrid object.
@@ -108,7 +108,7 @@ EOAPI void evas_obj_textgrid_grid_size_set(Eo *obj, int w, int h);
*
* @ingroup Evas_Textgrid
*/
-EOAPI void evas_obj_textgrid_grid_size_get(const Eo *obj, int *w, int *h);
+EVAS_API EVAS_API_WEAK void evas_obj_textgrid_grid_size_get(const Eo *obj, int *w, int *h);
/**
* @brief Retrieve the size of a cell of the given textgrid object in pixels.
@@ -132,7 +132,7 @@ EOAPI void evas_obj_textgrid_grid_size_get(const Eo *obj, int *w, int *h);
*
* @ingroup Evas_Textgrid
*/
-EOAPI void evas_obj_textgrid_cell_size_get(const Eo *obj, int *width, int *height);
+EVAS_API EVAS_API_WEAK void evas_obj_textgrid_cell_size_get(const Eo *obj, int *width, int *height);
/**
* @brief Indicate for evas that part of a textgrid region (cells) has been
@@ -155,7 +155,7 @@ EOAPI void evas_obj_textgrid_cell_size_get(const Eo *obj, int *width, int *heigh
*
* @ingroup Evas_Textgrid
*/
-EOAPI void evas_obj_textgrid_update_add(Eo *obj, int x, int y, int w, int h);
+EVAS_API EVAS_API_WEAK void evas_obj_textgrid_update_add(Eo *obj, int x, int y, int w, int h);
/**
* @brief Set the string at the given row of the given textgrid object.
@@ -176,7 +176,7 @@ EOAPI void evas_obj_textgrid_update_add(Eo *obj, int x, int y, int w, int h);
*
* @ingroup Evas_Textgrid
*/
-EOAPI void evas_obj_textgrid_cellrow_set(Eo *obj, int y, const Evas_Textgrid_Cell *row);
+EVAS_API EVAS_API_WEAK void evas_obj_textgrid_cellrow_set(Eo *obj, int y, const Evas_Textgrid_Cell *row);
/**
* @brief Get the string at the given row of the given textgrid object.
@@ -197,7 +197,7 @@ EOAPI void evas_obj_textgrid_cellrow_set(Eo *obj, int y, const Evas_Textgrid_Cel
*
* @ingroup Evas_Textgrid
*/
-EOAPI Evas_Textgrid_Cell *evas_obj_textgrid_cellrow_get(const Eo *obj, int y);
+EVAS_API EVAS_API_WEAK Evas_Textgrid_Cell *evas_obj_textgrid_cellrow_get(const Eo *obj, int y);
/**
* @brief The set color to the given palette at the given index of the given
@@ -227,7 +227,7 @@ EOAPI Evas_Textgrid_Cell *evas_obj_textgrid_cellrow_get(const Eo *obj, int y);
*
* @ingroup Evas_Textgrid
*/
-EOAPI void evas_obj_textgrid_palette_set(Eo *obj, Evas_Textgrid_Palette pal, int idx, int r, int g, int b, int a);
+EVAS_API EVAS_API_WEAK void evas_obj_textgrid_palette_set(Eo *obj, Evas_Textgrid_Palette pal, int idx, int r, int g, int b, int a);
/**
* @brief The retrieve color to the given palette at the given index of the
@@ -254,6 +254,6 @@ EOAPI void evas_obj_textgrid_palette_set(Eo *obj, Evas_Textgrid_Palette pal, int
*
* @ingroup Evas_Textgrid
*/
-EOAPI void evas_obj_textgrid_palette_get(const Eo *obj, Evas_Textgrid_Palette pal, int idx, int *r, int *g, int *b, int *a);
+EVAS_API EVAS_API_WEAK void evas_obj_textgrid_palette_get(const Eo *obj, Evas_Textgrid_Palette pal, int idx, int *r, int *g, int *b, int *a);
#endif
diff --git a/src/lib/evas/canvas/evas_textgrid_eo.legacy.c b/src/lib/evas/canvas/evas_textgrid_eo.legacy.c
index 8110d09e65..fea39c8d88 100644
--- a/src/lib/evas/canvas/evas_textgrid_eo.legacy.c
+++ b/src/lib/evas/canvas/evas_textgrid_eo.legacy.c
@@ -1,59 +1,59 @@
-EAPI void
+EVAS_API void
evas_object_textgrid_supported_font_styles_set(Evas_Textgrid *obj, Evas_Textgrid_Font_Style styles)
{
evas_obj_textgrid_supported_font_styles_set(obj, styles);
}
-EAPI Evas_Textgrid_Font_Style
+EVAS_API Evas_Textgrid_Font_Style
evas_object_textgrid_supported_font_styles_get(const Evas_Textgrid *obj)
{
return evas_obj_textgrid_supported_font_styles_get(obj);
}
-EAPI void
+EVAS_API void
evas_object_textgrid_size_set(Evas_Textgrid *obj, int w, int h)
{
evas_obj_textgrid_grid_size_set(obj, w, h);
}
-EAPI void
+EVAS_API void
evas_object_textgrid_size_get(const Evas_Textgrid *obj, int *w, int *h)
{
evas_obj_textgrid_grid_size_get(obj, w, h);
}
-EAPI void
+EVAS_API void
evas_object_textgrid_cell_size_get(const Evas_Textgrid *obj, int *width, int *height)
{
evas_obj_textgrid_cell_size_get(obj, width, height);
}
-EAPI void
+EVAS_API void
evas_object_textgrid_update_add(Evas_Textgrid *obj, int x, int y, int w, int h)
{
evas_obj_textgrid_update_add(obj, x, y, w, h);
}
-EAPI void
+EVAS_API void
evas_object_textgrid_cellrow_set(Evas_Textgrid *obj, int y, const Evas_Textgrid_Cell *row)
{
evas_obj_textgrid_cellrow_set(obj, y, row);
}
-EAPI Evas_Textgrid_Cell *
+EVAS_API Evas_Textgrid_Cell *
evas_object_textgrid_cellrow_get(const Evas_Textgrid *obj, int y)
{
return evas_obj_textgrid_cellrow_get(obj, y);
}
-EAPI void
+EVAS_API void
evas_object_textgrid_palette_set(Evas_Textgrid *obj, Evas_Textgrid_Palette pal, int idx, int r, int g, int b, int a)
{
evas_obj_textgrid_palette_set(obj, pal, idx, r, g, b, a);
}
-EAPI void
+EVAS_API void
evas_object_textgrid_palette_get(const Evas_Textgrid *obj, Evas_Textgrid_Palette pal, int idx, int *r, int *g, int *b, int *a)
{
evas_obj_textgrid_palette_get(obj, pal, idx, r, g, b, a);
diff --git a/src/lib/evas/canvas/evas_textgrid_eo.legacy.h b/src/lib/evas/canvas/evas_textgrid_eo.legacy.h
index 379747e095..4cc8d6f59d 100644
--- a/src/lib/evas/canvas/evas_textgrid_eo.legacy.h
+++ b/src/lib/evas/canvas/evas_textgrid_eo.legacy.h
@@ -56,7 +56,7 @@ typedef struct _Evas_Textgrid_Cell Evas_Textgrid_Cell;
*
* @ingroup Evas_Object_Textgrid_Group
*/
-EAPI void evas_object_textgrid_supported_font_styles_set(Evas_Textgrid *obj, Evas_Textgrid_Font_Style styles);
+EVAS_API void evas_object_textgrid_supported_font_styles_set(Evas_Textgrid *obj, Evas_Textgrid_Font_Style styles);
/**
* @brief This function is not implemented yet, do not use.
@@ -67,7 +67,7 @@ EAPI void evas_object_textgrid_supported_font_styles_set(Evas_Textgrid *obj, Eva
*
* @ingroup Evas_Object_Textgrid_Group
*/
-EAPI Evas_Textgrid_Font_Style evas_object_textgrid_supported_font_styles_get(const Evas_Textgrid *obj);
+EVAS_API Evas_Textgrid_Font_Style evas_object_textgrid_supported_font_styles_get(const Evas_Textgrid *obj);
/**
* @brief Set the size of the textgrid object.
@@ -84,7 +84,7 @@ EAPI Evas_Textgrid_Font_Style evas_object_textgrid_supported_font_styles_get(con
*
* @ingroup Evas_Object_Textgrid_Group
*/
-EAPI void evas_object_textgrid_size_set(Evas_Textgrid *obj, int w, int h);
+EVAS_API void evas_object_textgrid_size_set(Evas_Textgrid *obj, int w, int h);
/**
* @brief Get the size of the textgrid object.
@@ -101,7 +101,7 @@ EAPI void evas_object_textgrid_size_set(Evas_Textgrid *obj, int w, int h);
*
* @ingroup Evas_Object_Textgrid_Group
*/
-EAPI void evas_object_textgrid_size_get(const Evas_Textgrid *obj, int *w, int *h);
+EVAS_API void evas_object_textgrid_size_get(const Evas_Textgrid *obj, int *w, int *h);
/**
* @brief Retrieve the size of a cell of the given textgrid object in pixels.
@@ -125,7 +125,7 @@ EAPI void evas_object_textgrid_size_get(const Evas_Textgrid *obj, int *w, int *h
*
* @ingroup Evas_Object_Textgrid_Group
*/
-EAPI void evas_object_textgrid_cell_size_get(const Evas_Textgrid *obj, int *width, int *height);
+EVAS_API void evas_object_textgrid_cell_size_get(const Evas_Textgrid *obj, int *width, int *height);
/**
* @brief Indicate for evas that part of a textgrid region (cells) has been
@@ -148,7 +148,7 @@ EAPI void evas_object_textgrid_cell_size_get(const Evas_Textgrid *obj, int *widt
*
* @ingroup Evas_Object_Textgrid_Group
*/
-EAPI void evas_object_textgrid_update_add(Evas_Textgrid *obj, int x, int y, int w, int h);
+EVAS_API void evas_object_textgrid_update_add(Evas_Textgrid *obj, int x, int y, int w, int h);
/**
* @brief Set the string at the given row of the given textgrid object.
@@ -169,7 +169,7 @@ EAPI void evas_object_textgrid_update_add(Evas_Textgrid *obj, int x, int y, int
*
* @ingroup Evas_Object_Textgrid_Group
*/
-EAPI void evas_object_textgrid_cellrow_set(Evas_Textgrid *obj, int y, const Evas_Textgrid_Cell *row);
+EVAS_API void evas_object_textgrid_cellrow_set(Evas_Textgrid *obj, int y, const Evas_Textgrid_Cell *row);
/**
* @brief Get the string at the given row of the given textgrid object.
@@ -190,7 +190,7 @@ EAPI void evas_object_textgrid_cellrow_set(Evas_Textgrid *obj, int y, const Evas
*
* @ingroup Evas_Object_Textgrid_Group
*/
-EAPI Evas_Textgrid_Cell *evas_object_textgrid_cellrow_get(const Evas_Textgrid *obj, int y);
+EVAS_API Evas_Textgrid_Cell *evas_object_textgrid_cellrow_get(const Evas_Textgrid *obj, int y);
/**
* @brief The set color to the given palette at the given index of the given
@@ -220,7 +220,7 @@ EAPI Evas_Textgrid_Cell *evas_object_textgrid_cellrow_get(const Evas_Textgrid *o
*
* @ingroup Evas_Object_Textgrid_Group
*/
-EAPI void evas_object_textgrid_palette_set(Evas_Textgrid *obj, Evas_Textgrid_Palette pal, int idx, int r, int g, int b, int a);
+EVAS_API void evas_object_textgrid_palette_set(Evas_Textgrid *obj, Evas_Textgrid_Palette pal, int idx, int r, int g, int b, int a);
/**
* @brief The retrieve color to the given palette at the given index of the
@@ -247,6 +247,6 @@ EAPI void evas_object_textgrid_palette_set(Evas_Textgrid *obj, Evas_Textgrid_Pal
*
* @ingroup Evas_Object_Textgrid_Group
*/
-EAPI void evas_object_textgrid_palette_get(const Evas_Textgrid *obj, Evas_Textgrid_Palette pal, int idx, int *r, int *g, int *b, int *a);
+EVAS_API void evas_object_textgrid_palette_get(const Evas_Textgrid *obj, Evas_Textgrid_Palette pal, int idx, int *r, int *g, int *b, int *a);
#endif
diff --git a/src/lib/evas/canvas/evas_touch_point.c b/src/lib/evas/canvas/evas_touch_point.c
index c266675a44..b2e866802a 100644
--- a/src/lib/evas/canvas/evas_touch_point.c
+++ b/src/lib/evas/canvas/evas_touch_point.c
@@ -53,7 +53,7 @@ _evas_touch_point_remove(Evas *eo_e, int id)
}
}
-EAPI unsigned int
+EVAS_API unsigned int
evas_touch_point_list_count(Eo *eo_e)
{
EVAS_LEGACY_API(eo_e, e, 0);
@@ -79,7 +79,7 @@ _evas_canvas_touch_point_list_nth_xy_get(Evas_Canvas *eo_e EINA_UNUSED,
if (y) *y = point->y;
}
-EAPI void
+EVAS_API void
evas_touch_point_list_nth_xy_get(Evas *eo_e, unsigned int n,
Evas_Coord *x, Evas_Coord *y)
{
@@ -91,7 +91,7 @@ evas_touch_point_list_nth_xy_get(Evas *eo_e, unsigned int n,
if (y) *y = Y;
}
-EAPI int
+EVAS_API int
evas_touch_point_list_nth_id_get(Evas *eo_e, unsigned int n)
{
Evas_Coord_Touch_Point *point;
@@ -102,7 +102,7 @@ evas_touch_point_list_nth_id_get(Evas *eo_e, unsigned int n)
else return point->id;
}
-EAPI Evas_Touch_Point_State
+EVAS_API Evas_Touch_Point_State
evas_touch_point_list_nth_state_get(Evas *eo_e, unsigned int n)
{
Evas_Coord_Touch_Point *point;
diff --git a/src/lib/evas/canvas/evas_vg_private.h b/src/lib/evas/canvas/evas_vg_private.h
index a6a27142ed..1cf4ccc80d 100644
--- a/src/lib/evas/canvas/evas_vg_private.h
+++ b/src/lib/evas/canvas/evas_vg_private.h
@@ -9,8 +9,6 @@ typedef struct _Efl_Canvas_Vg_Gradient_Data Efl_Canvas_Vg_Gradient_Data;
typedef struct _Efl_Canvas_Vg_Interpolation Efl_Canvas_Vg_Interpolation;
typedef struct _Efl_Canvas_Vg_Object_Data Efl_Canvas_Vg_Object_Data;
-typedef enum _Efl_Gfx_Vg_Value_Provider_Change_Flag Efl_Gfx_Vg_Value_Provider_Change_Flag;
-
typedef struct _Vg_Cache
{
Eina_Hash *vfd_hash;
@@ -37,6 +35,7 @@ typedef struct _Vg_User_Entry
{
int w; // current surface width
int h; // current surface height
+ Eina_Rect path_bounds;
Efl_VG *root;
} Vg_User_Entry;
@@ -53,8 +52,10 @@ struct _Efl_Canvas_Vg_Object_Data
double align_x, align_y;
Efl_Canvas_Vg_Fill_Mode fill_mode;
int frame_idx;
+ void *ckeys[2]; //cache keys for first, last frames if animation
Eina_Bool changed : 1;
+ Eina_Bool sync_render : 1;
};
struct _Efl_Canvas_Vg_Node_Data
@@ -130,16 +131,6 @@ struct _Efl_Canvas_Vg_Interpolation
Eina_Point_3D skew;
};
-enum _Efl_Gfx_Vg_Value_Provider_Change_Flag
-{
- EFL_GFX_VG_VALUE_PROVIDER_CHANGE_FLAG_NONE = 0,
- EFL_GFX_VG_VALUE_PROVIDER_CHANGE_FLAG_FILL_COLOR = 2,
- EFL_GFX_VG_VALUE_PROVIDER_CHANGE_FLAG_STROKE_COLOR = 4,
- EFL_GFX_VG_VALUE_PROVIDER_CHANGE_FLAG_STROKE_WIDTH = 8,
- EFL_GFX_VG_VALUE_PROVIDER_CHANGE_FLAG_TRANSFORM_MATRIX = 16
-};
-Efl_Gfx_Vg_Value_Provider_Change_Flag efl_gfx_vg_value_provider_changed_flag_get(Eo *obj);
-
void evas_cache_vg_init(void);
void evas_cache_vg_shutdown(void);
Vg_Cache_Entry* evas_cache_vg_entry_resize(Vg_Cache_Entry *entry, int w, int h);
@@ -147,14 +138,18 @@ Vg_Cache_Entry* evas_cache_vg_entry_create(Evas *evas, const Eina_Fi
Efl_VG* evas_cache_vg_tree_get(Vg_Cache_Entry *vg_entry, unsigned int frame_num);
void evas_cache_vg_entry_value_provider_update(Vg_Cache_Entry *vg_entry, Eina_List *vp_list);
void evas_cache_vg_entry_del(Vg_Cache_Entry *vg_entry);
-Vg_File_Data * evas_cache_vg_file_open(const Eina_File *file, const char *key, Evas *e);
+Vg_File_Data * evas_cache_vg_file_open(const Eina_File *file, const char *key, Evas *e, Eina_Bool shareable);
Eina_Bool evas_cache_vg_file_save(Efl_VG *root, int w, int h, const char *file, const char *key, const Efl_File_Save_Info *info);
Eina_Bool evas_cache_vg_entry_file_save(Vg_Cache_Entry *vg_entry, const char *file, const char *key, const Efl_File_Save_Info *info);
double evas_cache_vg_anim_duration_get(const Vg_Cache_Entry *vg_entry);
Eina_Bool evas_cache_vg_anim_sector_set(const Vg_Cache_Entry* vg_entry, const char *name, int startframe, int endframe);
Eina_Bool evas_cache_vg_anim_sector_get(const Vg_Cache_Entry* vg_entry, const char *name, int* startframe, int* endframe);
+Eina_Inarray* evas_cache_vg_anim_sector_list_get(const Vg_Cache_Entry* vg_entry);
unsigned int evas_cache_vg_anim_frame_count_get(const Vg_Cache_Entry *vg_entry);
Eina_Size2D evas_cache_vg_entry_default_size_get(const Vg_Cache_Entry *vg_entry);
+Eina_Position2D evas_cache_vg_entry_default_position_get(const Vg_Cache_Entry *vg_entry);
+Eina_Size2D evas_cache_vg_entry_default_min_size_get(const Vg_Cache_Entry *vg_entry);
+void evas_cache_vg_entry_wrap_mode_set(const Vg_Cache_Entry *vg_entry, Eina_Bool wrap_mode);
void * evas_cache_vg_surface_key_get(Efl_Canvas_Vg_Node *root, int w, int h, int frame_idx);
void efl_canvas_vg_node_vg_obj_set(Efl_VG *node, Efl_VG *vg_obj, Efl_Canvas_Vg_Object_Data *vd);
void efl_canvas_vg_node_change(Efl_VG *node);
@@ -164,7 +159,7 @@ void efl_canvas_vg_container_blend_buffer_clear(Efl_VG *o
static inline void
efl_canvas_vg_object_change(Efl_Canvas_Vg_Object_Data *vd)
{
- if (!vd || vd->changed) return;
+ if (!vd || (vd->changed && vd->obj->changed)) return;
vd->changed = EINA_TRUE;
evas_object_change(vd->obj->object, vd->obj);
}
diff --git a/src/lib/evas/canvas/meson.build b/src/lib/evas/canvas/meson.build
index 196b3962bb..09320e690d 100644
--- a/src/lib/evas/canvas/meson.build
+++ b/src/lib/evas/canvas/meson.build
@@ -2,23 +2,9 @@
pub_eo_files = [
'efl_canvas_polygon.eo',
'efl_canvas_image_internal.eo',
- 'evas_canvas3d_camera.eo',
- 'evas_canvas3d_texture.eo',
- 'evas_canvas3d_material.eo',
- 'evas_canvas3d_light.eo',
- 'evas_canvas3d_mesh.eo',
- 'evas_canvas3d_primitive.eo',
- 'evas_canvas3d_node.eo',
- 'evas_canvas3d_scene.eo',
- 'evas_canvas3d_object.eo',
'efl_canvas_image.eo',
'efl_canvas_snapshot.eo',
'efl_canvas_proxy.eo',
- 'efl_canvas_scene3d.eo',
- 'efl_canvas_surface.eo',
- 'efl_canvas_surface_tbm.eo',
- 'efl_canvas_surface_x11.eo',
- 'efl_canvas_surface_wayland.eo',
'efl_canvas_filter_internal.eo',
'efl_input_state.eo',
'efl_input_interface.eo',
@@ -32,13 +18,13 @@ pub_eo_files = [
'efl_canvas_pointer.eo',
'efl_canvas_scene.eo',
'efl_canvas_animation.eo',
- 'efl_canvas_animation_alpha.eo',
- 'efl_canvas_animation_rotate.eo',
- 'efl_canvas_animation_scale.eo',
- 'efl_canvas_animation_translate.eo',
- 'efl_canvas_animation_group.eo',
- 'efl_canvas_animation_group_parallel.eo',
- 'efl_canvas_animation_group_sequential.eo',
+ 'efl_canvas_alpha_animation.eo',
+ 'efl_canvas_rotate_animation.eo',
+ 'efl_canvas_scale_animation.eo',
+ 'efl_canvas_translate_animation.eo',
+ 'efl_canvas_group_animation.eo',
+ 'efl_canvas_parallel_group_animation.eo',
+ 'efl_canvas_sequential_group_animation.eo',
'efl_canvas_textblock_factory.eo',
'efl_canvas_rectangle.eo',
'efl_canvas_object.eo',
@@ -54,12 +40,32 @@ pub_eo_files = [
'efl_canvas_group.eo',
'efl_gfx_mapping.eo',
'efl_canvas_event_grabber.eo',
- 'efl_text_cursor.eo',
+ 'efl_text_cursor_object.eo',
'efl_canvas_textblock.eo',
'efl_text_formatter.eo',
'efl_canvas_object_animation.eo',
]
+priv_eo_files = [
+ 'efl_canvas_surface.eo',
+ 'efl_canvas_surface_tbm.eo',
+ 'efl_canvas_surface_x11.eo',
+ 'efl_canvas_surface_wayland.eo',
+]
+
+foreach eo_file : priv_eo_files
+ priv_eo_file_target += custom_target('eolian_gen_' + eo_file,
+ input : eo_file,
+ output : [eo_file + '.h'],
+ depfile : eo_file + '.d',
+ command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories,
+ '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
+ '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
+ '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
+ '-e', 'EVAS_API',
+ '-gchd', '@INPUT@'])
+endforeach
+
evas_canvas_eo_files = pub_eo_files
pub_evas_eo_files += files(pub_eo_files)
@@ -75,12 +81,12 @@ foreach eo_file : pub_eo_files
'-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
'-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
'-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
+ '-e', 'EVAS_API',
'-gchd', '@INPUT@'])
endforeach
pub_eo_types_files = [
- 'evas_canvas3d_types.eot',
'efl_canvas_animation_types.eot',
'efl_input_types.eot',
]
@@ -97,6 +103,7 @@ foreach eo_file : pub_eo_types_files
command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories,
'-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
'-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
+ '-e', 'EVAS_API',
'-ghd', '@INPUT@'])
endforeach
@@ -111,6 +118,7 @@ evas_legacy_h = files([
'efl_canvas_vg_node_eo.legacy.h',
'efl_canvas_vg_object_eo.legacy.h',
'efl_canvas_vg_shape_eo.legacy.h',
+ 'efl_canvas_vg_gradient_eo.legacy.h',
'evas_box_eo.legacy.h',
'evas_canvas_eo.legacy.h',
'evas_grid_eo.legacy.h',
@@ -165,7 +173,6 @@ evas_src += files([
'efl_canvas_event_grabber.c',
'efl_canvas_proxy.c',
'efl_canvas_snapshot.c',
- 'efl_canvas_scene3d.c',
'efl_canvas_surface.c',
'efl_canvas_surface_tbm.c',
'efl_canvas_surface_x11.c',
@@ -179,13 +186,13 @@ evas_src += files([
'efl_input_clickable.c',
'efl_input_device.c',
'efl_canvas_animation.c',
- 'efl_canvas_animation_alpha.c',
- 'efl_canvas_animation_rotate.c',
- 'efl_canvas_animation_scale.c',
- 'efl_canvas_animation_translate.c',
- 'efl_canvas_animation_group.c',
- 'efl_canvas_animation_group_parallel.c',
- 'efl_canvas_animation_group_sequential.c',
+ 'efl_canvas_alpha_animation.c',
+ 'efl_canvas_rotate_animation.c',
+ 'efl_canvas_scale_animation.c',
+ 'efl_canvas_translate_animation.c',
+ 'efl_canvas_group_animation.c',
+ 'efl_canvas_parallel_group_animation.c',
+ 'efl_canvas_sequential_group_animation.c',
'efl_gfx_vg_value_provider.c',
'efl_canvas_vg_object.c',
'efl_canvas_vg_node.c',
@@ -197,19 +204,8 @@ evas_src += files([
'efl_canvas_vg_shape.c',
'efl_canvas_vg_image.c',
'evas_filter_mixin.c',
- 'evas_canvas3d_object.c',
- 'evas_canvas3d_scene.c',
- 'evas_canvas3d_node.c',
- 'evas_canvas3d_camera.c',
- 'evas_canvas3d_light.c',
- 'evas_canvas3d_mesh.c',
- 'evas_canvas3d_texture.c',
- 'evas_canvas3d_material.c',
- 'evas_canvas3d_primitive.c',
- 'evas_canvas3d_node_callback.h',
- 'evas_canvas3d_eet.c',
'efl_canvas_object_animation.c',
- 'efl_text_cursor.c',
+ 'efl_text_cursor_object.c',
'efl_text_formatter.c'
])