forked from enlightenment/efl
edje_cc now supports targets for SIGNAL_EMIT actions
this is much more intuitive than somehow knowing you're supposed to add a ':' between part:signal @feature
This commit is contained in:
parent
6b712f6f02
commit
c8cc776fb1
|
@ -10374,6 +10374,7 @@ _program_target_add(char *name)
|
|||
data_queue_program_lookup(pc, name, &(et->id));
|
||||
break;
|
||||
case EDJE_ACTION_TYPE_STATE_SET:
|
||||
case EDJE_ACTION_TYPE_SIGNAL_EMIT:
|
||||
case EDJE_ACTION_TYPE_DRAG_VAL_SET:
|
||||
case EDJE_ACTION_TYPE_DRAG_VAL_STEP:
|
||||
case EDJE_ACTION_TYPE_DRAG_VAL_PAGE:
|
||||
|
@ -10408,7 +10409,7 @@ _program_target_add(char *name)
|
|||
[target]
|
||||
@effect
|
||||
Program or part on which the specified action acts. Multiple target
|
||||
keywords may be specified, one per target. SIGNAL_EMITs do not have
|
||||
keywords may be specified, one per target. SIGNAL_EMITs can have
|
||||
targets.
|
||||
@endproperty
|
||||
*/
|
||||
|
@ -10431,7 +10432,7 @@ st_collections_group_programs_program_target(void)
|
|||
@since 1.10
|
||||
@effect
|
||||
Programs or parts upon which the specified action will act. Multiple target
|
||||
or targets keywords may be specified. SIGNAL_EMITs do not have
|
||||
or targets keywords may be specified. SIGNAL_EMITs can have
|
||||
targets.
|
||||
@endproperty
|
||||
*/
|
||||
|
|
|
@ -628,7 +628,21 @@ low_mem_current:
|
|||
case EDJE_ACTION_TYPE_SIGNAL_EMIT:
|
||||
// _edje_emit(ed, "program,start", pr->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
_edje_emit(ed, pr->state, pr->state2);
|
||||
if (pr->targets)
|
||||
{
|
||||
EINA_LIST_FOREACH(pr->targets, l, pt)
|
||||
{
|
||||
char buf[1024];
|
||||
|
||||
if (pt->id < 0) continue;
|
||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||
if (!rp) continue;
|
||||
snprintf(buf, sizeof(buf), "%s:%s", rp->part->name, pr->state);
|
||||
_edje_emit(ed, buf, pr->state2);
|
||||
}
|
||||
}
|
||||
else
|
||||
_edje_emit(ed, pr->state, pr->state2);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
// _edje_emit(ed, "program,stop", pr->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
|
|
Loading…
Reference in New Issue