From 849b37d64128e9737721f4f1e9bc87dc5debd09b Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Fri, 20 Mar 2020 09:00:24 +0000 Subject: [PATCH] canvas3d: remove all feature implementation in edje/edje_cc Reviewed-by: Marcel Hollerbach Reviewed-by: Shinwoo Kim Differential Revision: https://phab.enlightenment.org/D11547 --- src/bin/edje/edje_cc.c | 8 - src/bin/edje/edje_cc.h | 6 - src/bin/edje/edje_cc_handlers.c | 1710 +--------------------- src/bin/edje/edje_cc_out.c | 239 --- src/lib/edje/Edje_Common.h | 10 +- src/lib/edje/Edje_Legacy.h | 9 - src/lib/edje/edje_private.h | 168 --- src/lib/edje/efl_canvas_layout_types.eot | 3 - 8 files changed, 6 insertions(+), 2147 deletions(-) diff --git a/src/bin/edje/edje_cc.c b/src/bin/edje/edje_cc.c index 1963dae341..07c616fc8f 100644 --- a/src/bin/edje/edje_cc.c +++ b/src/bin/edje/edje_cc.c @@ -25,7 +25,6 @@ Eina_List *snd_dirs = NULL; Eina_List *mo_dirs = NULL; Eina_List *vibration_dirs = NULL; Eina_List *img_dirs = NULL; -Eina_List *model_dirs = NULL; Eina_List *fnt_dirs = NULL; Eina_List *data_dirs = NULL; Eina_List *defines = NULL; @@ -174,8 +173,6 @@ main(int argc, char **argv) img_dirs = eina_list_append(img_dirs, "."); - model_dirs = eina_list_append(model_dirs, "."); - /* add defines to epp so edc files can detect edje_cc version */ defines = eina_list_append(defines, mem_strdup("-DEDJE_VERSION_12=12")); @@ -224,11 +221,6 @@ main(int argc, char **argv) i++; img_dirs = eina_list_append(img_dirs, argv[i]); } - else if ((!strcmp(argv[i], "-mod") || !strcmp(argv[i], "--model_dir")) && (i < (argc - 1))) - { - i++; - model_dirs = eina_list_append(model_dirs, argv[i]); - } else if ((!strcmp(argv[i], "-fd") || !strcmp(argv[i], "--font_dir")) && (i < (argc - 1))) { i++; diff --git a/src/bin/edje/edje_cc.h b/src/bin/edje/edje_cc.h index afb7a99c03..580c44fe6d 100644 --- a/src/bin/edje/edje_cc.h +++ b/src/bin/edje/edje_cc.h @@ -230,13 +230,8 @@ void copied_program_anonymous_lookup_delete(Edje_Part_Collection *pc, int *de void data_queue_anonymous_lookup(Edje_Part_Collection *pc, Edje_Program *ep, int *dest); void data_queue_copied_anonymous_lookup(Edje_Part_Collection *pc, int *src, int *dest); void data_queue_image_lookup(char *name, int *dest, Eina_Bool *set); -void data_queue_model_lookup(char *name, int *dest, Eina_Bool *set); void data_queue_copied_image_lookup(int *src, int *dest, Eina_Bool *set); void data_queue_image_remove(int *dest, Eina_Bool *set); -void data_queue_copied_model_lookup(int *src, int *dest, Eina_Bool *set); -void data_queue_model_remove(int *dest, Eina_Bool *set); -void data_queue_spectrum_lookup(char *name, int *dest); -void data_queue_spectrum_slave_lookup(int *master, int *slave); void data_process_lookups(void); void data_process_scripts(void); void data_process_script_lookups(void); @@ -308,7 +303,6 @@ void script_rewrite(Code *code); /* global vars */ extern Eina_List *ext_dirs; extern Eina_List *img_dirs; -extern Eina_List *model_dirs; extern Eina_List *fnt_dirs; extern Eina_List *snd_dirs; extern Eina_List *mo_dirs; diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index 913a749d54..8a1f36b47c 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -220,8 +220,6 @@ static void st_images_set_image_size(void); static void st_images_set_image_border(void); static void st_images_set_image_border_scale_by(void); -static void st_models_model(void); - static void st_fonts_font(void); static void st_data_item(void); @@ -437,34 +435,7 @@ static void st_collections_group_parts_part_description_table_padding(void static void st_collections_group_parts_part_description_table_min(void); static void st_collections_group_parts_part_description_proxy_source_visible(void); static void st_collections_group_parts_part_description_proxy_source_clip(void); -static void st_collections_group_parts_part_description_position_point(void); -static void st_collections_group_parts_part_description_position_space(void); -static void st_collections_group_parts_part_description_camera_properties(void); -static void st_collections_group_parts_part_description_properties_ambient(void); -static void st_collections_group_parts_part_description_properties_diffuse(void); -static void st_collections_group_parts_part_description_properties_specular(void); -static void st_collections_group_parts_part_description_properties_material(void); -static void st_collections_group_parts_part_description_properties_normal(void); -static void st_collections_group_parts_part_description_properties_shininess(void); -static void st_collections_group_parts_part_description_properties_shade(void); -static void st_collections_group_parts_part_description_orientation_angle_axis(void); -static void st_collections_group_parts_part_description_orientation_look1(void); -static void st_collections_group_parts_part_description_orientation_look2(void); -static void st_collections_group_parts_part_description_orientation_look_to(void); -static void st_collections_group_parts_part_description_orientation_angle_axis(void); -static void st_collections_group_parts_part_description_orientation_quaternion(void); -static void st_collections_group_parts_part_description_scale(void); static void st_collections_group_parts_part_description_offset_scale(void); -static void st_collections_group_parts_part_description_mesh_primitive(void); -static void ob_collections_group_parts_part_description_texture(void); -static void st_collections_group_parts_part_description_texture_image(void); -static void st_collections_group_parts_part_description_texture_wrap1(void); -static void st_collections_group_parts_part_description_texture_wrap2(void); -static void st_collections_group_parts_part_description_texture_filter1(void); -static void st_collections_group_parts_part_description_texture_filter2(void); -static void st_collections_group_parts_part_description_mesh_assembly(void); -static void st_collections_group_parts_part_description_mesh_geometry(void); -static void st_collections_group_parts_part_description_mesh_frame(void); static void st_collections_group_parts_part_description_filter_code(void); static void st_collections_group_parts_part_description_filter_source(void); static void st_collections_group_parts_part_description_filter_data(void); @@ -644,70 +615,6 @@ static void _handle_vector_image(void); PROGRAM_BASE(PREFIX) \ PROGRAM_BASE(PREFIX ".programs") -#define SET_LOOK1(Type, type_node) \ - Edje_Part_Description_##Type * ed; \ - ed = (Edje_Part_Description_##Type *)current_desc; \ - \ - if (ed->type_node.orientation.type <= EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_LOOK_AT) \ - { \ - ed->type_node.orientation.data[0] = FROM_DOUBLE(parse_float(0)); \ - ed->type_node.orientation.data[1] = FROM_DOUBLE(parse_float(1)); \ - ed->type_node.orientation.data[2] = FROM_DOUBLE(parse_float(2)); \ - ed->type_node.orientation.type = EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_LOOK_AT; \ - } - -#define SET_LOOK2(Type, type_node) \ - Edje_Part_Description_##Type * ed; \ - ed = (Edje_Part_Description_##Type *)current_desc; \ - \ - if (ed->type_node.orientation.type <= EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_LOOK_AT) \ - { \ - ed->type_node.orientation.data[3] = FROM_DOUBLE(parse_float(0)); \ - ed->type_node.orientation.data[4] = FROM_DOUBLE(parse_float(1)); \ - ed->type_node.orientation.data[5] = FROM_DOUBLE(parse_float(2)); \ - ed->type_node.orientation.type = EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_LOOK_AT; \ - } - -#define SET_LOOK_TO(list, Type, type_node) \ - Edje_Part_Description_##Type * ed; \ - char *name; \ - \ - ed = (Edje_Part_Description_##Type *)current_desc; \ - \ - if (ed->type_node.orientation.type <= EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_LOOK_TO) \ - { \ - name = parse_str(0); \ - data_queue_part_lookup(list, name, &(ed->type_node.orientation.look_to)); \ - free(name); \ - ed->type_node.orientation.type = EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_LOOK_TO; \ - } - -#define SET_ANGLE_AXIS(Type, type_node) \ - Edje_Part_Description_##Type * ed; \ - ed = (Edje_Part_Description_##Type *)current_desc; \ - \ - if (ed->type_node.orientation.type <= EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_ANGLE_AXIS) \ - { \ - ed->type_node.orientation.data[0] = FROM_DOUBLE(parse_float(0)); \ - ed->type_node.orientation.data[1] = FROM_DOUBLE(parse_float(1)); \ - ed->type_node.orientation.data[2] = FROM_DOUBLE(parse_float(2)); \ - ed->type_node.orientation.data[3] = FROM_DOUBLE(parse_float(3)); \ - ed->type_node.orientation.type = EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_ANGLE_AXIS; \ - } - -#define SET_QUATERNION(Type, type_node) \ - Edje_Part_Description_##Type * ed; \ - ed = (Edje_Part_Description_##Type *)current_desc; \ - \ - if (ed->type_node.orientation.type <= EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_QUATERNION) \ - { \ - ed->type_node.orientation.data[1] = FROM_DOUBLE(parse_float(0)); \ - ed->type_node.orientation.data[2] = FROM_DOUBLE(parse_float(1)); \ - ed->type_node.orientation.data[3] = FROM_DOUBLE(parse_float(2)); \ - ed->type_node.orientation.data[0] = FROM_DOUBLE(parse_float(3)); \ - ed->type_node.orientation.type = EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_QUATERNION; \ - } - #define FILTERS_STATEMENTS(PREFIX) \ {PREFIX "filters.filter.file", st_filters_filter_file}, \ {PREFIX "filters.filter.name", st_filters_filter_name}, @@ -785,9 +692,6 @@ New_Statement_Handler statement_handlers[] = {"collections.group.programs.target_group", st_collections_group_target_group}, /* dup */ IMAGE_SET_STATEMENTS("collections.group") IMAGE_STATEMENTS("collections.group.") - { - "collections.group.models.model", st_models_model - }, {"collections.group.font", st_fonts_font}, /* dup */ FONT_STYLE_CC_STATEMENTS("collections.group.") TEXT_CLASS_STATEMENTS("collections.group.") @@ -979,31 +883,6 @@ New_Statement_Handler statement_handlers[] = {"collections.group.parts.part.description.table.min", st_collections_group_parts_part_description_table_min}, {"collections.group.parts.part.description.proxy.source_visible", st_collections_group_parts_part_description_proxy_source_visible}, {"collections.group.parts.part.description.proxy.source_clip", st_collections_group_parts_part_description_proxy_source_clip}, - {"collections.group.parts.part.description.position.point", st_collections_group_parts_part_description_position_point}, - {"collections.group.parts.part.description.position.space", st_collections_group_parts_part_description_position_space}, - {"collections.group.parts.part.description.properties.perspective", st_collections_group_parts_part_description_camera_properties}, - {"collections.group.parts.part.description.properties.ambient", st_collections_group_parts_part_description_properties_ambient}, - {"collections.group.parts.part.description.properties.diffuse", st_collections_group_parts_part_description_properties_diffuse}, - {"collections.group.parts.part.description.properties.specular", st_collections_group_parts_part_description_properties_specular}, - {"collections.group.parts.part.description.properties.material", st_collections_group_parts_part_description_properties_material}, - {"collections.group.parts.part.description.properties.normal", st_collections_group_parts_part_description_properties_normal}, - {"collections.group.parts.part.description.properties.shininess", st_collections_group_parts_part_description_properties_shininess}, - {"collections.group.parts.part.description.properties.shade", st_collections_group_parts_part_description_properties_shade}, - {"collections.group.parts.part.description.mesh.primitive", st_collections_group_parts_part_description_mesh_primitive}, - {"collections.group.parts.part.description.orientation.look1", st_collections_group_parts_part_description_orientation_look1}, - {"collections.group.parts.part.description.orientation.look2", st_collections_group_parts_part_description_orientation_look2}, - {"collections.group.parts.part.description.orientation.look_to", st_collections_group_parts_part_description_orientation_look_to}, - {"collections.group.parts.part.description.orientation.angle_axis", st_collections_group_parts_part_description_orientation_angle_axis}, - {"collections.group.parts.part.description.orientation.quaternion", st_collections_group_parts_part_description_orientation_quaternion}, - {"collections.group.parts.part.description.scale", st_collections_group_parts_part_description_scale}, - {"collections.group.parts.part.description.texture.image", st_collections_group_parts_part_description_texture_image}, - {"collections.group.parts.part.description.texture.wrap1", st_collections_group_parts_part_description_texture_wrap1}, - {"collections.group.parts.part.description.texture.wrap2", st_collections_group_parts_part_description_texture_wrap2}, - {"collections.group.parts.part.description.texture.filter1", st_collections_group_parts_part_description_texture_filter1}, - {"collections.group.parts.part.description.texture.filter2", st_collections_group_parts_part_description_texture_filter2}, - {"collections.group.parts.part.description.mesh.assembly", st_collections_group_parts_part_description_mesh_assembly}, - {"collections.group.parts.part.description.mesh.geometry", st_collections_group_parts_part_description_mesh_geometry}, - {"collections.group.parts.part.description.mesh.frame", st_collections_group_parts_part_description_mesh_frame}, {"collections.group.parts.part.description.filter.code", st_collections_group_parts_part_description_filter_code}, {"collections.group.parts.part.description.filter.source", st_collections_group_parts_part_description_filter_source}, {"collections.group.parts.part.description.filter.data", st_collections_group_parts_part_description_filter_data}, @@ -1499,7 +1378,6 @@ New_Object_Handler object_handlers[] = {"collections.group.set", ob_images_set}, /* dup */ {"collections.group.set.image", ob_images_set_image}, /* dup */ {"collections.group.images", NULL}, /* dup */ - {"collections.group.models", NULL}, /* dup */ {"collections.group.images.set", ob_images_set}, /* dup */ {"collections.group.images.set.image", ob_images_set_image}, /* dup */ {"collections.group.fonts", NULL}, /* dup */ @@ -1576,11 +1454,6 @@ New_Object_Handler object_handlers[] = {"collections.group.parts.part.description.styles.style", ob_styles_style}, /* dup */ {"collections.group.parts.part.description.box", NULL}, {"collections.group.parts.part.description.table", NULL}, - {"collections.group.parts.part.description.position", NULL}, - {"collections.group.parts.part.description.properties", NULL}, - {"collections.group.parts.part.description.orientation", NULL}, - {"collections.group.parts.part.description.texture", ob_collections_group_parts_part_description_texture}, - {"collections.group.parts.part.description.mesh", NULL}, {"collections.group.parts.part.description.filter", NULL}, {"collections.group.parts.part.description.proxy", NULL}, #ifdef HAVE_EPHYSICS @@ -1893,160 +1766,6 @@ _edje_part_description_alloc(unsigned char type, const char *collection, const c break; } - case EDJE_PART_TYPE_MESH_NODE: - { - Edje_Part_Description_Mesh_Node *ed; - - ed = mem_alloc(SZ(Edje_Part_Description_Mesh_Node)); - - ed->mesh_node.mesh.id = -1; - ed->mesh_node.mesh.primitive = 0; - ed->mesh_node.mesh.assembly = 1; - ed->mesh_node.mesh.frame = 0; - - ed->mesh_node.texture.id = -1; - ed->mesh_node.texture.wrap1 = 0; - ed->mesh_node.texture.wrap2 = 0; - ed->mesh_node.texture.filter1 = 0; - ed->mesh_node.texture.filter2 = 0; - - ed->mesh_node.properties.shade = EVAS_CANVAS3D_SHADER_MODE_VERTEX_COLOR; - ed->mesh_node.properties.ambient.r = 50; - ed->mesh_node.properties.ambient.g = 50; - ed->mesh_node.properties.ambient.b = 50; - ed->mesh_node.properties.ambient.a = 255; - ed->mesh_node.properties.diffuse.r = 255; - ed->mesh_node.properties.diffuse.g = 255; - ed->mesh_node.properties.diffuse.b = 255; - ed->mesh_node.properties.diffuse.a = 255; - ed->mesh_node.properties.specular.r = 255; - ed->mesh_node.properties.specular.g = 255; - ed->mesh_node.properties.specular.b = 255; - ed->mesh_node.properties.specular.a = 255; - - ed->mesh_node.properties.material_attrib = 1; - ed->mesh_node.properties.normal = 1; - ed->mesh_node.properties.shininess = 50; - - ed->mesh_node.aabb1.relative.x = -1.0; - ed->mesh_node.aabb1.relative.y = -1.0; - ed->mesh_node.aabb1.relative.z = -1.0; - ed->mesh_node.aabb1.offset.x = 0; - ed->mesh_node.aabb1.offset.y = 0; - ed->mesh_node.aabb1.offset.z = 0; - ed->mesh_node.aabb1.rel_to = -1; - ed->mesh_node.aabb2.relative.x = 1.0; - ed->mesh_node.aabb2.relative.y = 1.0; - ed->mesh_node.aabb2.relative.z = 1.0; - ed->mesh_node.aabb2.offset.x = 0; - ed->mesh_node.aabb2.offset.y = 0; - ed->mesh_node.aabb2.offset.z = 0; - ed->mesh_node.aabb2.rel_to = -1; - - ed->mesh_node.orientation.type = EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE; - /* x1 is angle for angle_axis and cosine of half angle for quternion, - x2, x3, x4 define axis for angle_axis and quaternion, - x1, x2, x3 are coordinates of point to look at for look_at, - x4, x5, x6 define a vector that indicates the angle at which - the subject is looking at the target for look_at and look_to */ - ed->mesh_node.orientation.data[0] = 1.0; - ed->mesh_node.orientation.data[1] = 0.0; - ed->mesh_node.orientation.data[2] = 0.0; - ed->mesh_node.orientation.data[3] = 0.0; - ed->mesh_node.orientation.data[4] = 1.0; - ed->mesh_node.orientation.data[5] = 0.0; - ed->mesh_node.orientation.look_to = -1; - - ed->mesh_node.scale_3d.x = 1.0; - ed->mesh_node.scale_3d.y = 1.0; - ed->mesh_node.scale_3d.z = 1.0; - - ed->mesh_node.position.point.x = 0.0; - ed->mesh_node.position.point.y = 0.0; - ed->mesh_node.position.point.z = 0.0; - ed->mesh_node.position.space = EVAS_CANVAS3D_SPACE_PARENT; - - result = &ed->common; - break; - } - - case EDJE_PART_TYPE_LIGHT: - { - Edje_Part_Description_Light *ed; - - ed = mem_alloc(SZ(Edje_Part_Description_Light)); - - ed->light.properties.ambient.r = 50; - ed->light.properties.ambient.g = 50; - ed->light.properties.ambient.b = 50; - ed->light.properties.ambient.a = 255; - ed->light.properties.diffuse.r = 255; - ed->light.properties.diffuse.g = 255; - ed->light.properties.diffuse.b = 255; - ed->light.properties.diffuse.a = 255; - ed->light.properties.specular.r = 255; - ed->light.properties.specular.g = 255; - ed->light.properties.specular.b = 255; - ed->light.properties.specular.a = 255; - - ed->light.position.point.x = 0.0; - ed->light.position.point.y = 0.0; - ed->light.position.point.z = 1.0; - ed->light.position.space = EVAS_CANVAS3D_SPACE_PARENT; - - ed->light.orientation.type = EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE; - /* x1 is angle for angle_axis and cosine of half angle for quternion, - x2, x3, x4 define axis for angle_axis and quaternion, - x1, x2, x3 are coordinates of point to look at for look_at, - x4, x5, x6 define a vector that indicates the angle at which - the subject is looking at the target for look_at and look_to */ - ed->light.orientation.data[0] = 1.0; - ed->light.orientation.data[1] = 0.0; - ed->light.orientation.data[2] = 0.0; - ed->light.orientation.data[3] = 0.0; - ed->light.orientation.data[4] = 1.0; - ed->light.orientation.data[5] = 0.0; - ed->light.orientation.look_to = -1; - - result = &ed->common; - break; - } - - case EDJE_PART_TYPE_CAMERA: - { - Edje_Part_Description_Camera *ed; - - ed = mem_alloc(SZ(Edje_Part_Description_Camera)); - - ed->camera.camera.fovy = 60.0; - ed->camera.camera.aspect = 1.0; - ed->camera.camera.frustum_near = 2.0; - ed->camera.camera.frustum_far = 50.0; - - ed->camera.position.point.x = 0.0; - ed->camera.position.point.y = 0.0; - ed->camera.position.point.z = 5.0; - - ed->camera.position.space = EVAS_CANVAS3D_SPACE_PARENT; - - ed->camera.orientation.type = EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE; - /* x1 is angle for angle_axis and cosine of half angle for quternion, - x2, x3, x4 define axis for angle_axis and quaternion, - x1, x2, x3 are coordinates of point to look at for look_at, - x4, x5, x6 define a vector that indicates the angle at which - the subject is looking at the target for look_at and look_to */ - ed->camera.orientation.data[0] = 1.0; - ed->camera.orientation.data[1] = 0.0; - ed->camera.orientation.data[2] = 0.0; - ed->camera.orientation.data[3] = 0.0; - ed->camera.orientation.data[4] = 1.0; - ed->camera.orientation.data[5] = 0.0; - ed->camera.orientation.look_to = -1; - - result = &ed->common; - break; - } - case EDJE_PART_TYPE_VECTOR: { Edje_Part_Description_Vector *ed; @@ -2637,74 +2356,6 @@ st_images_vector(void) } } -/** - @edcsubsection{toplevel_models,model} - */ - -/** - @page edcref - - @block - models - @context - models { - model: "filename1.ext"; - model: "filename2.ext"; - model: "filename2.ext" 50; - .. - } - @description - The "models" block is used to list each model file that will be used in - the theme. - @endblock - - @property - model - @parameters - [model file] - @effect - Used to include each model file. - @endproperty - */ -static void -st_models_model(void) -{ - Edje_Model_Directory_Entry *mdl; - const char *tmp; - unsigned int i; - - check_min_arg_count(1); - - if (!edje_file->model_dir) - edje_file->model_dir = mem_alloc(SZ(Edje_Model_Directory)); - - tmp = parse_str(0); - - for (i = 0; i < edje_file->model_dir->entries_count; ++i) - if (!strcmp(edje_file->model_dir->entries[i].entry, tmp)) - { - free((char *)tmp); - return; - } - - edje_file->model_dir->entries_count++; - mdl = realloc(edje_file->model_dir->entries, - sizeof (Edje_Model_Directory_Entry) * edje_file->model_dir->entries_count); - if (!mdl) - { - ERR("No enough memory."); - exit(-1); - } - edje_file->model_dir->entries = mdl; - memset(edje_file->model_dir->entries + edje_file->model_dir->entries_count - 1, - 0, sizeof (Edje_Model_Directory_Entry)); - - mdl = edje_file->model_dir->entries + edje_file->model_dir->entries_count - 1; - - mdl->entry = tmp; - mdl->id = edje_file->model_dir->entries_count - 1; -} - /** @edcsubsection{toplevel_images_set, * Images.Set} */ @@ -8645,9 +8296,6 @@ ob_collections_group_parts_part_description(void) ed->minmul.have = 1; ed->minmul.w = FROM_DOUBLE(1.0); ed->minmul.h = FROM_DOUBLE(1.0); - ed->align_3d.x = FROM_DOUBLE(0.5); - ed->align_3d.y = FROM_DOUBLE(0.5); - ed->align_3d.z = FROM_DOUBLE(0.5); } static void @@ -8929,48 +8577,6 @@ st_collections_group_parts_part_description_inherit(void) break; } - case EDJE_PART_TYPE_CAMERA: - { - Edje_Part_Description_Camera *ced = (Edje_Part_Description_Camera *)ed; - Edje_Part_Description_Camera *cparent = (Edje_Part_Description_Camera *)parent; - - ced->camera = cparent->camera; - - data_queue_copied_part_lookup(pc, &(cparent->camera.orientation.look_to), &(ced->camera.orientation.look_to)); - - break; - } - - case EDJE_PART_TYPE_LIGHT: - { - Edje_Part_Description_Light *led = (Edje_Part_Description_Light *)ed; - Edje_Part_Description_Light *lparent = (Edje_Part_Description_Light *)parent; - - led->light = lparent->light; - - data_queue_copied_part_lookup(pc, &(lparent->light.orientation.look_to), &(led->light.orientation.look_to)); - - break; - } - - case EDJE_PART_TYPE_MESH_NODE: - { - Edje_Part_Description_Mesh_Node *med = (Edje_Part_Description_Mesh_Node *)ed; - Edje_Part_Description_Mesh_Node *mparent = (Edje_Part_Description_Mesh_Node *)parent; - - med->mesh_node = mparent->mesh_node; - - data_queue_model_remove(&med->mesh_node.mesh.id, &med->mesh_node.mesh.set); - data_queue_copied_model_lookup(&mparent->mesh_node.mesh.id, &med->mesh_node.mesh.id, &med->mesh_node.mesh.set); - - data_queue_image_remove(&med->mesh_node.texture.id, &med->mesh_node.texture.set); - data_queue_copied_model_lookup(&mparent->mesh_node.texture.id, &med->mesh_node.texture.id, &med->mesh_node.texture.set); - - data_queue_copied_part_lookup(pc, &(mparent->mesh_node.orientation.look_to), &(med->mesh_node.orientation.look_to)); - - break; - } - case EDJE_PART_TYPE_VECTOR: { Edje_Part_Description_Vector *ied = (Edje_Part_Description_Vector *)ed; @@ -9257,7 +8863,7 @@ st_collections_group_parts_part_description_limit(void) @property align @parameters - [X axis] [Y axis] ([Z axis]) + [X axis] [Y axis] @effect When the displayed object's size is smaller (or bigger) than its container, this property moves it relatively along both @@ -9265,27 +8871,18 @@ st_collections_group_parts_part_description_limit(void) the object touching container's respective ones, while @c "1.0" stands for right/bottom edges of the object (on horizontal/vertical axis, respectively). - There is one more parameter for Z axis in case of MESH_NODE. - Defaults: 0.5 0.5 (0.5) + Defaults: 0.5 0.5 @endproperty */ static void st_collections_group_parts_part_description_align(void) { check_has_anchors(); + check_arg_count(2); - if (get_arg_count() == 2) - { - current_desc->align.x = FROM_DOUBLE(parse_float_range(0, 0.0, 1.0)); - current_desc->align.y = FROM_DOUBLE(parse_float_range(1, 0.0, 1.0)); - } - else if (get_arg_count() == 3) - { - current_desc->align_3d.x = FROM_DOUBLE(parse_float_range(0, 0.0, 1.0)); - current_desc->align_3d.y = FROM_DOUBLE(parse_float_range(1, 0.0, 1.0)); - current_desc->align_3d.z = FROM_DOUBLE(parse_float_range(2, 0.0, 1.0)); - } + current_desc->align.x = FROM_DOUBLE(parse_float_range(0, 0.0, 1.0)); + current_desc->align.y = FROM_DOUBLE(parse_float_range(1, 0.0, 1.0)); } /** @@ -12400,1302 +11997,6 @@ st_collections_group_parts_part_description_proxy_source_visible(void) ed->proxy.source_visible = parse_bool(0); } -/** - @edcsubsection{collections_group_parts_description_position, - Group.Parts.Part.Description.Position} - */ - -/** - @page edcref - - @block - position - @context - part { - description { - .. - position { - point: x y z; - space: LOCAL/PARENT/WORLD; - } - .. - } - } - @description - A position block defines position of CAMERA, - LIGHT or MESH_NODE at the scene. - @endblock - - @property - point - @parameters - [x] [y] [z] - @effect - Sets the point of CAMERA, LIGHT or MESH_NODE centre. - @endproperty - */ -static void -st_collections_group_parts_part_description_position_point(void) -{ - check_arg_count(3); - - switch (current_part->type) - { - case EDJE_PART_TYPE_CAMERA: - { - Edje_Part_Description_Camera *ed; - - ed = (Edje_Part_Description_Camera *)current_desc; - - ed->camera.position.point.x = FROM_DOUBLE(parse_float(0)); - ed->camera.position.point.y = FROM_DOUBLE(parse_float(1)); - ed->camera.position.point.z = FROM_DOUBLE(parse_float(2)); - break; - } - - case EDJE_PART_TYPE_LIGHT: - { - Edje_Part_Description_Light *ed; - - ed = (Edje_Part_Description_Light *)current_desc; - - ed->light.position.point.x = FROM_DOUBLE(parse_float(0)); - ed->light.position.point.y = FROM_DOUBLE(parse_float(1)); - ed->light.position.point.z = FROM_DOUBLE(parse_float(2)); - break; - } - - case EDJE_PART_TYPE_MESH_NODE: - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - ed->mesh_node.position.point.x = FROM_DOUBLE(parse_float(0)); - ed->mesh_node.position.point.y = FROM_DOUBLE(parse_float(1)); - ed->mesh_node.position.point.z = FROM_DOUBLE(parse_float(2)); - break; - } - - default: - { - ERR("parse error %s:%i. camera and light attributes in non-CAMERA, non-LIGHT, and non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } - } -} - -/** - @page edcref - - @property - space - @parameters - [SPACE] - @effect - Explains in which relative coordinates the location of LIGHT - or CAMERA considers. Valid space types: - @li LOCAL - @li PARENT - @li WORLD - @endproperty - */ -static void -st_collections_group_parts_part_description_position_space(void) -{ - unsigned int space; - - check_arg_count(1); - - space = parse_enum(0, - "LOCAL", EVAS_CANVAS3D_SPACE_LOCAL, - "PARENT", EVAS_CANVAS3D_SPACE_PARENT, - "WORLD", EVAS_CANVAS3D_SPACE_WORLD, - NULL); - - switch (current_part->type) - { - case EDJE_PART_TYPE_CAMERA: - { - Edje_Part_Description_Camera *ed; - - ed = (Edje_Part_Description_Camera *)current_desc; - - ed->camera.position.space = space; - break; - } - - case EDJE_PART_TYPE_LIGHT: - { - Edje_Part_Description_Light *ed; - - ed = (Edje_Part_Description_Light *)current_desc; - - ed->light.position.space = space; - break; - } - - case EDJE_PART_TYPE_MESH_NODE: - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - ed->mesh_node.position.space = space; - break; - } - - default: - { - ERR("parse error %s:%i. camera and light attributes in non-CAMERA, non-LIGHT, and non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } - } -} - -/** - @edcsubsection{collections_group_parts_description_camera, - Group.Parts.Part.Description.Properties} - */ - -/** - @page edcref - - @block - properties - @context - part { type: CAMERA; - description { - .. - properties { - perspective: fovy aspect near far; - } - .. - } - } - @description - @endblock - - @property - properties - @parameters - [fovy] [aspect] [near] [far] - @effect - Specifies the basic attributes of the camera. - @endproperty - */ -static void -st_collections_group_parts_part_description_camera_properties(void) -{ - check_arg_count(4); - - if (current_part->type == EDJE_PART_TYPE_CAMERA) - { - Edje_Part_Description_Camera *ed; - - ed = (Edje_Part_Description_Camera *)current_desc; - - ed->camera.camera.fovy = FROM_DOUBLE(parse_float(0)); - ed->camera.camera.aspect = FROM_DOUBLE(parse_float(1)); - ed->camera.camera.frustum_near = FROM_DOUBLE(parse_float(2)); - ed->camera.camera.frustum_far = FROM_DOUBLE(parse_float(3)); - } - else if (current_part->type == EDJE_PART_TYPE_LIGHT) - { - Edje_Part_Description_Light *ed; - - ed = (Edje_Part_Description_Light *)current_desc; - - ed->light.light.fovy = FROM_DOUBLE(parse_float(0)); - ed->light.light.aspect = FROM_DOUBLE(parse_float(1)); - ed->light.light.frustum_near = FROM_DOUBLE(parse_float(2)); - ed->light.light.frustum_far = FROM_DOUBLE(parse_float(3)); - } - else - { - ERR("parse error %s:%i. camera attributes in non-CAMERA and non-LIGHT part.", - file_in, line - 1); - exit(-1); - } -} - -/** - @edcsubsection{collections_group_parts_description_properties, - Group.Parts.Part.Description.Properties} - */ - -/** - @page edcref - - @block - properties - @context - part { type: [LIGHT or MESH_NODE]; - description { - .. - properties { - ambient: red green blue alpha; - diffuse: red green blue alpha; - specular: red green blue alpha; - shade: PHONG; - material: AMBIENT; - normal: 1; - shininess: 50.0; - } - .. - } - } - @description - A properties block defines main lighting attributes of LIGHT and MESH_NODE. - @endblock - - @property - ambient - @parameters - [red] [green] [blue] [alpha] or "#[RR][GG][BB](AA)" or "#[R][G][B](A)" - @effect - Sets the components of the ambient color. - - Format: - @li [red] [green] [blue] [alpha]: one integer [0-255] for each - RGBA channel, i.e. 255 0 0 255 - @li "#[RR][GG][BB](AA)": string with two hex values per RGBA channel, - i.e "#FF0000FF" or "#FF0000" - @li "#[R][G][B](A)": string with one hex value per RGBA channel, - i.e "#F00F" or "#F00".\n - In string format you can omit alpha channel and it will be set to FF. - - Defaults: 50 50 50 255 - @endproperty - */ -static void -st_collections_group_parts_part_description_properties_ambient(void) -{ - check_arg_count(4); - - switch (current_part->type) - { - case EDJE_PART_TYPE_LIGHT: - { - Edje_Part_Description_Light *ed; - - ed = (Edje_Part_Description_Light *)current_desc; - - parse_color(0, &(ed->light.properties.ambient)); - break; - } - - case EDJE_PART_TYPE_MESH_NODE: - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - parse_color(0, &(ed->mesh_node.properties.ambient)); - break; - } - - default: - { - ERR("parse error %s:%i. light and mesh_node attributes in non-LIGHT and non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } - } -} - -/** - @page edcref - @property - diffuse - @parameters - [red] [green] [blue] [alpha] or "#[RR][GG][BB](AA)" or "#[R][G][B](A)" - @effect - Sets the components of the diffuse color. - - Format: - @li [red] [green] [blue] [alpha]: one integer [0-255] for each - RGBA channel, i.e. 255 0 0 255 - @li "#[RR][GG][BB](AA)": string with two hex values per RGBA channel, - i.e "#FF0000FF" or "#FF0000" - @li "#[R][G][B](A)": string with one hex value per RGBA channel, - i.e "#F00F" or "#F00".\n - In string format you can omit alpha channel and it will be set to FF. - - Defaults: 255 255 255 255 - @endproperty - */ -static void -st_collections_group_parts_part_description_properties_diffuse(void) -{ - check_arg_count(4); - - switch (current_part->type) - { - case EDJE_PART_TYPE_LIGHT: - { - Edje_Part_Description_Light *ed; - - ed = (Edje_Part_Description_Light *)current_desc; - - parse_color(0, &(ed->light.properties.diffuse)); - break; - } - - case EDJE_PART_TYPE_MESH_NODE: - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - parse_color(0, &(ed->mesh_node.properties.diffuse)); - break; - } - - default: - { - ERR("parse error %s:%i. light and mesh_node attributes in non-LIGHT and non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } - } -} - -/** - @page edcref - @property - specular - @parameters - [red] [green] [blue] [alpha] or "#[RR][GG][BB](AA)" or "#[R][G][B](A)" - @effect - Sets the components of the specular color. - - Format: - @li [red] [green] [blue] [alpha]: one integer [0-255] for each - RGBA channel, i.e. 255 0 0 255 - @li "#[RR][GG][BB](AA)": string with two hex values per RGBA channel, - i.e "#FF0000FF" or "#FF0000" - @li "#[R][G][B](A)": string with one hex value per RGBA channel, - i.e "#F00F" or "#F00".\n - In string format you can omit alpha channel and it will be set to FF. - - Defaults: 255 255 255 255 - @endproperty - */ -static void -st_collections_group_parts_part_description_properties_specular(void) -{ - check_arg_count(4); - - switch (current_part->type) - { - case EDJE_PART_TYPE_LIGHT: - { - Edje_Part_Description_Light *ed; - - ed = (Edje_Part_Description_Light *)current_desc; - - parse_color(0, &(ed->light.properties.specular)); - break; - } - - case EDJE_PART_TYPE_MESH_NODE: - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - parse_color(0, &(ed->mesh_node.properties.specular)); - break; - } - - default: - { - ERR("parse error %s:%i. light and mesh_node attributes in non-LIGHT and non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } - } -} - -/** - @page edcref - @property - material - @parameters - [MATERIAL] - @effect - Sets the color mode for the lighting. Valid color modes: - @li AMBIENT - @li DIFFUSE - @li SPECULAR - @li EMISSION - @li NORMAL - @endproperty - */ -static void -st_collections_group_parts_part_description_properties_material(void) -{ - unsigned int material_attrib; - - check_arg_count(1); - - material_attrib = parse_enum(0, - "AMBIENT", EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, - "DIFFUSE", EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, - "SPECULAR", EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, - "EMISSION", EVAS_CANVAS3D_MATERIAL_ATTRIB_EMISSION, - "NORMAL", EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, - NULL); - - if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - ed->mesh_node.properties.material_attrib = material_attrib; - } - else - { - ERR("parse error %s:%i. mesh_node attributes in non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} - -/** - @page edcref - @property - normal - @parameters - [0 or 1] - @effect - Sets the material attribute enable flag of the given material. - @endproperty - */ -static void -st_collections_group_parts_part_description_properties_normal(void) -{ - check_arg_count(1); - - if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - ed->mesh_node.properties.normal = parse_bool(0); - } - else - { - ERR("parse error %s:%i. mesh_node attributes in non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} - -/** - @page edcref - @property - shininess - @parameters - [shininess] - @effect - Sets the shininess of the given material. - @endproperty - */ -static void -st_collections_group_parts_part_description_properties_shininess(void) -{ - check_arg_count(1); - - if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - ed->mesh_node.properties.shininess = FROM_DOUBLE(parse_float(0)); - } - else - { - ERR("parse error %s:%i. mesh_node attributes in non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} - -/** - @page edcref - @property - shade - @parameters - [SHADE] - @effect - Sets the shade mode for MESH_NODE. Valid shade modes: - @li COLOR - @li DIFFUSE - @li FLAT - @li PHONG - @li MAP - @li RENDER - @endproperty - */ - -static void -st_collections_group_parts_part_description_properties_shade(void) -{ - unsigned int shade; - - check_arg_count(1); - - shade = parse_enum(0, - "VERTEX_COLOR", EVAS_CANVAS3D_SHADER_MODE_VERTEX_COLOR, - "PARENT", EVAS_CANVAS3D_SHADER_MODE_DIFFUSE, - "WORLD", EVAS_CANVAS3D_SHADER_MODE_FLAT, - "PHONG", EVAS_CANVAS3D_SHADER_MODE_PHONG, - "NORMAL_MAP", EVAS_CANVAS3D_SHADER_MODE_NORMAL_MAP, - "RENDER", EVAS_CANVAS3D_SHADER_MODE_SHADOW_MAP_RENDER, - NULL); - - if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - ed->mesh_node.properties.shade = shade; - } - else - { - ERR("parse error %s:%i. mesh_node attributes in non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} - -/** - @edcsubsection{collections_group_parts_description_orientation, - Group.Parts.Part.Description.Orientation} - */ - -/** - @page edcref - - @block - orientation - @context - part { type: [CAMERA or MESH_NODE or LIGHT]; - description { - .. - orientation { - look1: [x] [y] [z]; - look2: [x] [y] [z]; - look_to: [another part's name]; - angle_axis: [w] [x] [y] [z]; - quaternion: [x] [y] [z] [w]; - } - .. - } - } - @description - The orientation block defines an orientation of CAMERA, LIGHT or MESH_NODE in the scene. - @endblock - - @property - look1 - @parameters - [x] [y] [z] - @effect - Indicates a target point for CAMERA and MESH_NODE or for LIGHT to see or - to illuminate. - @endproperty - */ -static void -st_collections_group_parts_part_description_orientation_look1(void) -{ - check_arg_count(3); - - switch (current_part->type) - { - case EDJE_PART_TYPE_CAMERA: - { - SET_LOOK1(Camera, camera); - break; - } - - case EDJE_PART_TYPE_LIGHT: - { - SET_LOOK1(Light, light); - break; - } - - case EDJE_PART_TYPE_MESH_NODE: - { - SET_LOOK1(Mesh_Node, mesh_node); - break; - } - - default: - { - ERR("parse error %s:%i. camera, light and mesh_node attributes in non-CAMERA, non-LIGHT and non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } - } -} - -/** - @page edcref - @property - look2 - @parameters - [x] [y] [z] - @effect - Specifies the angle at which the target point will be caught. - @endproperty - */ -static void -st_collections_group_parts_part_description_orientation_look2(void) -{ - check_arg_count(3); - - switch (current_part->type) - { - case EDJE_PART_TYPE_CAMERA: - { - SET_LOOK2(Camera, camera); - break; - } - - case EDJE_PART_TYPE_LIGHT: - { - SET_LOOK2(Light, light); - break; - } - - case EDJE_PART_TYPE_MESH_NODE: - { - SET_LOOK2(Mesh_Node, mesh_node); - break; - } - - default: - { - ERR("parse error %s:%i. camera, light and mesh_node attributes in non-CAMERA, non-LIGHT and non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } - } -} - -/** - @page edcref - @property - look_to - @parameters - [another part's name] - @effect - Indicates another part to make target of CAMERA, LIGHT or MESH_NODE - or LIGHT. - @endproperty - */ -static void -st_collections_group_parts_part_description_orientation_look_to(void) -{ - Edje_Part_Collection *pc; - - check_arg_count(1); - - pc = eina_list_data_get(eina_list_last(edje_collections)); - - switch (current_part->type) - { - case EDJE_PART_TYPE_CAMERA: - { - SET_LOOK_TO(pc, Camera, camera); - break; - } - - case EDJE_PART_TYPE_LIGHT: - { - SET_LOOK_TO(pc, Light, light); - break; - } - - case EDJE_PART_TYPE_MESH_NODE: - { - SET_LOOK_TO(pc, Mesh_Node, mesh_node); - break; - } - - default: - { - ERR("parse error %s:%i. camera, light and mesh_node attributes in non-CAMERA, non-LIGHT and non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } - } -} - -/** - @page edcref - @property - angle_axis - @parameters - [x] [y] [z] [w] - @effect - Specifies the angle and indicates what proportions the MESH_NODE rotates in. - @endproperty - */ -static void -st_collections_group_parts_part_description_orientation_angle_axis(void) -{ - check_arg_count(4); - - if (current_part->type == EDJE_PART_TYPE_CAMERA) - { - SET_ANGLE_AXIS(Camera, camera) - } - else if (current_part->type == EDJE_PART_TYPE_LIGHT) - { - SET_ANGLE_AXIS(Light, light) - } - else if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - SET_ANGLE_AXIS(Mesh_Node, mesh_node) - } - else - { - ERR("parse error %s:%i. camera, light and mesh_node attributes in non-CAMERA, non-LIGHT and non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} - -/** - @page edcref - @property - quaternion - @parameters - [x] [y] [z] [w] - @effect - Specifies the axis and arccosinus of half angle to rotate on the MESH_NODE, CAMERA or LIGHT. - @endproperty - */ -static void -st_collections_group_parts_part_description_orientation_quaternion(void) -{ - check_arg_count(4); - - if (current_part->type == EDJE_PART_TYPE_CAMERA) - { - SET_QUATERNION(Camera, camera) - } - else if (current_part->type == EDJE_PART_TYPE_LIGHT) - { - SET_QUATERNION(Light, light) - } - else if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - SET_QUATERNION(Mesh_Node, mesh_node) - } - else - { - ERR("parse error %s:%i. camera, light and mesh_node attributes in non-CAMERA, non-LIGHT and non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} - -/** - @page edcref - @property - scale - @parameters - [scale_x] [scale_y] [scale_z] - @effect - Specifies the scale parameter for MESH_NODE. - @endproperty - */ -static void -st_collections_group_parts_part_description_scale(void) -{ - if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - ed->mesh_node.scale_3d.x = FROM_DOUBLE(parse_float_range(0, 0.0, 1000.0)); - ed->mesh_node.scale_3d.y = FROM_DOUBLE(parse_float_range(1, 0.0, 1000.0)); - ed->mesh_node.scale_3d.z = FROM_DOUBLE(parse_float_range(2, 0.0, 1000.0)); - } - else - { - ERR("parse error %s:%i. mesh_node attributes in non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} - -/** - @edcsubsection{collections_group_parts_description_texture, - Group.Parts.Part.Description.Texture} - */ - -/** - @page edcref - - @block - texture - @context - part { - description { - .. - texture { - image: "file_name"; - wrap1: REPEAT; - wrap2: REPEAT; - filter1: NEAREST; - filter2: NEAREST; - } - .. - } - } - @description - A texture block is used to set texture, this texture will be imposed on - MESH_NODE model. - @endblock - */ - -static void -ob_collections_group_parts_part_description_texture(void) -{ - Edje_Part_Description_Mesh_Node *ed; - - if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - ed->mesh_node.texture.need_texture = EINA_TRUE; - } - else - { - ERR("parse error %s:%i. " - "mesh_node attributes in non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} - -/** - @page edcref - @property - shade - image - @parameters - [SHADE] - [texture's filename] - @effect - Sets the shade mode for MESH_NODE. Valid shade modes: - @li COLOR - @li DIFFUSE - @li FLAT - @li PHONG - @li MAP - @li RENDER - Name of image to be used as previously declared in the image block. - It's required in any mesh_node part. - @endproperty - */ -static void -st_collections_group_parts_part_description_texture_image(void) -{ - Edje_Part_Description_Mesh_Node *ed; - - check_arg_count(1); - - if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - char *name; - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - ed->mesh_node.texture.textured = EINA_TRUE; - - name = parse_str(0); - data_queue_image_remove(&(ed->mesh_node.texture.id), &(ed->mesh_node.texture.set)); - data_queue_image_lookup(name, &(ed->mesh_node.texture.id), &(ed->mesh_node.texture.set)); - free(name); - } - else - { - ERR("parse error %s:%i. " - "mesh_node attributes in non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} - -/** - @page edcref - @property - wrap1 - @parameters - [WRAP] - @effect - Sets the wrap mode for S-axis. Valid wrap modes: - @li CLAMP - @li REPEAT - @li REFLECT - @endproperty - */ -static void -st_collections_group_parts_part_description_texture_wrap1(void) -{ - unsigned int wrap1; - - check_arg_count(1); - - wrap1 = parse_enum(0, - "CLAMP", EVAS_CANVAS3D_WRAP_MODE_CLAMP, - "REPEAT", EVAS_CANVAS3D_WRAP_MODE_REPEAT, - "REFLECT", EVAS_CANVAS3D_WRAP_MODE_REFLECT, - NULL); - - if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - ed->mesh_node.texture.wrap1 = wrap1; - } - else - { - ERR("parse error %s:%i. mesh_node attributes in non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} - -/** - @page edcref - @property - wrap2 - @parameters - [SHADE] - @effect - Sets the wrap mode for T-axis. Valid wrap modes: - @li CLAMP - @li REPEAT - @li REFLECT - @endproperty - */ -static void -st_collections_group_parts_part_description_texture_wrap2(void) -{ - unsigned int wrap2; - - check_arg_count(1); - - wrap2 = parse_enum(0, - "CLAMP", EVAS_CANVAS3D_WRAP_MODE_CLAMP, - "REPEAT", EVAS_CANVAS3D_WRAP_MODE_REPEAT, - "REFLECT", EVAS_CANVAS3D_WRAP_MODE_REFLECT, - NULL); - - if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - ed->mesh_node.texture.wrap2 = wrap2; - } - else - { - ERR("parse error %s:%i. mesh_node attributes in non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} - -/** - @page edcref - @property - filter1 - @parameters - [FILTER] - @effect - Sets the minification filter used when down-scrolling. Valid filter types: - @li NEAREST - @li LINEAR - @li NEAREST_MIPMAP_NEAREST - @li LINEAR_MIPMAP_NEAREST - @li NEAREST_MIPMAP_LINEAR - @endproperty - */ -static void -st_collections_group_parts_part_description_texture_filter1(void) -{ - unsigned int filter1; - - check_arg_count(1); - - filter1 = parse_enum(0, - "NEAREST", EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, - "LINEAR", EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, - "NEAREST_NEAREST", EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST, - "LINEAR_NEAREST", EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST, - "NEAREST_LINEAR", EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR, - "LINEAR_LINEAR", EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR, - NULL); - - if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - ed->mesh_node.texture.filter1 = filter1; - } - else - { - ERR("parse error %s:%i. mesh_node attributes in non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} - -/** - @page edcref - @property - filter2 - @parameters - [FILTER] - @effect - Sets the magnification filter used when down-scrolling. Valid filter types: - @li NEAREST - @li LINEAR - @li NEAREST_MIPMAP_NEAREST - @li LINEAR_MIPMAP_NEAREST - @li NEAREST_MIPMAP_LINEAR - @endproperty - */ -static void -st_collections_group_parts_part_description_texture_filter2(void) -{ - unsigned int filter2; - - check_arg_count(1); - - filter2 = parse_enum(0, - "NEAREST", EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, - "LINEAR", EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, - "NEAREST_NEAREST", EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST, - "LINEAR_NEAREST", EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST, - "NEAREST_LINEAR", EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR, - "LINEAR_LINEAR", EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR, - NULL); - - if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - ed->mesh_node.texture.filter2 = filter2; - } - else - { - ERR("parse error %s:%i. mesh_node attributes in non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} - -/** - @edcsubsection{collections_group_parts_description_mesh,Mesh} - */ - -/** - @page edcref - - @block - mesh - @context - part { - description { - .. - mesh { - geometry: "file_name"; - primitive: CUBE; - assembly: LINEAR; - } - .. - } - } - @description - @endblock - - @property - primitive - @parameters - [PRIMITIVE] - @effect - Specifies the type of primitive model to be used. - Valid primitives: - @li NONE - @li CUBE - @li SPHERE - @endproperty - */ -static void -st_collections_group_parts_part_description_mesh_primitive(void) -{ - unsigned int primitive; - - check_arg_count(1); - - primitive = parse_enum(0, - "NONE", EVAS_CANVAS3D_MESH_PRIMITIVE_NONE, - "CUBE", EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE, - "SPHERE", EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE, - NULL); - - if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - ed->mesh_node.mesh.primitive = primitive; - } - else - { - ERR("parse error %s:%i. mesh_node attributes in non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} - -/** - @page edcref - @property - assembly - @parameters - [ASSEMBLY] - @effect - Sets the vertex assembly of the mesh. Valid assemblies: - @li POINTS - @li LINES - @li LINE_STRIP - @li LINE_LOOP - @li TRIANGLES - @li TRIANGLE_STRIP - @li TRIANGLE_FAN - @endproperty - */ -static void -st_collections_group_parts_part_description_mesh_assembly(void) -{ - unsigned int assembly; - - check_arg_count(1); - - assembly = parse_enum(0, - "POINTS", EVAS_CANVAS3D_VERTEX_ASSEMBLY_POINTS, - "LINES", EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES, - "LINE_STRIP", EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINE_STRIP, - "LINE_LOOP", EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINE_LOOP, - "TRIANGLES", EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES, - "TRIANGLE_STRIP", EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLE_STRIP, - "TRIANGLE_FAN", EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLE_FAN, - NULL); - - if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - ed->mesh_node.mesh.assembly = assembly; - } - else - { - ERR("parse error %s:%i. mesh_node attributes in non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} - -/** - @page edcref - @property - geometry - @parameters - [model's filename] - @effect - Name of model to be used as previously declared in the model block. - It's required in any mesh_node part. - @endproperty - */ -static void -st_collections_group_parts_part_description_mesh_geometry(void) -{ - Edje_Part_Description_Mesh_Node *ed; - - check_arg_count(1); - - if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - char *name; - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - name = parse_str(0); - if (!ecore_file_exists(name)) - { - ERR("Unable to load model \"%s\". Check if path to file is correct (both directory and file name).", - name); - exit(-1); - } - data_queue_model_remove(&(ed->mesh_node.mesh.id), &(ed->mesh_node.mesh.set)); - data_queue_model_lookup(name, &(ed->mesh_node.mesh.id), &(ed->mesh_node.mesh.set)); - free(name); - } - else - { - ERR("parse error %s:%i. " - "image attributes in non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} - -static void -st_collections_group_parts_part_description_mesh_frame(void) -{ - check_arg_count(1); - - if (current_part->type == EDJE_PART_TYPE_MESH_NODE) - { - Edje_Part_Description_Mesh_Node *ed; - - ed = (Edje_Part_Description_Mesh_Node *)current_desc; - - ed->mesh_node.mesh.frame = parse_int(0); - } - else - { - ERR("parse error %s:%i. mesh_node attributes in non-MESH_NODE part.", - file_in, line - 1); - exit(-1); - } -} /** @edcsubsection{collections_group_parts_description_physics, * Group.Parts.Part.Description.Physics} */ @@ -15515,7 +13816,6 @@ ob_collections_group_programs_program(void) ep = mem_alloc(SZ(Edje_Program_Parser)); ep->id = -1; - ep->source_3d_id = -1; ep->tween.mode = EDJE_TWEEN_MODE_LINEAR; ep->tween.use_duration_factor = EINA_FALSE; ep->after = NULL; diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c index 111116c52f..0dcde387e9 100644 --- a/src/bin/edje/edje_cc_out.c +++ b/src/bin/edje/edje_cc_out.c @@ -232,7 +232,6 @@ static Eina_List *program_lookups = NULL; static Eina_List *group_lookups = NULL; static Eina_List *face_group_lookups = NULL; static Eina_List *image_lookups = NULL; -static Eina_List *model_lookups = NULL; static Eina_Hash *part_dest_lookup = NULL; static Eina_Hash *part_pc_dest_lookup = NULL; @@ -775,19 +774,6 @@ check_program(Edje_Part_Collection *pc, Edje_Program *ep, Eet_File *ef) } } } - if (((ep->action == EDJE_ACTION_TYPE_STATE_SET) || - (ep->action == EDJE_ACTION_TYPE_SIGNAL_EMIT)) && - (et->id < (int)pc->parts_count) && - (part->type == EDJE_PART_TYPE_MESH_NODE) && - (strstr(ep->signal, "mouse"))) - { - for (i = 0; (i < pc->parts_count) && (ep->source_3d_id < 0); i++) - { - if (!strcmp(pc->parts[i]->name, ep->source)) - ep->source_3d_id = i; - } - ep->source = mem_strdup(pc->parts[camera_id]->name); - } } } @@ -807,9 +793,6 @@ _alias_clean(Edje_Part_Collection_Directory_Entry *ce) ce->count.TABLE = 0; ce->count.EXTERNAL = 0; ce->count.PROXY = 0; - ce->count.MESH_NODE = 0; - ce->count.LIGHT = 0; - ce->count.CAMERA = 0; ce->count.SPACER = 0; ce->count.VECTOR = 0; ce->count.part = 0; @@ -1617,39 +1600,6 @@ data_write_images(void) } } -static void -data_check_models(Eet_File *ef EINA_UNUSED, int *model_num EINA_UNUSED) -{ - int i; - - if (!((edje_file) && (edje_file->model_dir))) return; - - for (i = 0; i < (int)edje_file->model_dir->entries_count; i++) - { - Edje_Model_Directory_Entry *model; - Eina_List *ll; - char *s; - Eina_Bool file_exist = EINA_FALSE; - - model = &edje_file->model_dir->entries[i]; - - EINA_LIST_FOREACH(model_dirs, ll, s) - { - char buf[PATH_MAX]; - - snprintf(buf, sizeof(buf), "%s/%s", s, model->entry); - - file_exist = file_exist || ecore_file_exists(buf); - } - if (!file_exist) - { - ERR("Unable to load model \"%s\". Check if path to file is correct (both directory and file name).", - model->entry); - exit(-1); - } - } -} - static void data_thread_sounds(void *data, Ecore_Thread *thread EINA_UNUSED) { @@ -2836,7 +2786,6 @@ data_write(void) { Eet_File *ef; Eet_Error err; - int model_num = 0; int sound_num = 0; int mo_num = 0; int vibration_num = 0; @@ -2923,8 +2872,6 @@ data_write(void) INF("fontmap: %3.5f", ecore_time_get() - t); t = ecore_time_get(); data_write_vectors(ef, &vector_num); INF("vectors: %3.5f", ecore_time_get() - t); t = ecore_time_get(); - data_check_models(ef, &model_num); - INF("models: %3.5f", ecore_time_get() - t); t = ecore_time_get(); data_write_fonts(ef, &font_num); INF("fonts: %3.5f", ecore_time_get() - t); t = ecore_time_get(); data_write_sounds(ef, &sound_num); @@ -3515,49 +3462,6 @@ data_queue_image_remove(int *dest, Eina_Bool *set) } } -void -data_queue_model_lookup(char *name, int *dest, Eina_Bool *set) -{ - Image_Lookup *il; - - il = mem_alloc(SZ(Image_Lookup)); - model_lookups = eina_list_append(model_lookups, il); - il->name = mem_strdup(name); - il->dest = dest; - il->set = set; -} - -void -data_queue_model_remove(int *dest, Eina_Bool *set) -{ - Eina_List *l; - Image_Lookup *il; - - EINA_LIST_FOREACH(model_lookups, l, il) - { - if (il->dest == dest && il->set == set) - { - model_lookups = eina_list_remove_list(model_lookups, l); - free(il->name); - free(il); - return; - } - } -} - -void -data_queue_copied_model_lookup(int *src, int *dest, Eina_Bool *set) -{ - Eina_List *l; - Image_Lookup *il; - - EINA_LIST_FOREACH(model_lookups, l, il) - { - if (il->dest == src) - data_queue_model_lookup(il->name, dest, set); - } -} - void data_queue_copied_image_lookup(int *src, int *dest, Eina_Bool *set) { @@ -3719,7 +3623,6 @@ _data_image_id_update(Eina_List *images_unused_list) Edje_Part_Collection *pc; Edje_Part *part; Edje_Part_Description_Image *part_desc_image; - Edje_Part_Description_Mesh_Node *part_desc_mesh_node; Edje_Part_Image_Id *tween_id; unsigned int i, j, desc_it; Eina_List *l, *l2, *l3; @@ -3746,15 +3649,6 @@ _data_image_id_update(Eina_List *images_unused_list) } \ } -#define PART_DESC_PROXY_ID_UPDATE \ - EINA_LIST_FOREACH(images_unused_list, l3, iui) \ - { \ - if ((iui) && (part_desc_mesh_node->mesh_node.texture.id == iui->old_id)) \ - { \ - part_desc_mesh_node->mesh_node.texture.id = iui->new_id; \ - break; \ - } \ - } EINA_LIST_FOREACH_SAFE(edje_collections, l, l2, pc) { for (i = 0; i < pc->parts_count; i++) @@ -3771,17 +3665,6 @@ _data_image_id_update(Eina_List *images_unused_list) PART_DESC_IMAGE_ID_UPDATE } } - else if (part->type == EDJE_PART_TYPE_MESH_NODE) - { - part_desc_mesh_node = (Edje_Part_Description_Mesh_Node *)part->default_desc; - if (!part_desc_mesh_node) continue; - PART_DESC_PROXY_ID_UPDATE - for (j = 0; j < part->other.desc_count; j++) - { - part_desc_mesh_node = (Edje_Part_Description_Mesh_Node *)part->other.desc[j]; - PART_DESC_PROXY_ID_UPDATE - } - } } } for (i = 0; i < edje_file->image_dir->sets_count; i++) @@ -3804,46 +3687,6 @@ _data_image_id_update(Eina_List *images_unused_list) } } -static void -_data_model_id_update(Eina_List *models_unused_list) -{ - Image_Unused_Ids *iui; - Edje_Part_Collection *pc; - Edje_Part *part; - Edje_Part_Description_Mesh_Node *part_desc_mesh_node; - unsigned int i, j; - Eina_List *l, *l2, *l3; - -#define PART_DESC_MODEL_ID_UPDATE \ - EINA_LIST_FOREACH(models_unused_list, l3, iui) \ - { \ - if ((iui) && (part_desc_mesh_node->mesh_node.mesh.id == iui->old_id)) \ - { \ - part_desc_mesh_node->mesh_node.mesh.id = iui->new_id; \ - break; \ - } \ - } \ - - EINA_LIST_FOREACH_SAFE(edje_collections, l, l2, pc) - { - for (i = 0; i < pc->parts_count; i++) - { - part = pc->parts[i]; - if (part->type == EDJE_PART_TYPE_MESH_NODE) - { - part_desc_mesh_node = (Edje_Part_Description_Mesh_Node *)part->default_desc; - if (!part_desc_mesh_node) continue; - PART_DESC_MODEL_ID_UPDATE - for (j = 0; j < part->other.desc_count; j++) - { - part_desc_mesh_node = (Edje_Part_Description_Mesh_Node *)part->other.desc[j]; - PART_DESC_MODEL_ID_UPDATE - } - } - } - } -} - void data_process_lookups(void) { @@ -3853,11 +3696,9 @@ data_process_lookups(void) Program_Lookup *program; Group_Lookup *group; Image_Lookup *image; - Image_Lookup *model; Eina_List *l2; Eina_List *l; Eina_Hash *images_in_use; - Eina_Hash *models_in_use; char *group_name; Eina_Bool is_lua = EINA_FALSE; Image_Unused_Ids *iui; @@ -4255,86 +4096,6 @@ free_group: } eina_hash_free(images_in_use); - - models_in_use = eina_hash_string_superfast_new(NULL); - - EINA_LIST_FREE(model_lookups, model) - { - Eina_Bool find = EINA_FALSE; - - if (edje_file->model_dir) - { - Edje_Model_Directory_Entry *de; - unsigned int i; - - for (i = 0; i < edje_file->model_dir->entries_count; ++i) - { - de = edje_file->model_dir->entries + i; - - if ((de->entry) && (!strcmp(de->entry, model->name))) - { - *(model->dest) = de->id; - *(model->set) = EINA_FALSE; - find = EINA_TRUE; - - if (!eina_hash_find(models_in_use, model->name)) - eina_hash_direct_add(models_in_use, de->entry, de); - break; - } - } - } - - if (!find) - { - ERR("Unable to find model name \"%s\".", model->name); - exit(-1); - } - - free(model->name); - free(model); - } - - if (edje_file->model_dir && !is_lua) - { - Edje_Model_Directory_Entry *de, *de_last, *mdl; - Eina_List *models_unused_list = NULL; - unsigned int i; - - for (i = 0; i < edje_file->model_dir->entries_count; ++i) - { - de = edje_file->model_dir->entries + i; - - if (de->entry && eina_hash_find(models_in_use, de->entry)) - continue; - - INF("Model '%s' in resource 'edje/model/%i' will not be included as it is unused.", - de->entry, de->id); - - /* so as not to write the unused models, moved last model in the - list to unused model position and check it */ - free((void *)de->entry); - de->entry = NULL; - de_last = edje_file->model_dir->entries + edje_file->model_dir->entries_count - 1; - iui = mem_alloc(SZ(Image_Unused_Ids)); - iui->old_id = de_last->id; - models_unused_list = eina_list_append(models_unused_list, iui); - iui->new_id = i; - de_last->id = i; - memcpy(de, de_last, sizeof (Edje_Model_Directory_Entry)); - --i; /* need to check a moved model on this index */ - edje_file->model_dir->entries_count--; - mdl = realloc(edje_file->model_dir->entries, - sizeof (Edje_Model_Directory_Entry) * edje_file->model_dir->entries_count); - edje_file->model_dir->entries = mdl; - } - - /* update model id in parts */ - if (models_unused_list) _data_model_id_update(models_unused_list); - EINA_LIST_FREE(models_unused_list, iui) - free(iui); - } - - eina_hash_free(models_in_use); } static void diff --git a/src/lib/edje/Edje_Common.h b/src/lib/edje/Edje_Common.h index 7a02281810..88405624ba 100644 --- a/src/lib/edje/Edje_Common.h +++ b/src/lib/edje/Edje_Common.h @@ -317,15 +317,6 @@ EAPI void *edje_object_signal_callback_seat_data_get(void); * * @brief Functions to manipulate audio abilities in edje. * - * Perspective is a graphical tool that makes objects represented in 2D - * look like they have a 3D appearance. - * - * Edje allows us to use perspective on any edje object. This group of - * functions deal with the use of perspective, by creating and configuring - * a perspective object that must set to a edje object or a canvas, - * affecting all the objects inside that have no particular perspective - * set already. - * * @{ */ @@ -1819,6 +1810,7 @@ EAPI Eina_Bool edje_mmap_group_exists(Eina_File *f, const char *glob); * * @return @c 1 if a Scene is found is found, @c 0 otherwise * + * @deprecated * @since 1.18 */ EINA_DEPRECATED EAPI Eina_Bool edje_mmap_3d_has(Eina_File *f, const char *group); diff --git a/src/lib/edje/Edje_Legacy.h b/src/lib/edje/Edje_Legacy.h index f36cb53953..962e175160 100644 --- a/src/lib/edje/Edje_Legacy.h +++ b/src/lib/edje/Edje_Legacy.h @@ -3006,15 +3006,6 @@ EAPI const char *edje_object_color_class_description_get(const Edje_Object *obj, * * @brief Functions that deal with 3D projection of an 2D object. * - * Perspective is a graphical tool that makes objects represented in 2D - * look like they have a 3D appearance. - * - * Edje allows us to use perspective on any edje object. This group of - * functions deal with the use of perspective, by creating and configuring - * a perspective object that must set to a edje object or a canvas, - * affecting all the objects inside that have no particular perspective - * set already. - * * @{ */ diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index f55e41fc77..fa2d921212 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -292,17 +292,6 @@ struct _Edje_String unsigned int id; }; -struct _Edje_3D_Vec { - FLOAT_T x; - FLOAT_T y; - FLOAT_T z; -}; - -struct _Edje_3D_Int_Vec { - int x; - int y; - int z; -}; typedef struct _Edje_Position_Scale Edje_Alignment; typedef struct _Edje_Position_Scale Edje_Position_Scale; @@ -314,9 +303,6 @@ typedef struct _Edje_Map_Color Edje_Map_Color; typedef struct _Edje_Aspect_Prefer Edje_Aspect_Prefer; typedef struct _Edje_Aspect Edje_Aspect; typedef struct _Edje_String Edje_String; -typedef struct _Edje_3D_Vec Edje_3D_Vec; -typedef struct _Edje_3D_Int_Vec Edje_3D_Int_Vec; -typedef struct _AABB AABB; typedef struct _Edje_File Edje_File; typedef struct _Edje_Style Edje_Style; @@ -361,9 +347,6 @@ typedef struct _Edje_Part_Description_Text Edje_Part_Description_Text; typedef struct _Edje_Part_Description_Box Edje_Part_Description_Box; typedef struct _Edje_Part_Description_Table Edje_Part_Description_Table; typedef struct _Edje_Part_Description_External Edje_Part_Description_External; -typedef struct _Edje_Part_Description_Mesh_Node Edje_Part_Description_Mesh_Node; -typedef struct _Edje_Part_Description_Light Edje_Part_Description_Light; -typedef struct _Edje_Part_Description_Camera Edje_Part_Description_Camera; typedef struct _Edje_Part_Description_Snapshot Edje_Part_Description_Snapshot; typedef struct _Edje_Part_Description_Common Edje_Part_Description_Common; typedef struct _Edje_Part_Description_Spec_Fill Edje_Part_Description_Spec_Fill; @@ -373,9 +356,6 @@ typedef struct _Edje_Part_Description_Spec_Proxy Edje_Part_Description_Spec_ typedef struct _Edje_Part_Description_Spec_Text Edje_Part_Description_Spec_Text; typedef struct _Edje_Part_Description_Spec_Box Edje_Part_Description_Spec_Box; typedef struct _Edje_Part_Description_Spec_Table Edje_Part_Description_Spec_Table; -typedef struct _Edje_Part_Description_Spec_Mesh_Node Edje_Part_Description_Spec_Mesh_Node; -typedef struct _Edje_Part_Description_Spec_Light Edje_Part_Description_Spec_Light; -typedef struct _Edje_Part_Description_Spec_Camera Edje_Part_Description_Spec_Camera; typedef struct _Edje_Part_Description_Spec_Filter Edje_Part_Description_Spec_Filter; typedef struct _Edje_Part_Description_Spec_Filter_Data Edje_Part_Description_Spec_Filter_Data; typedef struct _Edje_Physics_Face Edje_Physics_Face; @@ -546,12 +526,6 @@ typedef struct _Edje_Signal_Callback_Custom Edje_Signal_Callback_Custom; /*----------*/ -struct _AABB { - Edje_3D_Vec relative; - Edje_3D_Int_Vec offset; - int rel_to; -}; - typedef struct Edje_Image_Hash { int id; @@ -825,7 +799,6 @@ struct _Edje_Color_Tree_Node struct _Edje_Program /* a conditional program to be run */ { int id; /* id of program */ - int source_3d_id; /* id of real 3D part */ const char *name; /* name of the action */ @@ -1238,7 +1211,6 @@ struct _Edje_Part Evas_Event_Flags ignore_flags; Evas_Event_Flags mask_flags; unsigned int items_count; - Edje_3D_Vec scale_3d; Edje_Part_Api api; Edje_Part_Allowed_Seat **allowed_seats; unsigned int allowed_seats_count; @@ -1374,8 +1346,6 @@ struct _Edje_Part_Description_Common } physics; #endif - Edje_3D_Vec align_3d; - unsigned char visible; /* is it shown */ unsigned char limit; /* 0 == no, 1 = width, 2 = height, 3 = both */ unsigned char no_render; /* no_render override @since 1.19 */ @@ -1508,108 +1478,6 @@ struct _Edje_Part_Description_Spec_Table } min; }; -struct _Edje_Part_Description_Spec_Mesh_Node -{ - struct { - Edje_Part_Image_Id **tweens; - unsigned int tweens_count; - int id; - Evas_Canvas3D_Mesh_Primitive primitive; - Evas_Canvas3D_Vertex_Assembly assembly; - int frame; - Eina_Bool set; - } mesh; - - struct { - Edje_Part_Image_Id **tweens; - unsigned int tweens_count; - int id; - Evas_Canvas3D_Wrap_Mode wrap1; - Evas_Canvas3D_Wrap_Mode wrap2; - Evas_Canvas3D_Texture_Filter filter1; - Evas_Canvas3D_Texture_Filter filter2; - Eina_Bool need_texture; - Eina_Bool textured; - Eina_Bool set; - } texture; - - struct { - Edje_Color ambient; - Edje_Color diffuse; - Edje_Color specular; - Eina_Bool normal; - FLOAT_T shininess; - Evas_Canvas3D_Shader_Mode shade; - Evas_Canvas3D_Material_Attrib material_attrib; - } properties; - - AABB aabb1; - AABB aabb2; - - struct { - Evas_Canvas3D_Node_Orientation_Type type; - FLOAT_T data[6]; - int look_to; /* -1 = whole part collection, or part ID */ - } orientation; - - Edje_3D_Vec scale_3d; - - struct { - Edje_3D_Vec point; - - unsigned char space; - } position; -}; - -struct _Edje_Part_Description_Spec_Light -{ - struct { - Edje_Color ambient; - Edje_Color diffuse; - Edje_Color specular; - } properties; - - struct { - Edje_3D_Vec point; - - unsigned char space; - } position; - - struct { - Evas_Canvas3D_Node_Orientation_Type type; - FLOAT_T data[6]; - int look_to; /* -1 = whole part collection, or part ID */ - } orientation; - - struct { - Evas_Real fovy; - Evas_Real aspect; - Evas_Real frustum_near; - Evas_Real frustum_far; - } light; -}; - -struct _Edje_Part_Description_Spec_Camera -{ - struct { - Evas_Real fovy; - Evas_Real aspect; - Evas_Real frustum_near; - Evas_Real frustum_far; - } camera; - - struct { - Edje_3D_Vec point; - unsigned char space; - } position; - - struct { - Evas_Canvas3D_Node_Orientation_Type type; - FLOAT_T data[6]; - int look_to; /* -1 = whole part collection, or part ID */ - } orientation; -}; - struct _Edje_Part_Description_Spec_Svg { int id; /* the svg id to use */ @@ -1663,24 +1531,6 @@ struct _Edje_Part_Description_External Eina_List *external_params; /* parameters for external objects */ }; -struct _Edje_Part_Description_Mesh_Node -{ - Edje_Part_Description_Common common; - Edje_Part_Description_Spec_Mesh_Node mesh_node; -}; - -struct _Edje_Part_Description_Light -{ - Edje_Part_Description_Common common; - Edje_Part_Description_Spec_Light light; -}; - -struct _Edje_Part_Description_Camera -{ - Edje_Part_Description_Common common; - Edje_Part_Description_Spec_Camera camera; -}; - struct _Edje_Part_Description_Vector { Edje_Part_Description_Common common; @@ -1892,7 +1742,6 @@ struct _Edje_Calc_Params_Physics typedef struct _Edje_Calc_Params_Type_Common Edje_Calc_Params_Type_Common; typedef struct _Edje_Calc_Params_Type_Text Edje_Calc_Params_Type_Text; -typedef struct _Edje_Calc_Params_Type_Node Edje_Calc_Params_Type_Node; struct _Edje_Calc_Params_Type_Common { @@ -1913,14 +1762,6 @@ struct _Edje_Calc_Params_Type_Text Edje_Color color2, color3; // 8 }; // 36 -struct _Edje_Calc_Params_Type_Node -{ - FLOAT_T data[6]; // 48 - Edje_3D_Vec point; // 24 - Edje_3D_Vec scale_3d; // 24 - int frame; // 4 -}; // 100 - typedef struct _Edje_Calc_Params_Ext Edje_Calc_Params_Ext; struct _Edje_Calc_Params_Ext @@ -1938,7 +1779,6 @@ struct _Edje_Calc_Params union { Edje_Calc_Params_Type_Common *common; Edje_Calc_Params_Type_Text *text; - Edje_Calc_Params_Type_Node *node; } type; // 4/8 Edje_Calc_Params_Ext *ext; // 4/8 struct { @@ -2066,7 +1906,6 @@ struct _Edje_Real_Part Edje_Part *part; // 4 Evas_Object *object; // 4 Evas_Object *nested_smart; // 4 - Eo *node; // 4 Edje_Real_Part_Drag *drag; // 4 Edje_Part_Description_Common *chosen_description; // 4 // WITH EDJE_CALC_CACHE: 307 @@ -2561,13 +2400,6 @@ _edje_calc_params_need_type_text(Edje_Calc_Params *p) p->type.text = calloc(1, sizeof(Edje_Calc_Params_Type_Text)); } -static inline void -_edje_calc_params_need_type_node(Edje_Calc_Params *p) -{ - if (p->type.node) return; - p->type.node = calloc(1, sizeof(Edje_Calc_Params_Type_Node)); -} - static inline void _edje_calc_params_need_ext(Edje_Calc_Params *p) { diff --git a/src/lib/edje/efl_canvas_layout_types.eot b/src/lib/edje/efl_canvas_layout_types.eot index b3eee20d18..f699df937c 100644 --- a/src/lib/edje/efl_canvas_layout_types.eot +++ b/src/lib/edje/efl_canvas_layout_types.eot @@ -14,9 +14,6 @@ enum @beta Efl.Canvas.Layout_Part_Type external = 10, [[External type value.]] proxy = 11, [[Proxy type value.]] spacer = 12, [[Spacer type value @since 1.7.]] - mesh_node = 13, [[Canvas 3D type: mesh node.]] - light = 14, [[Canvas 3D type: light.]] - camera = 15, [[Canvas 3D type: camera.]] snapshot = 16, [[Snapshot @since 1.16.]] vector = 17, [[Vector @since 1.18.]] last = 18 [[Last type value.]]