summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_embryo.c
diff options
context:
space:
mode:
authorJinyong Park <j4939.park@samsung.com>2016-08-01 14:56:00 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-08-16 16:14:21 +0900
commit471a328ea0e5607f25391496b76aafedeb34a79f (patch)
tree7ee4d647c4e007feeeb582ac1803a0957e543da5 /src/lib/edje/edje_embryo.c
parent88a684e8005d08aba4c9ff25e4da11dcd89a87c0 (diff)
edje_embryo: add function to know swallow has object
Summary: Using edc script, there is no way to know evas object is set on swallow part or not. So, to know that, some elm widget send signal and save some information to edc variables when object is set on swallow part. I think it is helpful to make better edc script. @feature Reviewers: herb, cedric, raster, id213sin, jpeg Reviewed By: jpeg Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D4176
Diffstat (limited to 'src/lib/edje/edje_embryo.c')
-rw-r--r--src/lib/edje/edje_embryo.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c
index 1b899d71e9..d019f762f5 100644
--- a/src/lib/edje/edje_embryo.c
+++ b/src/lib/edje/edje_embryo.c
@@ -4391,6 +4391,30 @@ _edje_embryo_fn_physics_get_rotation(Embryo_Program *ep, Embryo_Cell *params)
4391 4391
4392#endif 4392#endif
4393 4393
4394/* swallow_has_content(part_id) */
4395static Embryo_Cell
4396_edje_embryo_fn_swallow_has_content(Embryo_Program *ep, Embryo_Cell *params)
4397{
4398 Edje *ed;
4399 int part_id = 0;
4400 Edje_Real_Part *rp;
4401
4402 CHKPARAM(1);
4403 ed = embryo_program_data_get(ep);
4404 part_id = params[1];
4405 if (part_id < 0) return 0;
4406 rp = ed->table_parts[part_id % ed->table_parts_size];
4407
4408 if ((!rp) ||
4409 (!rp->part) ||
4410 (rp->part->type != EDJE_PART_TYPE_SWALLOW) ||
4411 (!rp->typedata.swallow) ||
4412 (!rp->typedata.swallow->swallowed_object))
4413 return 0;
4414
4415 return 1;
4416}
4417
4394void 4418void
4395_edje_embryo_script_init(Edje_Part_Collection *edc) 4419_edje_embryo_script_init(Edje_Part_Collection *edc)
4396{ 4420{
@@ -4516,6 +4540,8 @@ _edje_embryo_script_init(Edje_Part_Collection *edc)
4516 embryo_program_native_call_add(ep, "physics_set_rotation", _edje_embryo_fn_physics_set_rotation); 4540 embryo_program_native_call_add(ep, "physics_set_rotation", _edje_embryo_fn_physics_set_rotation);
4517 embryo_program_native_call_add(ep, "physics_get_rotation", _edje_embryo_fn_physics_get_rotation); 4541 embryo_program_native_call_add(ep, "physics_get_rotation", _edje_embryo_fn_physics_get_rotation);
4518#endif 4542#endif
4543
4544 embryo_program_native_call_add(ep, "swallow_has_content", _edje_embryo_fn_swallow_has_content);
4519} 4545}
4520 4546
4521void 4547void