summaryrefslogtreecommitdiff
path: root/src/lib/edje
diff options
context:
space:
mode:
authorVitalii Vorobiov <vi.vorobiov@samsung.com>2017-01-17 16:30:45 +0200
committerVitalii Vorobiov <vi.vorobiov@samsung.com>2017-01-17 16:30:45 +0200
commitbbdfe393e4bf5aee5d00dacb704b0e7510921ecd (patch)
tree13ffa3394e99471cd63477a7b6603bb0efbd4251 /src/lib/edje
parentba4370f8dff140cf56a84227a65c95123f3f75f7 (diff)
Edje_Edit: add forgotten API for map.zoom.x/y
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/Edje_Edit.h30
-rw-r--r--src/lib/edje/edje_edit.c23
2 files changed, 53 insertions, 0 deletions
diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h
index 7997cbf8aa..2b6c1c610c 100644
--- a/src/lib/edje/Edje_Edit.h
+++ b/src/lib/edje/Edje_Edit.h
@@ -5732,6 +5732,36 @@ EAPI Eina_Bool edje_edit_state_map_perspective_zplane_set(Evas_Object *obj, cons
5732 **/ 5732 **/
5733EAPI const char * edje_edit_state_map_rotation_center_get(Evas_Object *obj, const char *part, const char *state, double value); 5733EAPI const char * edje_edit_state_map_rotation_center_get(Evas_Object *obj, const char *part, const char *state, double value);
5734 5734
5735/** Set map.zoom (x and y) values of given part state.
5736 *
5737 * @param obj Object being edited.
5738 * @param part The name of the part.
5739 * @param state The name of the state (not including the state value).
5740 * @param value The state value.
5741 * @param x value of x
5742 * @param y value of y
5743 *
5744 * @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise.
5745 * @since 1.19
5746 **/
5747EAPI Eina_Bool
5748edje_edit_state_map_zoom_set(Evas_Object *obj, const char *part, const char *state, double value, double x, double y);
5749
5750/** Get map.zoom (x and y) values of given part state.
5751 *
5752 * @param obj Object being edited.
5753 * @param part The name of the part.
5754 * @param state The name of the state (not including the state value).
5755 * @param value The state value.
5756 * @param x variable to store value of x
5757 * @param y variable to store value of y
5758 *
5759 * @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise.
5760 * @since 1.19
5761 **/
5762EAPI Eina_Bool
5763edje_edit_state_map_zoom_get(Evas_Object *obj, const char *part, const char *state, double value, double *x, double *y);
5764
5735/** This sets the part that is used as the center of rotation when rotating the part with this description. If no center is given, the parts original center itself is used for the rotation center. 5765/** This sets the part that is used as the center of rotation when rotating the part with this description. If no center is given, the parts original center itself is used for the rotation center.
5736 * 5766 *
5737 * @param obj Object being edited. 5767 * @param obj Object being edited.
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 38b08e6570..c57355339a 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -7857,6 +7857,29 @@ edje_edit_state_map_rotation_get(Evas_Object *obj, const char *part, const char
7857} 7857}
7858 7858
7859EAPI Eina_Bool 7859EAPI Eina_Bool
7860edje_edit_state_map_zoom_set(Evas_Object *obj, const char *part, const char *state, double value, double x, double y)
7861{
7862 GET_PD_OR_RETURN(EINA_FALSE);
7863
7864 pd->map.zoom.x = FROM_DOUBLE(x);
7865 pd->map.zoom.y = FROM_DOUBLE(y);
7866
7867 edje_object_calc_force(obj);
7868 return EINA_TRUE;
7869}
7870
7871EAPI Eina_Bool
7872edje_edit_state_map_zoom_get(Evas_Object *obj, const char *part, const char *state, double value, double *x, double *y)
7873{
7874 GET_PD_OR_RETURN(EINA_FALSE);
7875
7876 if (x) *x = TO_DOUBLE(pd->map.zoom.x);
7877 if (y) *y = TO_DOUBLE(pd->map.zoom.y);
7878
7879 return EINA_TRUE;
7880}
7881
7882EAPI Eina_Bool
7860edje_edit_state_map_perspective_zplane_set(Evas_Object *obj, const char *part, const char *state, double value, int zplane) 7883edje_edit_state_map_perspective_zplane_set(Evas_Object *obj, const char *part, const char *state, double value, int zplane)
7861{ 7884{
7862 GET_PD_OR_RETURN(EINA_FALSE); 7885 GET_PD_OR_RETURN(EINA_FALSE);