summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_embryo.c
diff options
context:
space:
mode:
authorJee-Yong Um <jc9.um@samsung.com>2016-03-04 15:53:08 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-03-04 16:09:51 -0800
commit4ed9b83258eeb9872f5b6ff972d63cbd2a166b2c (patch)
tree4c2b49fe20a97073e911760f95bbeb456080c704 /src/lib/edje/edje_embryo.c
parentd32aa995e021c49ed585329a3ed9b9ca0f4a2586 (diff)
edje_embryo: add box attributes support to set_state_val()
Summary: Add box attributes support to set_state_val(). Reviewers: raster, cedric Reviewed By: cedric Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D3734 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/edje/edje_embryo.c')
-rw-r--r--src/lib/edje/edje_embryo.c64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c
index 41e035483f..9c5c1246c0 100644
--- a/src/lib/edje/edje_embryo.c
+++ b/src/lib/edje/edje_embryo.c
@@ -169,6 +169,11 @@
169 * map_persp_on[on] 169 * map_persp_on[on]
170 * persp_zplane[z] 170 * persp_zplane[z]
171 * persp_focal[z] 171 * persp_focal[z]
172 * box[layout]
173 * box[fallback_layout]
174 * box[Float:align_x, Float:align_y]
175 * box[padding_x, padding_y]
176 * box[min_x, min_y]
172 * 177 *
173 * ** part_id and program_id need to be able to be "found" from strings 178 * ** part_id and program_id need to be able to be "found" from strings
174 * 179 *
@@ -2716,6 +2721,65 @@ _edje_embryo_fn_set_state_val(Embryo_Program *ep, Embryo_Cell *params)
2716 break; 2721 break;
2717 } 2722 }
2718 2723
2724 case EDJE_STATE_PARAM_BOX_LAYOUT:
2725 {
2726 Edje_Part_Description_Box *box;
2727 if ((rp->part->type != EDJE_PART_TYPE_BOX)) return 0;
2728 CHKPARAM(3);
2729
2730 GETSTR(s, params[3]);
2731 s = strdup(s);
2732
2733 box = (Edje_Part_Description_Box *)rp->custom->description;
2734 box->box.layout = s;
2735 }
2736
2737 case EDJE_STATE_PARAM_BOX_FALLBACK_LAYOUT:
2738 {
2739 Edje_Part_Description_Box *box;
2740 if ((rp->part->type != EDJE_PART_TYPE_BOX)) return 0;
2741 CHKPARAM(3);
2742
2743 GETSTR(s, params[3]);
2744 s = strdup(s);
2745
2746 box = (Edje_Part_Description_Box *)rp->custom->description;
2747 box->box.alt_layout = s;
2748 }
2749
2750 case EDJE_STATE_PARAM_BOX_ALIGN:
2751 {
2752 Edje_Part_Description_Box *box;
2753 if ((rp->part->type != EDJE_PART_TYPE_BOX)) return 0;
2754 CHKPARAM(4);
2755
2756 box = (Edje_Part_Description_Box *)rp->custom->description;
2757 GETFLOAT_T(box->box.align.x, params[3]);
2758 GETFLOAT_T(box->box.align.y, params[4]);
2759 }
2760
2761 case EDJE_STATE_PARAM_BOX_PADDING:
2762 {
2763 Edje_Part_Description_Box *box;
2764 if ((rp->part->type != EDJE_PART_TYPE_BOX)) return 0;
2765 CHKPARAM(4);
2766
2767 box = (Edje_Part_Description_Box *)rp->custom->description;
2768 GETINT(box->box.padding.x, params[3]);
2769 GETINT(box->box.padding.y, params[4]);
2770 }
2771
2772 case EDJE_STATE_PARAM_BOX_MIN:
2773 {
2774 Edje_Part_Description_Box *box;
2775 if ((rp->part->type != EDJE_PART_TYPE_BOX)) return 0;
2776 CHKPARAM(4);
2777
2778 box = (Edje_Part_Description_Box *)rp->custom->description;
2779 GETINT(box->box.min.h, params[3]);
2780 GETINT(box->box.min.v, params[4]);
2781 }
2782
2719#ifdef HAVE_EPHYSICS 2783#ifdef HAVE_EPHYSICS
2720 case EDJE_STATE_PARAM_PHYSICS_MASS: 2784 case EDJE_STATE_PARAM_PHYSICS_MASS:
2721 CHKPARAM(3); 2785 CHKPARAM(3);