edje: support to get_state_val of map and perspective
authorBruno Dilly <bdilly@profusion.mobi>
Fri, 7 Dec 2012 18:44:24 +0000 (18:44 +0000)
committerBruno Dilly <bdilly@profusion.mobi>
Fri, 7 Dec 2012 18:44:24 +0000 (18:44 +0000)
 stuff

Don't know why, it was supporting only set_state_val these parameters.
Also, fix a LIGNT->LIGHT typo

SVN revision: 80485

legacy/edje/src/lib/edje_embryo.c
legacy/edje/src/lib/edje_private.h

index 15722d2..1ea31ab 100644 (file)
@@ -2204,7 +2204,7 @@ _edje_embryo_fn_set_state_val(Embryo_Program *ep, Embryo_Cell *params)
         GETINT(rp->custom->description->map.id_persp, params[3]);
         
         break;
-      case EDJE_STATE_PARAM_MAP_LIGNT:
+      case EDJE_STATE_PARAM_MAP_LIGHT:
         CHKPARAM(3);
         
         GETINT(rp->custom->description->map.id_light, params[3]);
@@ -2661,6 +2661,72 @@ _edje_embryo_fn_get_state_val(Embryo_Program *ep, Embryo_Cell *params)
         SETINT(rp->custom->description->visible, params[3]);
 
         break;
+      case EDJE_STATE_PARAM_MAP_ON:
+        CHKPARAM(3);
+
+        SETINT(rp->custom->description->map.on, params[3]);
+
+        break;
+      case EDJE_STATE_PARAM_MAP_PERSP:
+        CHKPARAM(3);
+
+        SETINT(rp->custom->description->map.id_persp, params[3]);
+
+        break;
+      case EDJE_STATE_PARAM_MAP_LIGHT:
+        CHKPARAM(3);
+
+        SETINT(rp->custom->description->map.id_light, params[3]);
+
+        break;
+      case EDJE_STATE_PARAM_MAP_ROT_CENTER:
+        CHKPARAM(3);
+
+        SETINT(rp->custom->description->map.rot.id_center, params[3]);
+
+        break;
+      case EDJE_STATE_PARAM_MAP_ROT_X:
+        CHKPARAM(3);
+
+        SETFLOAT_T(rp->custom->description->map.rot.x, params[3]);
+
+        break;
+      case EDJE_STATE_PARAM_MAP_ROT_Y:
+        CHKPARAM(3);
+
+        SETFLOAT_T(rp->custom->description->map.rot.y, params[3]);
+
+        break;
+      case EDJE_STATE_PARAM_MAP_ROT_Z:
+        CHKPARAM(3);
+
+        SETFLOAT_T(rp->custom->description->map.rot.z, params[3]);
+
+        break;
+      case EDJE_STATE_PARAM_MAP_BACK_CULL:
+        CHKPARAM(3);
+
+        SETINT(rp->custom->description->map.backcull, params[3]);
+
+        break;
+      case EDJE_STATE_PARAM_MAP_PERSP_ON:
+        CHKPARAM(3);
+
+        SETINT(rp->custom->description->map.persp_on, params[3]);
+
+        break;
+      case EDJE_STATE_PARAM_PERSP_ZPLANE:
+        CHKPARAM(3);
+
+        SETINT(rp->custom->description->persp.zplane, params[3]);
+
+        break;
+      case EDJE_STATE_PARAM_PERSP_FOCAL:
+        CHKPARAM(3);
+
+        SETINT(rp->custom->description->persp.focal, params[3]);
+
+        break;
 #ifdef HAVE_EPHYSICS
       case EDJE_STATE_PARAM_PHYSICS_MASS:
         CHKPARAM(3);
index d67e479..245fe09 100644 (file)
@@ -405,7 +405,7 @@ typedef struct _Edje_Markup_Filter_Callback Edje_Markup_Filter_Callback;
 #define EDJE_STATE_PARAM_VISIBLE        31
 #define EDJE_STATE_PARAM_MAP_ON         32
 #define EDJE_STATE_PARAM_MAP_PERSP      33
-#define EDJE_STATE_PARAM_MAP_LIGNT      34
+#define EDJE_STATE_PARAM_MAP_LIGHT      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