From 3f42ef9a1871c6c95f04ba601cf3779efa5d5d07 Mon Sep 17 00:00:00 2001 From: raster Date: Sun, 21 Feb 2010 10:55:45 +0000 Subject: [PATCH] add embryo to manipulate map stuff. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@46343 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- data/include/edje.inc | 13 ++++++++- src/lib/edje_embryo.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++- src/lib/edje_private.h | 77 +++++++++++++++++++++++++++--------------------- 3 files changed, 134 insertions(+), 35 deletions(-) diff --git a/data/include/edje.inc b/data/include/edje.inc index 7179c1c..fe2fdf9 100644 --- a/data/include/edje.inc +++ b/data/include/edje.inc @@ -221,7 +221,18 @@ enum State_Param STATE_TEXT_MIN = 28, STATE_TEXT_MAX = 29, STATE_TEXT_ALIGN = 30, - STATE_VISIBLE = 31 + STATE_VISIBLE = 31, + STATE_MAP_ON = 32, + STATE_MAP_PERSP = 33, + STATE_MAP_LIGHT = 34, + STATE_MAP_ROT_CENTER = 35, + STATE_MAP_ROT_X = 36, + STATE_MAP_ROT_Y = 37, + STATE_MAP_ROT_Z = 38, + STATE_MAP_BACK_CULL = 39, + STATE_MAP_PERSP_ON = 40, + STATE_PERSP_ZPLANE = 41, + STATE_PERSP_FOCAL = 42 }; native set_state_val(part_id, State_Param:p, ...); diff --git a/src/lib/edje_embryo.c b/src/lib/edje_embryo.c index 854e0ca..e27b8e2 100644 --- a/src/lib/edje_embryo.c +++ b/src/lib/edje_embryo.c @@ -179,7 +179,18 @@ void *alloca (size_t); * text[fit_x,fit_y] * text[min_x,min_y] * text[align_x,align_y] - * visible + * visible[on] + * map_on[on] + * map_persp[part_id] + * map_light[part_id] + * map_rot_center[part_id] + * map_rot_x[deg] + * map_rot_y[deg] + * map_rot_z[deg] + * map_back_cull[on] + * map_persp_on[on] + * persp_zplane[z] + * persp_focal[z] * * ** part_id and program_id need to be able to be "found" from strings * @@ -1886,6 +1897,72 @@ _edje_embryo_fn_set_state_val(Embryo_Program *ep, Embryo_Cell *params) GETINT(rp->custom->description->visible, params[3]); break; + case EDJE_STATE_PARAM_MAP_OM: + CHKPARAM(3); + + GETINT(rp->custom->description->map.on, params[3]); + + break; + case EDJE_STATE_PARAM_MAP_PERSP: + CHKPARAM(3); + + GETINT(rp->custom->description->map.id_persp, params[3]); + + break; + case EDJE_STATE_PARAM_MAP_LIGNT: + CHKPARAM(3); + + GETINT(rp->custom->description->map.id_light, params[3]); + + break; + case EDJE_STATE_PARAM_MAP_ROT_CENTER: + CHKPARAM(3); + + GETINT(rp->custom->description->map.rot.id_center, params[3]); + + break; + case EDJE_STATE_PARAM_MAP_ROT_X: + CHKPARAM(3); + + GETFLOAT_T(rp->custom->description->map.rot.x, params[3]); + + break; + case EDJE_STATE_PARAM_MAP_ROT_Y: + CHKPARAM(3); + + GETFLOAT_T(rp->custom->description->map.rot.y, params[3]); + + break; + case EDJE_STATE_PARAM_MAP_ROT_Z: + CHKPARAM(3); + + GETFLOAT_T(rp->custom->description->map.rot.z, params[3]); + + break; + case EDJE_STATE_PARAM_MAP_BACK_CULL: + CHKPARAM(3); + + GETINT(rp->custom->description->map.backcull, params[3]); + + break; + case EDJE_STATE_PARAM_MAP_PERSP_ON: + CHKPARAM(3); + + GETINT(rp->custom->description->map.persp_on, params[3]); + + break; + case EDJE_STATE_PARAM_PERSP_ZPLANE: + CHKPARAM(3); + + GETINT(rp->custom->description->persp.zplane, params[3]); + + break; + case EDJE_STATE_PARAM_PERSP_FOCAL: + CHKPARAM(3); + + GETINT(rp->custom->description->persp.focal, params[3]); + + break; default: break; } diff --git a/src/lib/edje_private.h b/src/lib/edje_private.h index e72886b..e9ad5aa 100644 --- a/src/lib/edje_private.h +++ b/src/lib/edje_private.h @@ -228,39 +228,50 @@ typedef struct _Edje_Patterns Edje_Patterns; #define EDJE_VAR_MAGIC_BASE 0x12fe84ba -#define EDJE_STATE_PARAM_NONE 0 -#define EDJE_STATE_PARAM_ALIGNMENT 1 -#define EDJE_STATE_PARAM_MIN 2 -#define EDJE_STATE_PARAM_MAX 3 -#define EDJE_STATE_PARAM_STEP 4 -#define EDJE_STATE_PARAM_ASPECT 5 -#define EDJE_STATE_PARAM_ASPECT_PREF 6 -#define EDJE_STATE_PARAM_COLOR 7 -#define EDJE_STATE_PARAM_COLOR2 8 -#define EDJE_STATE_PARAM_COLOR3 9 -#define EDJE_STATE_PARAM_COLOR_CLASS 10 -#define EDJE_STATE_PARAM_REL1 11 -#define EDJE_STATE_PARAM_REL1_TO 12 -#define EDJE_STATE_PARAM_REL1_OFFSET 13 -#define EDJE_STATE_PARAM_REL2 14 -#define EDJE_STATE_PARAM_REL2_TO 15 -#define EDJE_STATE_PARAM_REL2_OFFSET 16 -#define EDJE_STATE_PARAM_IMAGE 17 -#define EDJE_STATE_PARAM_BORDER 18 -#define EDJE_STATE_PARAM_FILL_SMOOTH 19 -#define EDJE_STATE_PARAM_FILL_POS 20 -#define EDJE_STATE_PARAM_FILL_SIZE 21 -#define EDJE_STATE_PARAM_TEXT 22 -#define EDJE_STATE_PARAM_TEXT_CLASS 23 -#define EDJE_STATE_PARAM_TEXT_FONT 24 -#define EDJE_STATE_PARAM_TEXT_STYLE 25 -#define EDJE_STATE_PARAM_TEXT_SIZE 26 -#define EDJE_STATE_PARAM_TEXT_FIT 27 -#define EDJE_STATE_PARAM_TEXT_MIN 28 -#define EDJE_STATE_PARAM_TEXT_MAX 29 -#define EDJE_STATE_PARAM_TEXT_ALIGN 30 -#define EDJE_STATE_PARAM_VISIBLE 31 -#define EDJE_STATE_PARAM_LAST 32 +#define EDJE_STATE_PARAM_NONE 0 +#define EDJE_STATE_PARAM_ALIGNMENT 1 +#define EDJE_STATE_PARAM_MIN 2 +#define EDJE_STATE_PARAM_MAX 3 +#define EDJE_STATE_PARAM_STEP 4 +#define EDJE_STATE_PARAM_ASPECT 5 +#define EDJE_STATE_PARAM_ASPECT_PREF 6 +#define EDJE_STATE_PARAM_COLOR 7 +#define EDJE_STATE_PARAM_COLOR2 8 +#define EDJE_STATE_PARAM_COLOR3 9 +#define EDJE_STATE_PARAM_COLOR_CLASS 10 +#define EDJE_STATE_PARAM_REL1 11 +#define EDJE_STATE_PARAM_REL1_TO 12 +#define EDJE_STATE_PARAM_REL1_OFFSET 13 +#define EDJE_STATE_PARAM_REL2 14 +#define EDJE_STATE_PARAM_REL2_TO 15 +#define EDJE_STATE_PARAM_REL2_OFFSET 16 +#define EDJE_STATE_PARAM_IMAGE 17 +#define EDJE_STATE_PARAM_BORDER 18 +#define EDJE_STATE_PARAM_FILL_SMOOTH 19 +#define EDJE_STATE_PARAM_FILL_POS 20 +#define EDJE_STATE_PARAM_FILL_SIZE 21 +#define EDJE_STATE_PARAM_TEXT 22 +#define EDJE_STATE_PARAM_TEXT_CLASS 23 +#define EDJE_STATE_PARAM_TEXT_FONT 24 +#define EDJE_STATE_PARAM_TEXT_STYLE 25 +#define EDJE_STATE_PARAM_TEXT_SIZE 26 +#define EDJE_STATE_PARAM_TEXT_FIT 27 +#define EDJE_STATE_PARAM_TEXT_MIN 28 +#define EDJE_STATE_PARAM_TEXT_MAX 29 +#define EDJE_STATE_PARAM_TEXT_ALIGN 30 +#define EDJE_STATE_PARAM_VISIBLE 31 +#define EDJE_STATE_PARAM_MAP_OM 32 +#define EDJE_STATE_PARAM_MAP_PERSP 33 +#define EDJE_STATE_PARAM_MAP_LIGNT 34 +#define EDJE_STATE_PARAM_MAP_ROT_CENTER 35 +#define EDJE_STATE_PARAM_MAP_ROT_X 36 +#define EDJE_STATE_PARAM_MAP_ROT_Y 37 +#define EDJE_STATE_PARAM_MAP_ROT_Z 38 +#define EDJE_STATE_PARAM_MAP_BACK_CULL 39 +#define EDJE_STATE_PARAM_MAP_PERSP_ON 40 +#define EDJE_STATE_PARAM_PERSP_ZPLANE 41 +#define EDJE_STATE_PARAM_PERSP_FOCAL 42 +#define EDJE_STATE_PARAM_LAST 43 #define EDJE_ENTRY_EDIT_MODE_NONE 0 #define EDJE_ENTRY_EDIT_MODE_SELECTABLE 1 -- 2.7.4