EOLIAN static void
_evas_3d_camera_evas_3d_object_change_notify(Eo *obj,Evas_3D_Camera_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->nodes) eina_hash_foreach(pd->nodes, _camera_node_change_notify, obj);
}
_evas_3d_camera_eo_base_destructor(Eo *obj,
Evas_3D_Camera_Data *pd)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
//evas_3d_object_unreference(&pd->base);
if (pd->nodes) eina_hash_free(pd->nodes);
eo_do_super(obj, MY_CLASS, eo_destructor());
_evas_3d_camera_projection_matrix_set(Eo *obj, Evas_3D_Camera_Data *pd,
const Evas_Real *matrix)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_mat4_array_set(&pd->projection, matrix);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_CAMERA_PROJECTION, NULL));
}
ymax = dnear * (Evas_Real)tan((double)fovy * M_PI / 360.0);
xmax = ymax * aspect;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_mat4_frustum_set(&pd->projection, -xmax, xmax, -ymax, ymax, dnear, dfar);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_CAMERA_PROJECTION, NULL));
}
Evas_Real bottom, Evas_Real top,
Evas_Real dnear, Evas_Real dfar)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_mat4_frustum_set(&pd->projection, left, right, bottom, top, dnear, dfar);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_CAMERA_PROJECTION, NULL));
}
Evas_Real bottom, Evas_Real top,
Evas_Real dnear, Evas_Real dfar)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_mat4_ortho_set(&pd->projection, left, right, bottom, top, dnear, dfar);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_CAMERA_PROJECTION, NULL));
}
EOLIAN static void
_evas_3d_light_evas_3d_object_change_notify(Eo *obj, Evas_3D_Light_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->nodes)
eina_hash_foreach(pd->nodes, _light_node_change_notify, obj);
}
EOLIAN static void
_evas_3d_light_eo_base_destructor(Eo *obj, Evas_3D_Light_Data *pd)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->nodes)
eina_hash_free(pd->nodes);
eo_do_super(obj, MY_CLASS, eo_destructor());
EOLIAN static void
_evas_3d_light_directional_set(Eo *obj, Evas_3D_Light_Data *pd, Eina_Bool directional)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->directional != directional)
{
pd->directional = directional;
EOLIAN static void
_evas_3d_light_ambient_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->ambient.r = r;
pd->ambient.g = g;
pd->ambient.b = b;
EOLIAN static void
_evas_3d_light_diffuse_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->diffuse.r = r;
pd->diffuse.g = g;
pd->diffuse.b = b;
EOLIAN static void
_evas_3d_light_specular_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->specular.r = r;
pd->specular.g = g;
pd->specular.b = b;
EOLIAN static void
_evas_3d_light_spot_exponent_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real exponent)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->spot_exp = exponent;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_SPOT_EXP, NULL));
}
EOLIAN static void
_evas_3d_light_spot_cutoff_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real cutoff)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->spot_cutoff = cutoff;
pd->spot_cutoff_cos = cos(cutoff * M_PI / 180.0);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_SPOT_CUTOFF, NULL));
EOLIAN static void
_evas_3d_light_attenuation_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real constant, Evas_Real linear, Evas_Real quadratic)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->atten_const = constant;
pd->atten_linear = linear;
pd->atten_quad = quadratic;
EOLIAN static void
_evas_3d_light_attenuation_enable_set(Eo *obj, Evas_3D_Light_Data *pd, Eina_Bool enable)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->enable_attenuation != enable)
{
pd->enable_attenuation = enable;
_evas_3d_light_projection_matrix_set(Eo *obj, Evas_3D_Light_Data *pd,
const Evas_Real *matrix)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_mat4_array_set(&pd->projection, matrix);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_PROJECTION, NULL));
}
ymax = dnear * (Evas_Real)tan((double)fovy * M_PI / 360.0);
xmax = ymax * aspect;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_mat4_frustum_set(&pd->projection, -xmax, xmax, -ymax, ymax, dnear, dfar);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_PROJECTION, NULL));
}
Evas_Real bottom, Evas_Real top,
Evas_Real dnear, Evas_Real dfar)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_mat4_frustum_set(&pd->projection, left, right, bottom, top, dnear, dfar);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_PROJECTION, NULL));
}
Evas_Real bottom, Evas_Real top,
Evas_Real dnear, Evas_Real dfar)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_mat4_ortho_set(&pd->projection, left, right, bottom, top, dnear, dfar);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_PROJECTION, NULL));
}
EOLIAN static void
_evas_3d_material_evas_3d_object_change_notify(Eo *obj, Evas_3D_Material_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->meshes)
eina_hash_foreach(pd->meshes, _material_mesh_change_notify, obj);
}
EOLIAN static void
-_evas_3d_material_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd)
+_evas_3d_material_evas_3d_object_update_notify(Eo *obj, Evas_3D_Material_Data *pd)
{
int i;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
for (i = 0; i < EVAS_3D_MATERIAL_ATTRIB_COUNT; i++)
{
if (pd->attribs[i].enable)
{
int i;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->meshes)
eina_hash_free(pd->meshes);
}
EOLIAN static void
-_evas_3d_material_enable_set(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib, Eina_Bool enable)
+_evas_3d_material_enable_set(Eo *obj, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib, Eina_Bool enable)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->attribs[attrib].enable = enable;
}
EOLIAN static void
_evas_3d_material_color_set(Eo *obj, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_color_set(&pd->attribs[attrib].color, r, g, b, a);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MATERIAL_COLOR, NULL));
}
}
EOLIAN static void
-_evas_3d_material_shininess_set(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, Evas_Real shininess)
+_evas_3d_material_shininess_set(Eo *obj, Evas_3D_Material_Data *pd, Evas_Real shininess)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->shininess = shininess;
}
EOLIAN static void
_evas_3d_material_texture_set(Eo *obj, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib, Evas_3D_Texture *texture)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->attribs[attrib].texture != texture)
{
if (pd->attribs[attrib].texture)
}
EOLIAN static void
-_evas_3d_mesh_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd)
+_evas_3d_mesh_evas_3d_object_update_notify(Eo *obj, Evas_3D_Mesh_Data *pd)
{
Eina_List *l;
Evas_3D_Mesh_Frame *f;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
EINA_LIST_FOREACH(pd->frames, l, f)
{
if (f->material)
EOLIAN static void
_evas_3d_mesh_eo_base_destructor(Eo *obj, Evas_3D_Mesh_Data *pd)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
//evas_3d_object_unreference(&pd->base);
_mesh_fini(pd);
eo_do_super(obj, MY_CLASS, eo_destructor());
}
EOLIAN static void
-_evas_3d_mesh_shade_mode_set(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, Evas_3D_Shade_Mode mode)
+_evas_3d_mesh_shade_mode_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Shade_Mode mode)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->shade_mode != mode)
{
pd->shade_mode = mode;
EOLIAN static void
_evas_3d_mesh_vertex_count_set(Eo *obj, Evas_3D_Mesh_Data *pd, unsigned int count)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->vertex_count = count;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_VERTEX_COUNT, NULL));
}
return;
}
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
f = evas_3d_mesh_frame_new(obj);
if (f == NULL)
return;
}
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->frames = eina_list_remove(pd->frames, f);
evas_3d_mesh_frame_free(f);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_FRAME, NULL));
if (f->material == material)
return;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (f->material)
{
evas_3d_material_mesh_del(f->material, obj);
return;
}
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (attrib == EVAS_3D_VERTEX_POSITION)
{
int i = 0, j = 0, size = stride/sizeof(float);
return;
}
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (attrib == EVAS_3D_VERTEX_POSITION)
{
element_count = 3;
return NULL;
}
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
f->vertices[attrib].mapped = EINA_TRUE;
return f->vertices[attrib].data;
}
return;
}
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
f->vertices[attrib].mapped = EINA_FALSE;
}
EOLIAN static void
_evas_3d_mesh_index_data_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Index_Format format, int count, const void *indices)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->owns_indices && pd->indices)
free(pd->indices);
return;
}
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (!pd->owns_indices || pd->index_size < size)
{
if (pd->owns_indices && pd->indices)
return NULL;
}
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->index_mapped = EINA_TRUE;
return pd->indices;
}
return;
}
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->index_mapped = EINA_FALSE;
}
EOLIAN static void
_evas_3d_mesh_vertex_assembly_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Vertex_Assembly assembly)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->assembly = assembly;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_VERTEX_ASSEMBLY, NULL));
}
EOLIAN static Evas_3D_Vertex_Assembly
_evas_3d_mesh_vertex_assembly_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
return pd->assembly;
}
EOLIAN static void
_evas_3d_mesh_fog_color_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_color_set(&pd->fog_color, r, g, b, a);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_FOG, NULL));
}
EOLIAN static void
_evas_3d_mesh_fog_enable_set(Eo *obj, Evas_3D_Mesh_Data *pd, Eina_Bool enabled)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->fog_enabled = enabled;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_FOG, NULL));
}
EOLIAN static void
_evas_3d_mesh_blending_enable_set(Eo *obj, Evas_3D_Mesh_Data *pd, Eina_Bool blending)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->blending = blending;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_BLENDING, NULL));
}
EOLIAN static void
_evas_3d_mesh_blending_func_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Blend_Func sfactor, Evas_3D_Blend_Func dfactor)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->blend_sfactor = sfactor;
pd->blend_dfactor = dfactor;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_BLENDING, NULL));
_evas_3d_mesh_mmap_set(Eo *obj, Evas_3D_Mesh_Data *pd,
Eina_File *file, const char *key EINA_UNUSED)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
_mesh_fini(pd);
_mesh_init(pd);
const char *file,
const char *key EINA_UNUSED)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
_mesh_fini(pd);
_mesh_init(pd);
{
if ((file == NULL) || (obj == NULL) || (pd == NULL)) return EINA_FALSE;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
Evas_3D_Mesh_Frame *f = evas_3d_mesh_frame_find(pd, 0);
if (f == NULL)
EOLIAN static Eina_Bool
_evas_3d_mesh_color_pick_enable_set(Eo *obj, Evas_3D_Mesh_Data *pd, Eina_Bool _enabled)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->color_pick_enabled != _enabled)
pd->color_pick_enabled = _enabled;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_COLOR_PICK, NULL));
Eina_Bool scale;
Eina_Bool parent_change;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
/* 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);
EOLIAN static void
_evas_3d_node_evas_3d_object_update_notify(Eo *obj, Evas_3D_Node_Data *pd EINA_UNUSED)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
/* Update transform. */
evas_3d_node_tree_traverse(obj, EVAS_3D_TREE_TRAVERSE_LEVEL_ORDER, EINA_FALSE,
_node_transform_update, NULL);
ERR("Failed to add a member node (adding to itself).");
return;
}
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
Evas_3D_Node_Data *pdmember = eo_data_scope_get(member, MY_CLASS);
if (pdmember->parent == obj)
return;
return;
}
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
/* Delete the member node. */
pd->members = eina_list_remove(pd->members, member);
pdmember->parent = NULL;
EOLIAN static const Eina_List *
_evas_3d_node_member_list_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
return pd->members;
}
EOLIAN static void
_evas_3d_node_position_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_Real x, Evas_Real y, Evas_Real z)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->position.x = x;
pd->position.y = y;
pd->position.z = z;
EOLIAN static void
_evas_3d_node_orientation_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_Real x, Evas_Real y, Evas_Real z, Evas_Real w)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->orientation.x = x;
pd->orientation.y = y;
pd->orientation.z = z;
Evas_Real s = sin(half_angle);
Evas_Vec3 axis;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_vec3_set(&axis, x, y, z);
evas_vec3_normalize(&axis, &axis);
EOLIAN static void
_evas_3d_node_scale_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_Real x, Evas_Real y, Evas_Real z)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->scale.x = x;
pd->scale.y = y;
pd->scale.z = z;
EOLIAN static void
_evas_3d_node_position_inherit_set(Eo *obj, Evas_3D_Node_Data *pd, Eina_Bool inherit)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->position_inherit = inherit;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_TRANSFORM_POSITION, NULL));
}
EOLIAN static void
_evas_3d_node_orientation_inherit_set(Eo *obj, Evas_3D_Node_Data *pd, Eina_Bool inherit)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->orientation_inherit = inherit;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_TRANSFORM_ORIENTATION, NULL));
}
EOLIAN static void
_evas_3d_node_scale_inherit_set(Eo *obj, Evas_3D_Node_Data *pd, Eina_Bool inherit)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->scale_inherit = inherit;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_TRANSFORM_SCALE, NULL));
}
Evas_Vec3 up;
Evas_Vec3 x, y, z;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
/* Target position in parent space. */
if (target_space == EVAS_3D_SPACE_LOCAL)
{
if (pd->data.camera.camera == camera)
return;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->data.camera.camera)
{
/* Detach previous camera object. */
if (pd->data.light.light == light)
return;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->data.light.light)
{
/* Detach previous light object. */
return;
}
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if ((nm = _node_mesh_new(obj, mesh)) == NULL)
{
ERR("Failed to create node mesh.");
return;
}
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (!eina_hash_del(pd->data.mesh.node_meshes, &mesh, NULL))
{
ERR("The given mesh doesn't belong to this node.");
EOLIAN static const Eina_List *
_evas_3d_node_mesh_list_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
return pd->data.mesh.meshes;
}
return;
}
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if ((nm = eina_hash_find(pd->data.mesh.node_meshes, &mesh)) == NULL)
{
ERR("The given mesh doesn't belongs to this node.");
return 0;
}
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if ((nm = eina_hash_find(pd->data.mesh.node_meshes, &mesh)) == NULL)
{
ERR("The given mesh doesn't belongs to this node.");
}
EOLIAN static void
-_evas_3d_object_type_set(Eo *obj EINA_UNUSED, Evas_3D_Object_Data *pd, Evas_3D_Object_Type type)
+_evas_3d_object_type_set(Eo *obj, Evas_3D_Object_Data *pd, Evas_3D_Object_Type type)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->type = type;
}
if (pd->dirty[state])
return;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->dirty[state] = EINA_TRUE;
pd->dirty[EVAS_3D_STATE_ANY] = EINA_TRUE;
if (!pd->dirty[EVAS_3D_STATE_ANY])
return;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
eo_do(obj, evas_3d_object_update_notify());
memset(&pd->dirty[0], 0x00, sizeof(Eina_Bool) * EVAS_3D_STATE_MAX);
}
EOLIAN static void
-_evas_3d_scene_evas_3d_object_change_notify(Eo *eo_obj EINA_UNUSED, Evas_3D_Scene_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED)
+_evas_3d_scene_evas_3d_object_change_notify(Eo *eo_obj, Evas_3D_Scene_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED)
{
Eina_List *l;
Evas_Object *eo;
+ evas_object_async_block(eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS));
EINA_LIST_FOREACH(pd->images, l, eo)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo, EVAS_OBJECT_CLASS);
}
EOLIAN static void
-_evas_3d_scene_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd)
+_evas_3d_scene_evas_3d_object_update_notify(Eo *obj, Evas_3D_Scene_Data *pd)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->root_node)
{
eo_do(pd->root_node, evas_3d_object_update());
if (pd->root_node == node)
return;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->root_node)
{
evas_3d_node_scene_root_del(pd->root_node, obj);
if (pd->camera_node == node)
return;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->camera_node)
{
evas_3d_node_scene_camera_del(pd->camera_node, obj);
EOLIAN static void
_evas_3d_scene_size_set(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd, int w, int h)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->w = w;
pd->h = h;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_SCENE_SIZE, NULL));
_evas_3d_scene_background_color_set(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd,
Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
evas_color_set(&pd->bg_color, r, g, b, a);
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_SCENE_BACKGROUND_COLOR, NULL));
}
Evas_3D_Camera_Data *pd_camera;
Evas_3D_Object_Data *pd_parent;
Evas_Public_Data *e;
- int tex, px, py;;
+ int tex = 0, px, py;;
double redcomponent;
Eina_Stringshare *tmp;
Eina_Array *arr = NULL;
Eina_Bool update_scene = EINA_FALSE;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd_parent = eo_data_scope_get(obj, EVAS_3D_OBJECT_CLASS);
e = eo_data_scope_get(pd_parent->evas, EVAS_CANVAS_CLASS);
data.s = 0.0;
data.t = 0.0;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
/* Update the scene graph. */
eo_do(obj, evas_3d_object_update());
pd_camera_node = eo_data_scope_get(pd->camera_node, EVAS_3D_NODE_CLASS);
void *node;
Eina_Bool pick = EINA_FALSE;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
/* Check pick for given scene. */
pick = eo_do(obj, evas_3d_scene_pick(x, y, NULL, NULL, NULL, NULL));
EOLIAN static void
_evas_3d_scene_shadows_enable_set(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd, Eina_Bool _shadows_enabled)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
pd->shadows_enabled = _shadows_enabled;
eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_SCENE_SHADOWS_ENABLED, NULL));
}
EOLIAN static Eina_Bool
_evas_3d_scene_color_pick_enable_set(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd, Eina_Bool _enabled)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->color_pick_enabled != _enabled)
pd->color_pick_enabled = _enabled;
_evas_3d_texture_evas_3d_object_change_notify(Eo *obj, Evas_3D_Texture_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->materials)
eina_hash_foreach(pd->materials, _texture_material_change_notify, obj);
}
EOLIAN static void
_evas_3d_texture_evas_3d_object_update_notify(Eo *obj, Evas_3D_Texture_Data *pd)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (pd->source)
{
Eo *evas = NULL;
EOLIAN static void
_evas_3d_texture_eo_base_destructor(Eo *obj, Evas_3D_Texture_Data *pd EINA_UNUSED)
{
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
//evas_3d_object_unreference(&pd->base);
_texture_fini(obj);
eo_do_super(obj, MY_CLASS, eo_destructor());
}
EOLIAN static void
-_evas_3d_texture_data_set(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *pd, Evas_3D_Color_Format color_format,
+_evas_3d_texture_data_set(Eo *obj, Evas_3D_Texture_Data *pd, Evas_3D_Color_Format color_format,
Evas_3D_Pixel_Format pixel_format, int w, int h, const void *data)
{
Eo *evas = NULL;
eo_do(obj, evas = evas_common_evas_get());
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (!pd->engine_data && e->engine.func->texture_new)
pd->engine_data = e->engine.func->texture_new(e->engine.data.output);
eo_do(obj, evas = evas_common_evas_get());
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (!pd->engine_data && e->engine.func->texture_new)
pd->engine_data = e->engine.func->texture_new(e->engine.data.output);
if (source == pd->source)
return;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
_texture_fini(obj);
if (source == NULL)
}
EOLIAN static void
-_evas_3d_texture_source_visible_set(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *pd, Eina_Bool visible)
+_evas_3d_texture_source_visible_set(Eo *obj, Evas_3D_Texture_Data *pd, Eina_Bool visible)
{
Evas_Object_Protected_Data *src_obj;
if (src_obj->proxy->src_invisible == !visible)
return;
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
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);
Eo *evas = NULL;
eo_do(obj, evas = evas_common_evas_get());
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (e->engine.func->texture_size_get)
{
e->engine.func->texture_size_get(e->engine.data.output,
Eo *evas = NULL;
eo_do(obj, evas = evas_common_evas_get());
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (e->engine.func->texture_wrap_set)
{
e->engine.func->texture_wrap_set(e->engine.data.output,
Eo *evas = NULL;
eo_do(obj, evas = evas_common_evas_get());
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (e->engine.func->texture_wrap_set)
{
e->engine.func->texture_wrap_get(e->engine.data.output,
Eo *evas = NULL;
eo_do(obj, evas = evas_common_evas_get());
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (e->engine.func->texture_filter_set)
{
e->engine.func->texture_filter_set(e->engine.data.output,
Eo *evas = NULL;
eo_do(obj, evas = evas_common_evas_get());
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
+ evas_object_async_block(eo_data_scope_get(obj, EVAS_OBJECT_CLASS));
if (e->engine.func->texture_filter_get)
{
e->engine.func->texture_filter_get(e->engine.data.output,
return;
MAGIC_CHECK_END();
+ evas_object_async_block(obj);
+
clip = eo_data_scope_get(eo_clip, EVAS_OBJECT_CLASS);
if (obj->cur->clipper && obj->cur->clipper->object == eo_clip) return;
if (eo_obj == eo_clip)
return;
}
- if (evas_object_intercept_call_clip_set(eo_obj, obj, eo_clip)) return;
+ if (evas_object_intercept_call_clip_set(eo_obj, obj, eo_clip))
+ {
+ return;
+ }
// illegal to set anything but a rect or an image as a clip
if (clip->type != o_rect_type && clip->type != o_image_type)
{
{
if (!obj->cur->clipper) return;
+ evas_object_async_block(obj);
obj->clip.cache_clipees_answer = eina_list_free(obj->clip.cache_clipees_answer);
/* unclip */
EOLIAN void
_evas_canvas_font_path_clear(Eo *eo_e EINA_UNUSED, Evas_Public_Data *evas)
{
+ evas_canvas_async_block(evas);
while (evas->font_path)
{
eina_stringshare_del(evas->font_path->data);
_evas_canvas_font_path_append(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, const char *path)
{
if (!path) return;
+ evas_canvas_async_block(e);
e->font_path = eina_list_append(e->font_path, eina_stringshare_add(path));
evas_font_init();
_evas_canvas_font_path_prepend(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, const char *path)
{
if (!path) return;
+ evas_canvas_async_block(e);
e->font_path = eina_list_prepend(e->font_path, eina_stringshare_add(path));
evas_font_init();
{
Evas_Layer *lay;
+ evas_canvas_async_block(e);
if (e->hinting == hinting) return;
e->hinting = hinting;
EOLIAN void
_evas_canvas_font_cache_flush(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
{
+ evas_canvas_async_block(e);
evas_render_rendering_wait(e);
e->engine.func->font_cache_flush(e->engine.data.output);
}
_evas_canvas_font_cache_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int size)
{
if (size < 0) size = 0;
+ evas_canvas_async_block(e);
evas_render_rendering_wait(e);
e->engine.func->font_cache_set(e->engine.data.output, size);
}
evas_object_inject(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas *e)
{
Evas_Layer *lay;
+ Evas_Public_Data *evas;
if (!obj) return;
if (!e) return;
if (obj->in_layer) return;
+ evas = eo_data_scope_get(e, EVAS_CANVAS_CLASS);
+ if (!evas) return;
+ evas_canvas_async_block(evas);
lay = evas_layer_find(e, obj->cur->layer);
if (!lay)
{
Evas *eo_e;
if (obj->delete_me) return;
+ evas_object_async_block(obj);
if (evas_object_intercept_call_layer_set(eo_obj, obj, l)) return;
if (obj->smart.parent) return;
if (obj->cur->layer == l)
EVAS_ARRAY_SET(e, texts_unref_queue);
#undef EVAS_ARRAY_SET
+ eina_lock_new(&(e->lock_objects));
}
EAPI void
int i;
Eina_Bool del;
+ evas_canvas_async_block(e);
if (e->walking_list == 0) evas_render_idle_flush(eo_e);
if (e->walking_list > 0) return;
+
evas_render_idle_flush(eo_e);
_evas_post_event_callback_free(eo_e);
_evas_device_cleanup(eo_e);
+ eina_lock_free(&(e->lock_objects));
+
e->magic = 0;
eo_do_super(eo_e, MY_CLASS, eo_destructor());
}
if (em->id_engine != render_method) return;
if (!evas_module_load(em)) return;
+ evas_canvas_async_block(e);
/* set the correct render */
e->output.render_method = render_method;
e->engine.func = (em->functions);
EOLIAN static Eina_Bool
_evas_canvas_engine_info_set(Eo *eo_e, Evas_Public_Data *e, Evas_Engine_Info *info)
{
+ Eina_Bool res;
+
if (!info) return EINA_FALSE;
if (info != e->engine.info) return EINA_FALSE;
if (info->magic != e->engine.info_magic) return EINA_FALSE;
- return (Eina_Bool)e->engine.func->setup(eo_e, info);
+ evas_canvas_async_block(e);
+ res = e->engine.func->setup(eo_e, info);
+ return res;
}
EOLIAN static void
if (w < 1) w = 1;
if (h < 1) h = 1;
+ evas_canvas_async_block(e);
e->output.w = w;
e->output.h = h;
e->output.changed = 1;
x = 0;
y = 0;
}
+ evas_canvas_async_block(e);
e->viewport.x = x;
e->viewport.y = y;
e->viewport.w = w;
{
if ((x == e->framespace.x) && (y == e->framespace.y) &&
(w == e->framespace.w) && (h == e->framespace.h)) return;
+ evas_canvas_async_block(e);
e->framespace.x = x;
e->framespace.y = y;
e->framespace.w = w;
if (obj->map->cur.usemap == enabled) return;
pchange = obj->changed;
+ evas_object_async_block(obj);
EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
map_write->cur.usemap = enabled;
EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
EOLIAN void
_evas_object_map_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, const Evas_Map *map)
{
+ evas_object_async_block(obj);
if ((!map) || (map->count < 4))
{
if (obj->map->surface)
EOLIAN Evas_Map *
_evas_object_map_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
{
+ evas_object_async_block(obj);
return obj->map->cur.map;
}
if ((o->cur->key) && (key) && (!strcmp(o->cur->key, key)))
return;
}
-
+ evas_object_async_block(obj);
_image_init_set(f, NULL, key, eo_obj, obj, o, &lo);
o->engine_data = ENFN->image_mmap(ENDT, o->cur->u.f, o->cur->key, &o->load_error, &lo);
_image_done_set(eo_obj, obj, o);
if (!o->engine_data)
ENFN->image_data_preload_cancel(ENDT, o->engine_data, eo_obj);
*/
+ evas_object_async_block(obj);
_image_init_set(NULL, file, key, eo_obj, obj, o, &lo);
o->engine_data = ENFN->image_load(ENDT, o->cur->u.file, o->cur->key, &o->load_error, &lo);
_image_done_set(eo_obj, obj, o);
}
}
if (o->cur->source == eo_src) return EINA_TRUE;
-
+ evas_object_async_block(obj);
_evas_object_image_cleanup(eo_obj, obj, o);
/* Kill the image if any */
if (o->cur->u.file || o->cur->key)
_evas_image_source_clip_set(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, Eina_Bool source_clip)
{
Evas_Object_Protected_Data *src_obj;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
source_clip = !!source_clip;
if (o->proxy_src_clip == source_clip) return;
+ evas_object_async_block(obj);
o->proxy_src_clip = source_clip;
if (!o->cur->source) return;
_evas_image_source_visible_set(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, Eina_Bool visible)
{
Evas_Object_Protected_Data *src_obj;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (!o->cur->source) return;
src_obj = eo_data_scope_get(o->cur->source, EVAS_OBJECT_CLASS);
if (src_obj->proxy->src_invisible == !visible) return;
+ evas_object_async_block(obj);
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);
if (o->cur->scene == scene) return;
+ evas_object_async_block(obj);
_image_init_set(NULL, NULL, NULL, eo_obj, obj, o, &lo);
o->engine_data = ENFN->image_load(ENDT, o->cur->u.file, o->cur->key, &o->load_error, &lo);
_image_done_set(eo_obj, obj, o);
(o->cur->border.t == t) &&
(o->cur->border.b == b)) return;
+ evas_object_async_block(obj);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
{
state_write->border.l = l;
EOLIAN static void
_evas_image_border_center_fill_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Border_Fill_Mode fill)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (fill == o->cur->border.fill) return;
+ evas_object_async_block(obj);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
state_write->border.fill = fill;
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
o->changed = EINA_TRUE;
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
static void
_evas_image_filled_set(Eo *eo_obj, Evas_Image_Data* o, Eina_Bool setting)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
setting = !!setting;
if (o->filled == setting) return;
+ evas_object_async_block(obj);
o->filled = setting;
if (!o->filled)
evas_object_event_callback_del(eo_obj, EVAS_CALLBACK_RESIZE,
EOLIAN static void
_evas_image_border_scale_set(Eo *eo_obj, Evas_Image_Data *o, double scale)
{
- Evas_Object_Protected_Data *obj;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (scale == o->cur->border.scale) return;
+ evas_object_async_block(obj);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
state_write->border.scale = scale;
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
o->changed = EINA_TRUE;
- obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
EOLIAN static void
_evas_image_fill_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
{
- Evas_Object_Protected_Data *obj;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (w == 0) return;
if (h == 0) return;
(o->cur->fill.w == w) &&
(o->cur->fill.h == h)) return;
+ evas_object_async_block(obj);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
{
state_write->fill.x = x;
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
o->changed = EINA_TRUE;
- obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
EOLIAN static void
_evas_image_fill_spread_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Fill_Spread spread)
{
- Evas_Object_Protected_Data *obj;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (spread == (Evas_Fill_Spread)o->cur->spread) return;
+ evas_object_async_block(obj);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
state_write->spread = spread;
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
o->changed = EINA_TRUE;
- obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
if (o->cur->scene) return;
+ evas_object_async_block(obj);
_evas_object_image_cleanup(eo_obj, obj, o);
if (w < 1) w = 1;
if (h < 1) h = 1;
DATA32 *data;
void* result = NULL;
+ evas_object_async_block(obj);
if ((o->preloading) && (o->engine_data))
{
o->preloading = EINA_FALSE;
Eina_Bool resize_call = EINA_FALSE;
+ evas_object_async_block(obj);
evas_render_rendering_wait(obj->layer->evas);
_evas_object_image_cleanup(eo_obj, obj, o);
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ if (for_writing) evas_object_async_block(obj);
if (for_writing) evas_render_rendering_wait(obj->layer->evas);
data = NULL;
EOLIAN static void
_evas_image_preload_begin(Eo *eo_obj, Evas_Image_Data *_pd EINA_UNUSED)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
_image_preload_internal(eo_obj, _pd, EINA_FALSE);
}
EOLIAN static void
_evas_image_preload_cancel(Eo *eo_obj, Evas_Image_Data *_pd EINA_UNUSED)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
_image_preload_internal(eo_obj, _pd, EINA_TRUE);
}
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (!data) return;
+ evas_object_async_block(obj);
_evas_object_image_cleanup(eo_obj, obj, o);
if ((o->cur->image.w <= 0) ||
(o->cur->image.h <= 0)) return;
EOLIAN static void
_evas_image_data_update_add(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
Eina_Rectangle *r;
int cnt;
RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, o->cur->image.w, o->cur->image.h);
if ((w <= 0) || (h <= 0)) return;
if (!o->written) return;
+ evas_object_async_block(obj);
cnt = eina_list_count(o->pixels->pixel_updates);
if (cnt == 1)
{ // detect single blob case already there to do a nop
}
o->changed = EINA_TRUE;
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if ((o->preloading) && (o->engine_data))
{
o->preloading = EINA_FALSE;
EOLIAN static void
_evas_image_efl_image_smooth_scale_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool smooth_scale)
{
- Evas_Object_Protected_Data *obj;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (((smooth_scale) && (o->cur->smooth_scale)) ||
((!smooth_scale) && (!o->cur->smooth_scale)))
return;
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
o->changed = EINA_TRUE;
- obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if ((o->preloading) && (o->engine_data))
{
o->preloading = EINA_FALSE;
RGBA_Image *im;
if (!o->engine_data) return 0;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
o->engine_data = ENFN->image_data_get(ENDT, o->engine_data, 0, &data, &o->load_error);
if (flags)
{
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
_evas_object_image_cleanup(eo_obj, obj, o);
if ((pixels->w != o->cur->image.w) || (pixels->h != o->cur->image.h)) return EINA_FALSE;
EOLIAN static void
_evas_image_pixels_get_callback_set(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, Evas_Object_Image_Pixels_Get_Cb func, void *data)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write)
{
pixi_write->func.get_pixels = func;
_evas_image_pixels_dirty_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool dirty)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
-
+ evas_object_async_block(obj);
if (dirty) o->dirty_pixels = EINA_TRUE;
else o->dirty_pixels = EINA_FALSE;
o->changed = EINA_TRUE;
EOLIAN static void
_evas_image_load_dpi_set(Eo *eo_obj, Evas_Image_Data *o, double dpi)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (dpi == o->load_opts->dpi) return;
-
+ evas_object_async_block(obj);
EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
low->dpi = dpi;
EINA_COW_LOAD_OPTS_WRITE_END(o, low);
if (o->cur->u.file)
{
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_image_unload(eo_obj, 0);
evas_object_inform_call_image_unloaded(eo_obj);
evas_object_image_load(eo_obj, obj, o);
EOLIAN static void
_evas_image_efl_image_load_size_set(Eo *eo_obj, Evas_Image_Data *o, int w, int h)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((o->load_opts->w == w) && (o->load_opts->h == h)) return;
-
+ evas_object_async_block(obj);
EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
{
low->w = w;
if (o->cur->u.file)
{
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_image_unload(eo_obj, 0);
evas_object_inform_call_image_unloaded(eo_obj);
evas_object_image_load(eo_obj, obj, o);
EOLIAN static void
_evas_image_load_scale_down_set(Eo *eo_obj, Evas_Image_Data *o, int scale_down)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (o->load_opts->scale_down_by == scale_down) return;
+ evas_object_async_block(obj);
EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
low->scale_down_by = scale_down;
EINA_COW_LOAD_OPTS_WRITE_END(o, low);
if (o->cur->u.file)
{
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_image_unload(eo_obj, 0);
evas_object_inform_call_image_unloaded(eo_obj);
evas_object_image_load(eo_obj, obj, o);
EOLIAN static void
_evas_image_load_region_set(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((o->load_opts->region.x == x) && (o->load_opts->region.y == y) &&
(o->load_opts->region.w == w) && (o->load_opts->region.h == h)) return;
-
+ evas_object_async_block(obj);
EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
{
low->region.x = x;
if (o->cur->u.file)
{
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_image_unload(eo_obj, 0);
evas_object_inform_call_image_unloaded(eo_obj);
evas_object_image_load(eo_obj, obj, o);
EOLIAN static void
_evas_image_load_orientation_set(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, Eina_Bool enable)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (o->load_opts->orientation == !!enable) return;
+ evas_object_async_block(obj);
EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
low->orientation = !!enable;
_evas_image_colorspace_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Colorspace cspace)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
_evas_object_image_cleanup(eo_obj, obj, o);
_evas_image_video_surface_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Video_Surface *surf)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
_evas_object_image_cleanup(eo_obj, obj, o);
if (o->video_surface)
_evas_image_video_surface_caps_set(Eo *eo_obj, Evas_Image_Data *o, unsigned int caps)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
_evas_object_image_cleanup(eo_obj, obj, o);
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
return;
MAGIC_CHECK_END();
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
evas_object_event_callback_del_full
(eo_obj, EVAS_CALLBACK_DEL, _on_image_native_surface_del, NULL);
if (surf) // We need to unset native surf on del to remove shared hash refs
_evas_image_native_surface_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Native_Surface *surf)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
-
+ evas_object_async_block(obj);
evas_render_rendering_wait(obj->layer->evas);
_evas_object_image_cleanup(eo_obj, obj, o);
_evas_image_scale_hint_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Image_Scale_Hint hint)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (o->scale_hint == hint) return;
o->scale_hint = hint;
if (o->engine_data)
_evas_image_content_hint_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Image_Content_Hint hint)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (o->content_hint == hint) return;
o->content_hint = hint;
if (o->engine_data)
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
return;
MAGIC_CHECK_END();
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (!ismask) return;
/* Convert to A8 if not already */
if (o->cur->frame == frame_index) return;
if (!evas_object_image_animated_get(eo_obj)) return;
-
+ evas_object_async_block(obj);
frame_count = evas_object_image_animated_frame_count_get(eo_obj);
/* limit the size of frame to FRAME_MAX */
EOLIAN void
_evas_canvas_image_cache_flush(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
{
+ evas_canvas_async_block(e);
evas_render_rendering_wait(e);
e->engine.func->image_cache_flush(e->engine.data.output);
}
{
Evas_Layer *layer;
+ evas_canvas_async_block(e);
evas_image_cache_flush(eo_e);
EINA_INLIST_FOREACH(e->layers, layer)
{
_evas_canvas_image_cache_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, int size)
{
if (size < 0) size = 0;
+ evas_canvas_async_block(e);
evas_render_rendering_wait(e);
e->engine.func->image_cache_set(e->engine.data.output, size);
}
(o->pixels_checked_out > 0)) return;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (dirty)
{
if (o->engine_data)
EOLIAN static void
_evas_image_filter_program_set(Eo *eo_obj, Evas_Image_Data *o, const char *arg)
{
- Evas_Object_Protected_Data *obj;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
Evas_Filter_Program *pgm = NULL;
if (!o) return;
if (o->cur->filter->code == arg) return;
if (o->cur->filter->code && arg && !strcmp(arg, o->cur->filter->code)) return;
+ evas_object_async_block(obj);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
EINA_COW_IMAGE_FILTER_WRITE_BEGIN(state_write, fcow)
{
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
// Update object
- obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
o->changed = EINA_TRUE;
evas_object_change(eo_obj, obj);
}
Eina_Hash *sources = o->cur->filter->sources;
obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (eo_source) source = eo_data_scope_get(eo_source, EVAS_OBJECT_CLASS);
if (!name)
(y1 == (obj->cur->geometry.y + o->cur.y1)) &&
(x2 == (obj->cur->geometry.x + o->cur.x2)) &&
(y2 == (obj->cur->geometry.y + o->cur.y2))) return;
+ evas_object_async_block(obj);
if (!(obj->layer->evas->is_frozen))
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS);
if (!obj) return;
+ evas_object_async_block(obj);
if (obj->delete_me || obj->eo_del_called) return;
if (obj->ref > 0)
{
if (obj->delete_me) return;
if (!obj->layer) return;
+ evas_object_async_block(obj);
if (evas_object_intercept_call_move(eo_obj, obj, x, y)) return;
if (obj->doing.in_move > 0)
if (!obj->layer) return;
if (w < 0) w = 0; if (h < 0) h = 0;
+ evas_object_async_block(obj);
if (evas_object_intercept_call_resize(eo_obj, obj, w, h)) return;
if (obj->doing.in_resize > 0)
{
if (!obj) return;
if (obj->delete_me) return;
+ evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
if (obj->size_hints->dispmode == dispmode) return;
obj->size_hints->dispmode = dispmode;
{
if (obj->delete_me)
return;
+ evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
if ((obj->size_hints->min.w == w) && (obj->size_hints->min.h == h)) return;
obj->size_hints->min.w = w;
{
if (obj->delete_me)
return;
+ evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
if ((obj->size_hints->max.w == w) && (obj->size_hints->max.h == h)) return;
obj->size_hints->max.w = w;
{
if (obj->delete_me)
return;
+ evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
if ((obj->size_hints->request.w == w) && (obj->size_hints->request.h == h)) return;
obj->size_hints->request.w = w;
{
if (obj->delete_me)
return;
+ evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
if ((obj->size_hints->aspect.mode == aspect) && (obj->size_hints->aspect.size.w == w) && (obj->size_hints->aspect.size.h == h)) return;
obj->size_hints->aspect.mode = aspect;
{
if (obj->delete_me)
return;
+ evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
if ((obj->size_hints->align.x == x) && (obj->size_hints->align.y == y)) return;
obj->size_hints->align.x = x;
{
if (obj->delete_me)
return;
+ evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
if ((obj->size_hints->weight.x == x) && (obj->size_hints->weight.y == y)) return;
obj->size_hints->weight.x = x;
{
if (obj->delete_me)
return;
+ evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
if ((obj->size_hints->padding.l == l) && (obj->size_hints->padding.r == r) && (obj->size_hints->padding.t == t) && (obj->size_hints->padding.b == b)) return;
obj->size_hints->padding.l = l;
static void
_evas_object_visibility_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Eina_Bool visible)
{
+ evas_object_async_block(obj);
if (visible) _show(eo_obj, obj);
else _hide(eo_obj, obj);
}
ERR("Evas only handles pre multiplied colors!");
}
+ evas_object_async_block(obj);
if (evas_object_intercept_call_color_set(eo_obj, obj, r, g, b, a)) return;
if (obj->is_smart)
{
anti_alias = !!anti_alias;
if (obj->cur->anti_alias == anti_alias)return;
+ evas_object_async_block(obj);
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
{
state_write->anti_alias = anti_alias;
if (obj->delete_me) return;
if (obj->cur->scale == scale) return;
+ evas_object_async_block(obj);
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
{
state_write->scale = scale;
if (obj->delete_me) return;
if (obj->cur->render_op == render_op) return;
+ evas_object_async_block(obj);
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
{
state_write->render_op = render_op;
EOLIAN static void
_evas_object_precise_is_inside_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Eina_Bool precise)
{
+ evas_object_async_block(obj);
obj->precise_is_inside = precise;
}
EOLIAN static void
_evas_object_static_clip_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Eina_Bool is_static_clip)
{
+ evas_object_async_block(obj);
obj->is_static_clip = is_static_clip;
}
{
Evas_Coord x, y;
+ evas_object_async_block(obj);
evas_object_geometry_get(eo_obj, &x, &y, NULL, NULL);
_is_frame_flag_set(obj, is_frame);
Evas_Coord min_x, max_x, min_y, max_y;
int is, was = 0;
-
+ evas_object_async_block(obj);
if (!obj->layer->evas->is_frozen)
{
if (!evas_event_passes_through(eo_obj, obj) &&
void *list_data;
int is, was;
+ evas_object_async_block(obj);
was = evas_object_is_in_output_rect(eo_obj, obj,
obj->layer->evas->pointer.x,
obj->layer->evas->pointer.y, 1, 1);
if (obj->smart.parent == smart_obj) return;
+ evas_object_async_block(obj);
if (obj->smart.parent) evas_object_smart_member_del(eo_obj);
o->member_count++;
if (!obj->smart.parent) return;
+ evas_object_async_block(obj);
Evas_Object_Protected_Data *smart = eo_data_scope_get(smart_obj, EVAS_OBJECT_CLASS);
if (smart->smart.smart && smart->smart.smart->smart_class->member_del)
smart->smart.smart->smart_class->member_del(smart_obj, eo_obj);
// Should we have an eo_children_iterator_new API and just inherit from it ?
EOLIAN static Eina_Iterator*
-_evas_object_smart_iterator_new(Eo *o, Evas_Smart_Data *priv)
+_evas_object_smart_iterator_new(Eo *eo_obj, Evas_Smart_Data *priv)
{
Evas_Object_Smart_Iterator *it;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (!priv->contained) return NULL;
+ evas_object_async_block(obj);
it = calloc(1, sizeof(Evas_Object_Smart_Iterator));
if (!it) return NULL;
EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
- it->parent = eo_ref(o);
+ it->parent = eo_ref(eo_obj);
it->current = priv->contained;
it->iterator.next = FUNC_ITERATOR_NEXT(_evas_object_smart_iterator_next);
}
EOLIAN static Eina_List*
-_evas_object_smart_members_get(Eo *eo_obj EINA_UNUSED, Evas_Smart_Data *o)
+_evas_object_smart_members_get(Eo *eo_obj, Evas_Smart_Data *o)
{
- Eina_List *members;
-
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ Eina_List *members = NULL;
Eina_Inlist *member;
- members = NULL;
+ evas_object_async_block(obj);
for (member = o->contained; member; member = member->next)
members = eina_list_append(members, ((Evas_Object_Protected_Data *)member)->object);
const Eina_Inlist *
evas_object_smart_members_get_direct(const Evas_Object *eo_obj)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
return NULL;
MAGIC_CHECK_END();
+ evas_object_async_block(obj);
if (!eo_isa(eo_obj, MY_CLASS)) return NULL;
Evas_Smart_Data *o = eo_data_scope_get(eo_obj, MY_CLASS);
return o->contained;
// XXX: do i need this?
if (!obj || !obj->layer || obj->delete_me) return;
+ evas_object_async_block(obj);
/* remove this entry from calc_list or processed list */
if (eina_clist_element_is_linked(&o->calc_entry))
eina_clist_remove(&o->calc_entry);
if (!obj->smart.smart || !obj->smart.smart->smart_class->calculate)
return;
+ evas_object_async_block(obj);
o->need_recalculate = 0;
obj->smart.smart->smart_class->calculate(eo_obj);
}
Eina_Clist *elem;
Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
+ evas_canvas_async_block(e);
evas_event_freeze(eo_e);
e->in_smart_calc++;
_evas_object_smart_changed(Eo *eo_obj, Evas_Smart_Data *o EINA_UNUSED)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
evas_object_change(eo_obj, obj);
eo_do(eo_obj, evas_obj_smart_need_recalculate_set(1));
}
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
Evas_Smart_Data *o = eo_data_scope_get(eo_obj, MY_CLASS);
+ evas_object_async_block(obj);
if (o->update_boundingbox_needed) return;
o->update_boundingbox_needed = EINA_TRUE;
return;
MAGIC_CHECK_END();
+ evas_object_async_block(obj);
os = eo_data_scope_get(eo_obj, MY_CLASS);
if (!os->update_boundingbox_needed) return;
}
EOLIAN static void
-_evas_text_efl_text_properties_font_source_set(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, const char *font_source)
+_evas_text_efl_text_properties_font_source_set(Eo *eo_obj, Evas_Text_Data *o, const char *font_source)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((o->cur.source) && (font_source) &&
(!strcmp(o->cur.source, font_source)))
return;
+ evas_object_async_block(obj);
/*
if (o->cur.source) eina_stringshare_del(o->cur.source);
if (font_source) o->cur.source = eina_stringshare_add(font_source);
EOLIAN static void
_evas_text_efl_text_properties_font_set(Eo *eo_obj, Evas_Text_Data *o, const char *font, Evas_Font_Size size)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
Eina_Bool is, was = EINA_FALSE;
Eina_Bool pass = EINA_FALSE, freeze = EINA_FALSE;
Eina_Bool source_invisible = EINA_FALSE;
if ((!font) || (size <= 0)) return;
+ evas_object_async_block(obj);
if (!(o->cur.font && !strcmp(font, o->cur.font)))
{
fdesc = evas_font_desc_new();
eina_stringshare_replace(&o->cur.font, font);
o->prev.font = NULL;
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (!(obj->layer->evas->is_frozen))
{
pass = evas_event_passes_through(eo_obj, obj);
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
{
state_write->geometry.w = w;
if (o->cur.ellipsis == ellipsis) return;
+ evas_object_async_block(obj);
o->cur.ellipsis = ellipsis;
o->changed = 1;
_evas_text_filter_changed_set(o, EINA_TRUE);
EOLIAN static void
_evas_text_efl_text_text_set(Eo *eo_obj, Evas_Text_Data *o, const char *_text)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
int is, was, len;
Eina_Unicode *text;
if ((o->cur.utf8_text) && (_text) && (!strcmp(o->cur.utf8_text, _text)))
return;
+ evas_object_async_block(obj);
text = eina_unicode_utf8_to_unicode(_text, &len);
if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING);
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
was = evas_object_is_in_output_rect(eo_obj, obj,
obj->layer->evas->pointer.x,
obj->layer->evas->pointer.y, 1, 1);
}
EOLIAN static void
-_evas_text_bidi_delimiters_set(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, const char *delim)
+_evas_text_bidi_delimiters_set(Eo *eo_obj, Evas_Text_Data *o, const char *delim)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
eina_stringshare_replace(&o->bidi_delimiters, delim);
}
EOLIAN static void
_evas_text_style_set(Eo *eo_obj, Evas_Text_Data *o, Evas_Text_Style_Type style)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
int pl = 0, pr = 0, pt = 0, pb = 0, l = 0, r = 0, t = 0, b = 0;
int w = 0, h = 0;
if (o->cur.style == style) return;
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
evas_text_style_pad_get(o->cur.style, &pl, &pr, &pt, &pb);
o->cur.style = style;
EOLIAN static void
_evas_text_shadow_color_set(Eo *eo_obj, Evas_Text_Data *o, int r, int g, int b, int a)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((o->cur.shadow.r == r) && (o->cur.shadow.g == g) &&
(o->cur.shadow.b == b) && (o->cur.shadow.a == a))
return;
+ evas_object_async_block(obj);
o->cur.shadow.r = r;
o->cur.shadow.g = g;
o->cur.shadow.b = b;
o->cur.shadow.a = a;
o->changed = 1;
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
EOLIAN static void
_evas_text_glow_color_set(Eo *eo_obj, Evas_Text_Data *o, int r, int g, int b, int a)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((o->cur.glow.r == r) && (o->cur.glow.g == g) &&
(o->cur.glow.b == b) && (o->cur.glow.a == a))
return;
+ evas_object_async_block(obj);
o->cur.glow.r = r;
o->cur.glow.g = g;
o->cur.glow.b = b;
o->cur.glow.a = a;
o->changed = 1;
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
EOLIAN static void
_evas_text_glow2_color_set(Eo *eo_obj, Evas_Text_Data *o, int r, int g, int b, int a)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((o->cur.glow2.r == r) && (o->cur.glow2.g == g) &&
(o->cur.glow2.b == b) && (o->cur.glow2.a == a))
return;
+ evas_object_async_block(obj);
o->cur.glow2.r = r;
o->cur.glow2.g = g;
o->cur.glow2.b = b;
o->cur.glow2.a = a;
o->changed = 1;
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
EOLIAN static void
_evas_text_outline_color_set(Eo *eo_obj, Evas_Text_Data *o, int r, int g, int b, int a)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((o->cur.outline.r == r) && (o->cur.outline.g == g) &&
(o->cur.outline.b == b) && (o->cur.outline.a == a))
return;
+ evas_object_async_block(obj);
o->cur.outline.r = r;
o->cur.outline.g = g;
o->cur.outline.b = b;
o->cur.outline.a = a;
o->changed = 1;
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
EOLIAN static void
_evas_text_filter_program_set(Eo *eo_obj, Evas_Text_Data *o, const char *arg)
{
- Evas_Object_Protected_Data *obj;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+
Evas_Filter_Program *pgm = NULL;
if (!o) return;
if (o->cur.filter->code == arg) return;
if (o->cur.filter->code && arg && !strcmp(arg, o->cur.filter->code)) return;
+ evas_object_async_block(obj);
EINA_COW_WRITE_BEGIN(evas_object_filter_cow, o->cur.filter, Evas_Object_Filter_Data, fcow)
{
// Parse filter program
EINA_COW_WRITE_END(evas_object_filter_cow, o->cur.filter, fcow);
// Update object
- obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
_evas_object_text_items_clear(o);
o->changed = 1;
_evas_object_text_recalc(eo_obj, o->cur.text);
EOLIAN static void
_evas_text_filter_source_set(Eo *eo_obj, Evas_Text_Data *o, const char *name, Evas_Object *eo_source)
{
- Evas_Object_Protected_Data *obj;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
Evas_Filter_Proxy_Binding *pb, *pb_old = NULL;
Evas_Object_Protected_Data *source = NULL;
Evas_Object_Filter_Data *fcow = NULL;
- obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if (eo_source) source = eo_data_scope_get(eo_source, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (!name)
{
if (!eo_source || !o->cur.filter->sources) return;
EINA_LIST_FOREACH(ts->objects, l, eo_obj)
{
Evas_Textblock_Data *o = eo_data_scope_get(eo_obj, MY_CLASS);
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
_evas_textblock_invalidate_all(o);
_evas_textblock_changed(o, eo_obj);
}
EOLIAN static void
_evas_textblock_style_set(Eo *eo_obj, Evas_Textblock_Data *o, const Evas_Textblock_Style *ts)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
_textblock_style_generic_set(eo_obj, (Evas_Textblock_Style *) ts, &(o->style));
}
EOLIAN static void
_evas_textblock_style_user_push(Eo *eo_obj, Evas_Textblock_Data *o, Evas_Textblock_Style *ts)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
_textblock_style_generic_set(eo_obj, ts, &(o->style_user));
}
EOLIAN static void
_evas_textblock_style_user_pop(Eo *eo_obj, Evas_Textblock_Data *o)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
_textblock_style_generic_set(eo_obj, NULL, &(o->style_user));
}
EOLIAN static void
_evas_textblock_replace_char_set(Eo *eo_obj, Evas_Textblock_Data *o, const char *ch)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (o->repch) eina_stringshare_del(o->repch);
if (ch) o->repch = eina_stringshare_add(ch);
else o->repch = NULL;
EOLIAN static void
_evas_textblock_legacy_newline_set(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o, Eina_Bool mode)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (o->legacy_newline == mode)
return;
EOLIAN static void
_evas_textblock_valign_set(Eo *eo_obj, Evas_Textblock_Data *o, double align)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (align < 0.0) align = 0.0;
else if (align > 1.0) align = 1.0;
if (o->valign == align) return;
EOLIAN static void
_evas_textblock_bidi_delimiters_set(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o, const char *delim)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
eina_stringshare_replace(&o->bidi_delimiters, delim);
}
EOLIAN static void
_evas_textblock_text_markup_set(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o, const char *text)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if ((text != o->markup_text) && (o->markup_text))
{
free(o->markup_text);
{
if (!cur) return;
Evas_Object *eo_obj = cur->obj;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_HEAD();
if (text)
{
Evas_Object_Textblock_Node_Text *n;
Eina_Strbuf *txt = NULL;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
const char *markup;
if (o->markup_text)
{
_evas_textblock_cursor_new(Eo *eo_obj, Evas_Textblock_Data *o)
{
Evas_Textblock_Cursor *cur;
- {
- cur = calloc(1, sizeof(Evas_Textblock_Cursor));
- (cur)->obj = (Evas_Object *) eo_obj;
- (cur)->node = o->text_nodes;
- (cur)->pos = 0;
- o->cursors = eina_list_append(o->cursors, cur);
- }
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
+ cur = calloc(1, sizeof(Evas_Textblock_Cursor));
+ if (!cur) return NULL;
+ cur->obj = (Evas_Object *) eo_obj;
+ cur->node = o->text_nodes;
+ cur->pos = 0;
+ o->cursors = eina_list_append(o->cursors, cur);
return cur;
}
evas_textblock_cursor_free(Evas_Textblock_Cursor *cur)
{
if (!cur) return;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
if (cur == o->cursor) return;
o->cursors = eina_list_remove(o->cursors, cur);
EAPI Eina_Bool
evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (!cur || !cur->node) return EINA_FALSE;
return (_evas_textblock_cursor_node_format_at_pos_get(cur)) ?
EINA_TRUE : EINA_FALSE;
}
EOLIAN static const Eina_List *
-_evas_textblock_node_format_list_get(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o, const char *anchor)
+_evas_textblock_node_format_list_get(Eo *eo_obj, Evas_Textblock_Data *o, const char *anchor)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (!strcmp(anchor, "a"))
return o->anchors_a;
else if (!strcmp(anchor, "item"))
}
EOLIAN static const Evas_Object_Textblock_Node_Format*
-_evas_textblock_node_format_first_get(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o)
+_evas_textblock_node_format_first_get(Eo *eo_obj, Evas_Textblock_Data *o)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
return o->format_nodes;
}
EOLIAN static const Evas_Object_Textblock_Node_Format*
-_evas_textblock_node_format_last_get(Eo *eo_obj EINA_UNUSED, Evas_Textblock_Data *o)
+_evas_textblock_node_format_last_get(Eo *eo_obj, Evas_Textblock_Data *o)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
return o->format_nodes ? _NODE_FORMAT(EINA_INLIST_GET(o->format_nodes)->last) : NULL;
}
fmt = n;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
do
{
const char *fstr = fmt->orig_format;
evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur)
{
if (!cur) return;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
cur->node = o->text_nodes;
cur->pos = 0;
Evas_Object_Textblock_Node_Text *node;
if (!cur) return;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
node = o->text_nodes;
if (node)
evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *cur)
{
if (!cur) return EINA_FALSE;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
/* If there is a current text node, return the next text node (if exists)
* otherwise, just return False. */
{
Evas_Object_Textblock_Node_Text *node;
if (!cur) return EINA_FALSE;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
/* If the current node is a text node, just get the prev if any,
* if it's a format, get the current text node out of the format and return
Evas_Object_Textblock_Node_Format *node;
if (!cur) return EINA_FALSE;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
/* If the current node is a format node, just get the next if any,
* if it's a text, get the current format node out of the text and return
{
const Evas_Object_Textblock_Node_Format *node;
if (!cur) return EINA_FALSE;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
node = evas_textblock_cursor_format_get(cur);
if (!node)
char *breaks;
if (!cur) return EINA_FALSE;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
size_t len = eina_ustrbuf_length_get(cur->node->unicode);
char *breaks;
if (!cur) return EINA_FALSE;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
size_t len = eina_ustrbuf_length_get(cur->node->unicode);
const Eina_Unicode *text;
if (!cur) return EINA_FALSE;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
ind = cur->pos;
evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur)
{
if (!cur) return EINA_FALSE;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
if (cur->pos != 0)
evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur)
{
if (!cur) return;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
cur->pos = 0;
}
int ind;
if (!cur) return;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_NULL_CHECK(cur->node);
ind = eina_ustrbuf_length_get(cur->node->unicode);
/* If it's not the last paragraph, go back one, because we want to point
Evas_Object_Textblock_Item *it = NULL;
if (!cur) return;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_NULL_CHECK(cur->node);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
Evas_Object_Textblock_Item *it = NULL;
if (!cur) return;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_NULL_CHECK(cur->node);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
size_t npos = 0;
if (!cur) return -1;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, 0);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
n = o->text_nodes;
size_t pos;
if (!cur) return;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
if (_pos < 0)
Evas_Object_Textblock_Item *it;
if (!cur) return EINA_FALSE;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
if (!cur1) return 0;
if (!cur2) return 0;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur1->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (cur1->obj != cur2->obj) return 0;
if ((!cur1->node) || (!cur2->node)) return 0;
if (cur1->node == cur2->node)
if (!cur) return;
if (!cur_dest) return;
if (cur->obj != cur_dest->obj) return;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
cur_dest->pos = cur->pos;
cur_dest->node = cur->node;
int len = 0;
if (!cur) return 0;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
text = eina_unicode_utf8_to_unicode(_text, &len);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
{
int len;
/*append is essentially prepend without advancing */
+ if (!cur) return 0;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
len = evas_textblock_cursor_text_append(cur, _text);
if (len == 0) return 0;
cur->pos += len; /*Advance */
Eina_Bool is_visible;
if (!cur) return EINA_FALSE;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if ((!format) || (format[0] == 0)) return EINA_FALSE;
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
/* We should always have at least one text node */
evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format)
{
Eina_Bool is_visible;
+
+ if (!cur) return EINA_FALSE;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
/* append is essentially prepend without advancing */
is_visible = evas_textblock_cursor_format_append(cur, format);
if (is_visible)
int chr, ind, ppos;
if (!cur || !cur->node) return;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
n = cur->node;
if (!cur1 || !cur1->node) return;
if (!cur2 || !cur2->node) return;
if (cur1->obj != cur2->obj) return;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur1->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur1->obj, MY_CLASS);
if (evas_textblock_cursor_compare(cur1, cur2) > 0)
{
evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur)
{
if (!cur || !cur->node) return NULL;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (evas_textblock_cursor_format_is_visible_get(cur))
{
Eina_Strbuf *buf;
if (!cur2 || !cur2->node) return NULL;
if (cur1->obj != cur2->obj) return NULL;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur1->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
eo_obj = cur1->obj;
TB_HEAD_RETURN(NULL);
EAPI char *
evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur1->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (format == EVAS_TEXTBLOCK_TEXT_MARKUP)
return _evas_textblock_cursor_range_text_markup_get(cur1, cur2);
else if (format == EVAS_TEXTBLOCK_TEXT_PLAIN)
{
Evas_Textblock_Cursor cur1, cur2;
if (!cur) return NULL;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, NULL);
if (cur->node->utf8)
{
{
int len;
if (!cur) return -1;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, -1);
len = eina_ustrbuf_length_get(cur->node->unicode);
evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur)
{
if (!cur) return NULL;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, NULL);
return _evas_textblock_cursor_node_format_at_pos_get(cur);
}
evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt)
{
if (!fmt || !cur) return;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
cur->node = fmt->text_node;
cur->pos = _evas_textblock_node_format_pos_get(fmt);
}
const Eina_Unicode *text;
if (!cur) return EINA_FALSE;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_NULL_CHECK(cur->node, EINA_FALSE);
if (!evas_textblock_cursor_is_format(cur)) return EINA_FALSE;
text = eina_ustrbuf_string_get(cur->node->unicode);
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)
{
if (!cur) return EINA_FALSE;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
_relayout_if_needed(cur->obj, o);
{
int ret = -1;
if (!cur) return -1;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
_relayout_if_needed(cur->obj, o);
{
if (!cur) return -1;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
return _evas_textblock_cursor_char_pen_geometry_common_get(
ENFN->font_char_coords_get, cur, cx, cy, cw, ch);
}
{
if (!cur) return -1;
Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
return _evas_textblock_cursor_char_pen_geometry_common_get(
ENFN->font_pen_coords_get, cur, cx, cy, cw, ch);
}
int x, y, w, h;
if (!cur) return -1;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
_relayout_if_needed(cur->obj, o);
Evas_Coord cy, ch;
Evas_Object *eo_obj = start->obj;
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
TB_HEAD_RETURN(EINA_FALSE);
eo_e = evas_object_evas_get(eo_obj);
Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
Evas_Object_Textblock_Item *it = NULL;
if (!cur) return EINA_FALSE;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
_relayout_if_needed(cur->obj, o);
Evas_Object_Textblock_Line *ln;
if (!cur) return -1;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
_relayout_if_needed(cur->obj, o);
if (!cur1 || !cur1->node) return NULL;
if (!cur2 || !cur2->node) return NULL;
if (cur1->obj != cur2->obj) return NULL;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur1->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur1->obj, MY_CLASS);
_relayout_if_needed(cur1->obj, o);
if (!cur1 || !cur1->node) return NULL;
if (!cur2 || !cur2->node) return NULL;
if (cur1->obj != cur2->obj) return NULL;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur1->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur1->obj, MY_CLASS);
_relayout_if_needed(cur1->obj, o);
Evas_Coord x, y, w, h;
if (!cur || !evas_textblock_cursor_format_is_visible_get(cur)) return EINA_FALSE;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
Evas_Textblock_Data *o = eo_data_scope_get(cur->obj, MY_CLASS);
_relayout_if_needed(cur->obj, o);
Eina_Bool ret = EINA_FALSE;
Evas_Textblock_Cursor cur2;
if (!cur) return EINA_FALSE;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
cur2.obj = cur->obj;
evas_textblock_cursor_copy(cur, &cur2);
Evas_Object_Textblock_Line *ln;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
_relayout_if_needed(eo_obj, o);
ln = _find_layout_line_num(eo_obj, line);
Eina_List *l;
Evas_Textblock_Cursor *cur;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (o->paragraphs)
{
_paragraphs_free(eo_obj, o->paragraphs);
EOLIAN static void
_evas_textblock_size_formatted_get(Eo *eo_obj, Evas_Textblock_Data *o, Evas_Coord *w, Evas_Coord *h)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
_relayout_if_needed(eo_obj, o);
if (w) *w = o->formatted.w;
EOLIAN static void
_evas_textblock_size_native_get(Eo *eo_obj, Evas_Textblock_Data *o, Evas_Coord *w, Evas_Coord *h)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if (!o->native.valid)
{
Evas_Coord wmax = 0, hmax = 0;
EOLIAN static void
_evas_textblock_style_insets_get(Eo *eo_obj, Evas_Textblock_Data *o, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
_relayout_if_needed(eo_obj, o);
if (l) *l = o->style_pad.l;
_evas_textgrid_size_set(Eo *eo_obj, Evas_Textgrid_Data *o, int w, int h)
{
int i;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((h <= 0) || (w <= 0)) return;
if ((o->cur.w == w) && (o->cur.h == h)) return;
+ evas_object_async_block(obj);
evas_object_textgrid_rows_clear(eo_obj);
if (o->cur.rows)
{
o->cur.h = h;
o->changed = 1;
o->core_change = 1;
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
EOLIAN static void
_evas_textgrid_efl_text_properties_font_source_set(Eo *eo_obj, Evas_Textgrid_Data *o, const char *font_source)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
if ((!font_source) || (!*font_source))
return;
if ((o->cur.font_source) && (font_source) &&
(!strcmp(o->cur.font_source, font_source))) return;
+ evas_object_async_block(obj);
eina_stringshare_replace(&o->cur.font_source, font_source);
o->changed = 1;
o->core_change = 1;
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
if ((!font_name) || (!*font_name) || (font_size <= 0))
return;
+ evas_object_async_block(obj);
font_description = evas_font_desc_new();
evas_font_name_parse(font_description, font_name);
if (o->cur.font_description &&
Eina_Array *palette;
Evas_Object_Textgrid_Color *color, *c;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
int count, i;
if ((idx < 0) || (idx > 255)) return;
ERR("Evas only handles pre multiplied colors!");
}
+ evas_object_async_block(obj);
switch (pal)
{
case EVAS_TEXTGRID_PALETTE_STANDARD:
o->changed = 1;
o->pal_change = 1;
evas_object_textgrid_rows_clear(eo_obj);
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
_evas_textgrid_cellrow_get(Eo *eo_obj EINA_UNUSED, Evas_Textgrid_Data *o, int y)
{
Evas_Textgrid_Cell *ret;
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ evas_object_async_block(obj);
if ((y < 0) || (y >= o->cur.h)) ret = NULL;
ret = o->cur.cells + (y * o->cur.w);
EOLIAN static void
_evas_textgrid_update_add(Eo *eo_obj, Evas_Textgrid_Data *o, int x, int y, int w, int h)
{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
int i, x2;
RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, o->cur.w, o->cur.h);
if ((w <= 0) || (h <= 0)) return;
+ evas_object_async_block(obj);
x2 = x + w - 1;
for (i = 0; i < h; i++)
{
}
o->row_change = 1;
o->changed = 1;
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_change(eo_obj, obj);
}
eo_do(eo_obj, eo_parent = eo_parent_get());
e = eo_data_scope_get(eo_parent, EVAS_CANVAS_CLASS);
+ evas_canvas_async_block(e);
eo_do_super(eo_obj, MY_CLASS, eo_constructor());
eo_do(eo_obj, eo_parent = eo_parent_get());
e = eo_data_scope_get(eo_parent, EVAS_CANVAS_CLASS);
- if (!e) return ;
+ evas_canvas_async_block(e);
+ if (!e) return;
// XXX: need to free output and context one they get allocated one day
// e->engine.func->context_free(eo_dat->output, eo_dat->context);
// e->engine.func->output_free(eo_dat->output);
}
EOLIAN static void
-_evas_out_view_set(Eo *eo_e EINA_UNUSED, Evas_Out_Data *eo_dat, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
+_evas_out_view_set(Eo *eo_e, Evas_Out_Data *eo_dat, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
{
+ Eo *eo_parent = NULL;
+ Evas_Public_Data *e;
+ eo_do(eo_e, eo_parent = eo_parent_get());
+ e = eo_data_scope_get(eo_parent, EVAS_CANVAS_CLASS);
+ evas_canvas_async_block(e);
eo_dat->x = x;
eo_dat->y = y;
eo_dat->w = w;
}
EOLIAN static Eina_Bool
-_evas_out_engine_info_set(Eo *eo_e EINA_UNUSED, Evas_Out_Data *eo_dat, Evas_Engine_Info *info)
+_evas_out_engine_info_set(Eo *eo_e, Evas_Out_Data *eo_dat, Evas_Engine_Info *info)
{
+ Eo *eo_parent = NULL;
+ Evas_Public_Data *e;
+ eo_do(eo_e, eo_parent = eo_parent_get());
+ e = eo_data_scope_get(eo_parent, EVAS_CANVAS_CLASS);
+ evas_canvas_async_block(e);
if (eo_dat->info != info) return EINA_FALSE;
// XXX: handle setting of engine info here
{
Eina_Rectangle *r;
+ evas_canvas_async_block(e);
NEW_RECT(r, x, y, w, h);
if (!r) return;
e->damages = eina_list_append(e->damages, r);
{
Eina_Rectangle *r;
+ evas_canvas_async_block(e);
NEW_RECT(r, x, y, w, h);
if (!r) return;
e->obscures = eina_list_append(e->obscures, r);
{
Eina_Rectangle *r;
+ evas_canvas_async_block(e);
EINA_LIST_FREE(e->obscures, r)
{
eina_rectangle_free(r);
{
static int render_2 = -1;
+ evas_canvas_async_block(e);
if (render_2 == -1)
{
if (getenv("EVAS_RENDER2")) render_2 = 1;
return ret;
}
+
EOLIAN Eina_List*
_evas_canvas_render_updates(Eo *eo_e, Evas_Public_Data *e)
{
if (!e->changed) return NULL;
+ evas_canvas_async_block(e);
return evas_render_updates_internal_wait(eo_e, 1, 1);
}
_evas_canvas_render(Eo *eo_e, Evas_Public_Data *e)
{
if (!e->changed) return;
+ evas_canvas_async_block(e);
evas_render_updates_internal_wait(eo_e, 0, 1);
}
EOLIAN void
-_evas_canvas_norender(Eo *eo_e, Evas_Public_Data *_pd EINA_UNUSED)
+_evas_canvas_norender(Eo *eo_e, Evas_Public_Data *e)
{
+ evas_canvas_async_block(e);
// if (!e->changed) return;
evas_render_updates_internal_wait(eo_e, 0, 0);
}
{
static int render_2 = -1;
+ evas_canvas_async_block(e);
if (render_2 == -1)
{
if (getenv("EVAS_RENDER2")) render_2 = 1;
{
static int render_2 = -1;
+ evas_canvas_async_block(e);
if (render_2 == -1)
{
if (getenv("EVAS_RENDER2")) render_2 = 1;
{
static int render_2 = -1;
+ evas_canvas_async_block(e);
if (render_2 == -1)
{
if (getenv("EVAS_RENDER2")) render_2 = 1;
EOLIAN void
_evas_object_raise(Eo *eo_obj, Evas_Object_Protected_Data *obj)
{
+ evas_object_async_block(obj);
if (evas_object_intercept_call_raise(eo_obj, obj)) return;
if (!((EINA_INLIST_GET(obj))->next))
EOLIAN void
_evas_object_lower(Eo *eo_obj, Evas_Object_Protected_Data *obj)
{
+ evas_object_async_block(obj);
if (evas_object_intercept_call_lower(eo_obj, obj)) return;
if (!((EINA_INLIST_GET(obj))->prev))
EOLIAN void
_evas_object_stack_above(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object *eo_above)
{
+ evas_object_async_block(obj);
if (!eo_above)
{
evas_object_raise(eo_obj);
EOLIAN void
_evas_object_stack_below(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object *eo_below)
{
+ evas_object_async_block(obj);
if (!eo_below)
{
evas_object_lower(eo_obj);
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
}
+static inline void
+evas_object_async_block(Evas_Object_Protected_Data *obj)
+{
+ if ((obj) && (obj->layer))
+ {
+ eina_lock_take(&(obj->layer->evas->lock_objects));
+ eina_lock_release(&(obj->layer->evas->lock_objects));
+ }
+}
+
+static inline void
+evas_canvas_async_block(Evas_Public_Data *e)
+{
+ if (e)
+ {
+ eina_lock_take(&(e->lock_objects));
+ eina_lock_release(&(e->lock_objects));
+ }
+}
+
#endif
Eina_Hash *name_hash;
+ // locking so we can implement async rendering threads
+ Eina_Lock lock_objects;
+
int output_validity;
int walking_list;