rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=9fd72f0127a8ebee25fecc0b62e463a710dd3596
commit 9fd72f0127a8ebee25fecc0b62e463a710dd3596 Author: Vitalii Vorobiov <vi.vorob...@samsung.com> Date: Tue Jun 7 13:32:31 2016 +0300 editor: reset functions for map API --- src/bin/editor/default.c | 10 ++++++++++ src/bin/editor/default.h | 42 ++++++++++++++++++++++++++++++++++++++++++ src/bin/editor/editor_states.c | 15 +++++++++++++++ 3 files changed, 67 insertions(+) diff --git a/src/bin/editor/default.c b/src/bin/editor/default.c index b67b861..a867e83 100644 --- a/src/bin/editor/default.c +++ b/src/bin/editor/default.c @@ -94,6 +94,8 @@ EDITOR_STATE_SIMPLE_RESET(fill_size_offset_y, 0) EDITOR_STATE_SIMPLE_RESET(container_padding_x, 0) EDITOR_STATE_SIMPLE_RESET(container_padding_y, 0) EDITOR_STATE_SIMPLE_RESET(text_size, 12) +EDITOR_STATE_SIMPLE_RESET(map_perspective_focal, 0) +EDITOR_STATE_SIMPLE_RESET(map_perspective_zplane, 0) EDITOR_STATE_SIMPLE_RESET(fixed_h, false) EDITOR_STATE_SIMPLE_RESET(fixed_w, false) @@ -107,6 +109,11 @@ EDITOR_STATE_SIMPLE_RESET(text_max_x, false) EDITOR_STATE_SIMPLE_RESET(text_max_y, false) EDITOR_STATE_SIMPLE_RESET(text_min_x, false) EDITOR_STATE_SIMPLE_RESET(text_min_y, false) +EDITOR_STATE_SIMPLE_RESET(map_on, false) +EDITOR_STATE_SIMPLE_RESET(map_perspective_on, false) +EDITOR_STATE_SIMPLE_RESET(map_smooth, true) +EDITOR_STATE_SIMPLE_RESET(map_alpha, true) +EDITOR_STATE_SIMPLE_RESET(map_backface_cull, false) #define EDITOR_NULL_STRING_DEFAULT_CHECK(FUNC, REAL_FUNC, PROTO_ARGS, ARGS) \ Eina_Bool \ @@ -155,6 +162,9 @@ EDITOR_STATE_NULL_STRING_RESET(color_class, NULL) EDITOR_STATE_NULL_STRING_RESET(text_source, NULL) EDITOR_STATE_NULL_STRING_RESET(text_text_source, NULL) EDITOR_STATE_NULL_STRING_RESET(font, NULL) +EDITOR_STATE_NULL_STRING_RESET(map_perspective, NULL) +EDITOR_STATE_NULL_STRING_RESET(map_light, NULL) +EDITOR_STATE_NULL_STRING_RESET(map_rotation_center, NULL) #define EDITOR_STATE_NOT_NULL_STRING_RESET(FUNC, RESET_VAL) \ EDITOR_NOT_NULL_STRING_DEFAULT_CHECK(state_##FUNC, EDITOR_STATE_ARGS_PROTO, EDITOR_STATE_ARGS, RESET_VAL) \ diff --git a/src/bin/editor/default.h b/src/bin/editor/default.h index fdc87a1..f4a8237 100644 --- a/src/bin/editor/default.h +++ b/src/bin/editor/default.h @@ -729,4 +729,46 @@ Eina_Bool editor_program_emit_source_reset(Evas_Object *edit_object, Change *change, Eina_Bool apply, const char *program_name); +/* map */ +Eina_Bool +editor_state_map_on_default_is(Evas_Object *edit_object, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_on_reset(Evas_Object *edit_object, Change *change, Eina_Bool apply, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_perspective_on_default_is(Evas_Object *edit_object, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_perspective_on_reset(Evas_Object *edit_object, Change *change, Eina_Bool apply, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_smooth_default_is(Evas_Object *edit_object, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_smooth_reset(Evas_Object *edit_object, Change *change, Eina_Bool apply, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_alpha_default_is(Evas_Object *edit_object, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_alpha_reset(Evas_Object *edit_object, Change *change, Eina_Bool apply, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_backface_cull_default_is(Evas_Object *edit_object, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_backface_cull_reset(Evas_Object *edit_object, Change *change, Eina_Bool apply, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_perspective_default_is(Evas_Object *edit_object, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_perspective_reset(Evas_Object *edit_object, Change *change, Eina_Bool apply, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_light_default_is(Evas_Object *edit_object, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_light_reset(Evas_Object *edit_object, Change *change, Eina_Bool apply, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_rotation_center_default_is(Evas_Object *edit_object, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_rotation_center_reset(Evas_Object *edit_object, Change *change, Eina_Bool apply, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_perspective_focal_default_is(Evas_Object *edit_object, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_perspective_focal_reset(Evas_Object *edit_object, Change *change, Eina_Bool apply, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_perspective_zplane_default_is(Evas_Object *edit_object, const char *part_name, const char *state_name, double state_val); +Eina_Bool +editor_state_map_perspective_zplane_reset(Evas_Object *edit_object, Change *change, Eina_Bool apply, const char *part_name, const char *state_name, double state_val); + #endif /* DEFAULT_H */ diff --git a/src/bin/editor/editor_states.c b/src/bin/editor/editor_states.c index 3b8601d..a281f71 100644 --- a/src/bin/editor/editor_states.c +++ b/src/bin/editor/editor_states.c @@ -742,6 +742,21 @@ editor_state_reset(Evas_Object *edit_object, Change *change, Eina_Bool merge __U res = res && editor_state_rel2_to_x_reset(edit_object, change, apply, part_name, state_name, state_val); res = res && editor_state_rel2_to_y_reset(edit_object, change, apply, part_name, state_name, state_val); res = res && editor_state_visible_reset(edit_object, change, apply, part_name, state_name, state_val); + res = res && editor_state_map_on_reset(edit_object, change, apply, part_name, state_name, state_val); + res = res && editor_state_map_perspective_on_reset(edit_object, change, apply, part_name, state_name, state_val); + res = res && editor_state_map_smooth_reset(edit_object, change, apply, part_name, state_name, state_val); + res = res && editor_state_map_alpha_reset(edit_object, change, apply, part_name, state_name, state_val); + res = res && editor_state_map_backface_cull_reset(edit_object, change, apply, part_name, state_name, state_val); + res = res && editor_state_map_perspective_reset(edit_object, change, apply, part_name, state_name, state_val); + res = res && editor_state_map_light_reset(edit_object, change, apply, part_name, state_name, state_val); +TODO("Implement reset and default_is functions") +// res = res && editor_state_map_rotation_x_reset(edit_object, change, apply, part_name, state_name, state_val); +// res = res && editor_state_map_rotation_y_reset(edit_object, change, apply, part_name, state_name, state_val); +// res = res && editor_state_map_rotation_z_reset(edit_object, change, apply, part_name, state_name, state_val); +// res = res && editor_state_map_point_color_reset(edit_object, change, apply, part_name, state_name, state_val); + res = res && editor_state_map_rotation_center_reset(edit_object, change, apply, part_name, state_name, state_val); + res = res && editor_state_map_perspective_focal_reset(edit_object, change, apply, part_name, state_name, state_val); + res = res && editor_state_map_perspective_zplane_reset(edit_object, change, apply, part_name, state_name, state_val); you_shall_pass_editor_signals(change); --