summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_embryo.c
diff options
context:
space:
mode:
authorJee-Yong Um <conr2d@gmail.com>2015-07-29 22:29:41 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-08-04 17:34:30 +0200
commit815ebc0b0eb513072ae35ac801304a3228f208e2 (patch)
tree6d02b4c04bd44682a6e15044a727cf7f7e591a62 /src/lib/edje/edje_embryo.c
parentbe33840b6b703f2b1e64c8e4788f968ad8c7f87b (diff)
edje_embryo: add methods to handle event flags.
Summary: Add embryo methods that change the state whether Edje_Part will handle Evas_Event or not. Reviewers: Hermet, woohyun, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2807 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.c98
1 files changed, 98 insertions, 0 deletions
diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c
index 2b1a666bf1..b272594489 100644
--- a/src/lib/edje/edje_embryo.c
+++ b/src/lib/edje/edje_embryo.c
@@ -184,6 +184,10 @@
184 * get_mouse_events(part_id) 184 * get_mouse_events(part_id)
185 * set_repeat_events(part_id, rep) 185 * set_repeat_events(part_id, rep)
186 * get_repeat_events(part_id) 186 * get_repeat_events(part_id)
187 * set_ignore_flags(part_id, flags)
188 * get_ignore_flags(part_id)
189 * set_mask_flags(part_id, flags)
190 * get_mask_flags(part_id)
187 * set_clip(part_id, clip_part_id) 191 * set_clip(part_id, clip_part_id)
188 * get_clip(part_id) 192 * get_clip(part_id)
189 * 193 *
@@ -3552,6 +3556,96 @@ _edje_embryo_fn_get_repeat_events(Embryo_Program *ep, Embryo_Cell *params)
3552 3556
3553} 3557}
3554 3558
3559/* set_ignore_flags(part_id, flags) */
3560static Embryo_Cell
3561_edje_embryo_fn_set_ignore_flags(Embryo_Program *ep, Embryo_Cell *params)
3562{
3563 int part_id = 0;
3564 Edje *ed;
3565 Edje_Real_Part *rp;
3566
3567 CHKPARAM(2);
3568
3569 part_id = params[1];
3570 if (part_id < 0) return 0;
3571
3572 ed = embryo_program_data_get(ep);
3573 rp = ed->table_parts[part_id % ed->table_parts_size];
3574
3575 if (rp)
3576 _edje_part_ignore_flags_set(ed, rp, params[2]);
3577
3578 return 0;
3579}
3580
3581/* get_ignore_flags(part_id) */
3582static Embryo_Cell
3583_edje_embryo_fn_get_ignore_flags(Embryo_Program *ep, Embryo_Cell *params)
3584{
3585 int part_id = 0;
3586 Edje *ed;
3587 Edje_Real_Part *rp;
3588
3589 CHKPARAM(1);
3590
3591 part_id = params[1];
3592 if (part_id < 0) return 0;
3593
3594 ed = embryo_program_data_get(ep);
3595 rp = ed->table_parts[part_id % ed->table_parts_size];
3596
3597 if (rp)
3598 return (Embryo_Cell)_edje_var_int_get(ed, (int)_edje_part_ignore_flags_get(ed, rp));
3599
3600 return 0;
3601
3602}
3603
3604/* set_mask_flags(part_id, flags) */
3605static Embryo_Cell
3606_edje_embryo_fn_set_mask_flags(Embryo_Program *ep, Embryo_Cell *params)
3607{
3608 int part_id = 0;
3609 Edje *ed;
3610 Edje_Real_Part *rp;
3611
3612 CHKPARAM(2);
3613
3614 part_id = params[1];
3615 if (part_id < 0) return 0;
3616
3617 ed = embryo_program_data_get(ep);
3618 rp = ed->table_parts[part_id % ed->table_parts_size];
3619
3620 if (rp)
3621 _edje_part_mask_flags_set(ed, rp, params[2]);
3622
3623 return 0;
3624}
3625
3626/* get_mask_flags(part_id) */
3627static Embryo_Cell
3628_edje_embryo_fn_get_mask_flags(Embryo_Program *ep, Embryo_Cell *params)
3629{
3630 int part_id = 0;
3631 Edje *ed;
3632 Edje_Real_Part *rp;
3633
3634 CHKPARAM(1);
3635
3636 part_id = params[1];
3637 if (part_id < 0) return 0;
3638
3639 ed = embryo_program_data_get(ep);
3640 rp = ed->table_parts[part_id % ed->table_parts_size];
3641
3642 if (rp)
3643 return (Embryo_Cell)_edje_var_int_get(ed, (int)_edje_part_mask_flags_get(ed, rp));
3644
3645 return 0;
3646
3647}
3648
3555/* part_swallow(part_id, group_name) */ 3649/* part_swallow(part_id, group_name) */
3556static Embryo_Cell 3650static Embryo_Cell
3557_edje_embryo_fn_part_swallow(Embryo_Program *ep, Embryo_Cell *params) 3651_edje_embryo_fn_part_swallow(Embryo_Program *ep, Embryo_Cell *params)
@@ -4285,6 +4379,10 @@ _edje_embryo_script_init(Edje_Part_Collection *edc)
4285 embryo_program_native_call_add(ep, "get_mouse_events", _edje_embryo_fn_get_mouse_events); 4379 embryo_program_native_call_add(ep, "get_mouse_events", _edje_embryo_fn_get_mouse_events);
4286 embryo_program_native_call_add(ep, "set_repeat_events", _edje_embryo_fn_set_repeat_events); 4380 embryo_program_native_call_add(ep, "set_repeat_events", _edje_embryo_fn_set_repeat_events);
4287 embryo_program_native_call_add(ep, "get_repeat_events", _edje_embryo_fn_get_repeat_events); 4381 embryo_program_native_call_add(ep, "get_repeat_events", _edje_embryo_fn_get_repeat_events);
4382 embryo_program_native_call_add(ep, "set_ignore_flags", _edje_embryo_fn_set_ignore_flags);
4383 embryo_program_native_call_add(ep, "get_ignore_flags", _edje_embryo_fn_get_ignore_flags);
4384 embryo_program_native_call_add(ep, "set_mask_flags", _edje_embryo_fn_set_mask_flags);
4385 embryo_program_native_call_add(ep, "get_mask_flags", _edje_embryo_fn_get_mask_flags);
4288 4386
4289 embryo_program_native_call_add(ep, "part_swallow", _edje_embryo_fn_part_swallow); 4387 embryo_program_native_call_add(ep, "part_swallow", _edje_embryo_fn_part_swallow);
4290 4388