Re: [E-devel] patch for edje program filter on source state

2010-02-01 Thread Gustavo Sverzut Barbieri
On Mon, Feb 1, 2010 at 2:19 PM, tristan  wrote:
> Hello,
>
> I was having trouble with the EDC programs that were missing a filter for
> the current state of source part. This allow for instance to make a toggle
> button without using any C code.
>
> I made a patch that add an optional parameter to the "source" keyword of an
> EDC program : the part state. If this second parameter is omitted, then it
> behave exactly the same as before, and therefore stay compatible with all
> other EDC files.
>
> Here is an example:
> program {
>  name: "set_on"
>  signal: "mouse,up,*";
>  source: "button" "is_off"
>  action: STATE_SET "is_on" 0.0;
>  target: "button";
> }
> program {
>  name: "set_off"
>  signal: "mouse,up,*";
>  source: "button" "is_on"
>  action: STATE_SET "is_off" 0.0;
>  target: "button";
> }

dunno if this is good... and you don't need C code to do it, you can
use embryo or lua.

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] patch for edje program filter on source state

2010-02-02 Thread tristan
> dunno if this is good... and you don't need C code to do it, you can
> use embryo or lua.
>

I saw that you can use embryo, but I felt like this was missing since this
little modification allow you to make EDC programs become so much more
intelligent.

About the check, this may require some optimizations because for now, it
only strcmp the current state and the required state.


>
> --
> Gustavo Sverzut Barbieri
> http://profusion.mobi embedded systems
> --
> MSN: barbi...@gmail.com
> Skype: gsbarbieri
> Mobile: +55 (19) 9225-2202
>



-- 
618FE3EF
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] patch for edje program filter on source state

2010-02-02 Thread Gustavo Sverzut Barbieri
On Tue, Feb 2, 2010 at 5:11 PM, tristan  wrote:
>
>
>>
>> dunno if this is good... and you don't need C code to do it, you can
>> use embryo or lua.
>
> I saw that you can use embryo, but I felt like this was missing since this
> little modification allow you to make EDC programs become so much more
> intelligent.
> About the check, this may require some optimizations because for now, it
> only strcmp the current state and the required state.

What kind of optimization? Or you mean doing glob (using wildcards)?


-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] patch for edje program filter on source state

2010-02-02 Thread tristan
Yes, I mean glob, like in source partnames.

2010/2/2 Gustavo Sverzut Barbieri 

> On Tue, Feb 2, 2010 at 5:11 PM, tristan  wrote:
> >
> >
> >>
> >> dunno if this is good... and you don't need C code to do it, you can
> >> use embryo or lua.
> >
> > I saw that you can use embryo, but I felt like this was missing since
> this
> > little modification allow you to make EDC programs become so much more
> > intelligent.
> > About the check, this may require some optimizations because for now, it
> > only strcmp the current state and the required state.
>
> What kind of optimization? Or you mean doing glob (using wildcards)?
>
>
> --
> Gustavo Sverzut Barbieri
> http://profusion.mobi embedded systems
> --
> MSN: barbi...@gmail.com
> Skype: gsbarbieri
> Mobile: +55 (19) 9225-2202
>



-- 
618FE3EF
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] patch for edje program filter on source state

2010-02-02 Thread Gustavo Sverzut Barbieri
On Tue, Feb 2, 2010 at 8:06 PM, tristan  wrote:
> Yes, I mean glob, like in source partnames.

it is possible to expose this using embryo or lua, and this patch is
more useful I'd say.

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] patch for edje program filter on source state

2010-02-05 Thread Cedric BAIL
On Mon, Feb 1, 2010 at 5:54 PM, Gustavo Sverzut Barbieri
 wrote:
> On Mon, Feb 1, 2010 at 2:19 PM, tristan  wrote:
>> Hello,
>>
>> I was having trouble with the EDC programs that were missing a filter for
>> the current state of source part. This allow for instance to make a toggle
>> button without using any C code.
>>
>> I made a patch that add an optional parameter to the "source" keyword of an
>> EDC program : the part state. If this second parameter is omitted, then it
>> behave exactly the same as before, and therefore stay compatible with all
>> other EDC files.
>>
>> Here is an example:
>> program {
>>  name: "set_on"
>>  signal: "mouse,up,*";
>>  source: "button" "is_off"
>>  action: STATE_SET "is_on" 0.0;
>>  target: "button";
>> }
>> program {
>>  name: "set_off"
>>  signal: "mouse,up,*";
>>  source: "button" "is_on"
>>  action: STATE_SET "is_off" 0.0;
>>  target: "button";
>> }
>
> dunno if this is good... and you don't need C code to do it, you can
> use embryo or lua.

Yes, you can, but it's lighter in my opinion if we could just do that
this way. Reading from the patch, doesn't sound like it could break
older edje and provide a nice feature for people that don't like to
start an script just to test a state.
-- 
Cedric BAIL

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] patch for edje program filter on source state

2010-02-05 Thread tristan
Here is a new patch that replace the strcmp by == (thank you cedric), but
that might not work with editje.


2010/2/5 Cedric BAIL 

> On Mon, Feb 1, 2010 at 5:54 PM, Gustavo Sverzut Barbieri
>  wrote:
> > On Mon, Feb 1, 2010 at 2:19 PM, tristan  wrote:
> >> Hello,
> >>
> >> I was having trouble with the EDC programs that were missing a filter
> for
> >> the current state of source part. This allow for instance to make a
> toggle
> >> button without using any C code.
> >>
> >> I made a patch that add an optional parameter to the "source" keyword of
> an
> >> EDC program : the part state. If this second parameter is omitted, then
> it
> >> behave exactly the same as before, and therefore stay compatible with
> all
> >> other EDC files.
> >>
> >> Here is an example:
> >> program {
> >>  name: "set_on"
> >>  signal: "mouse,up,*";
> >>  source: "button" "is_off"
> >>  action: STATE_SET "is_on" 0.0;
> >>  target: "button";
> >> }
> >> program {
> >>  name: "set_off"
> >>  signal: "mouse,up,*";
> >>  source: "button" "is_on"
> >>  action: STATE_SET "is_off" 0.0;
> >>  target: "button";
> >> }
> >
> > dunno if this is good... and you don't need C code to do it, you can
> > use embryo or lua.
>
> Yes, you can, but it's lighter in my opinion if we could just do that
> this way. Reading from the patch, doesn't sound like it could break
> older edje and provide a nice feature for people that don't like to
> start an script just to test a state.
> --
> Cedric BAIL
>



-- 
618FE3EF
diff --git a/src/bin/edje_cc_handlers.c b/src/bin/edje_cc_handlers.c
index ca1cb45..4872923 100644
--- a/src/bin/edje_cc_handlers.c
+++ b/src/bin/edje_cc_handlers.c
@@ -5697,7 +5697,7 @@ st_collections_group_parts_part_description_params_string(void)
   program {
  name: "programname";
  signal: "signalname";
- source: "partname";
+ source: "partname" "statename";
  in: 0.3 0.0;
  action: STATE_SET "statename" state_value;
  transition: LINEAR 0.5;
@@ -5798,11 +5798,13 @@ st_collections_group_programs_program_signal(void)
 @property
 source
 @parameters
-[source name]
+[source name state]
 @effect
 Source of accepted signal. Sources may be globbed, but only one source
 keyword per program may be used. ex:source: "button-*"; (Signals from
-any part or program named "button-*" are accepted)
+any part or program named "button-*" are accepted).
+	The state part is optional and allow you to accept signal only if  is
+	in its state . No state set means all states.
 @endproperty
 */
 static void
@@ -5811,11 +5813,17 @@ st_collections_group_programs_program_source(void)
Edje_Part_Collection *pc;
Edje_Program *ep;
 
-   check_arg_count(1);
+   check_min_arg_count(1);
 
pc = eina_list_data_get(eina_list_last(edje_collections));
ep = eina_list_data_get(eina_list_last(pc->programs));
ep->source = parse_str(0);
+
+   if (is_param(1)) {
+	   ep->source_state = parse_str(1);
+   } else {
+	   ep->source_state = NULL;
+   }
 }
 
 /**
diff --git a/src/lib/edje_data.c b/src/lib/edje_data.c
index 11c4e9f..d4c77ca 100644
--- a/src/lib/edje_data.c
+++ b/src/lib/edje_data.c
@@ -214,6 +214,7 @@ _edje_edd_init(void)
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "name", name, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "signal", signal, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "source", source, EET_T_STRING);
+   EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "source_state", source_state, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "in.from", in.from, EET_T_DOUBLE);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "in.range", in.range, EET_T_DOUBLE);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "action", action, EET_T_INT);
diff --git a/src/lib/edje_edit.c b/src/lib/edje_edit.c
index 36a34f0..a52df05 100644
--- a/src/lib/edje_edit.c
+++ b/src/lib/edje_edit.c
@@ -4762,6 +4762,7 @@ edje_edit_program_add(Evas_Object *obj, const char *name)
epr->name = eina_stringshare_add(name);
epr->signal = NULL;
epr->source = NULL;
+   epr->source_state = NULL;
epr->in.from = 0.0;
epr->in.range = 0.0;
epr->action = 0;
@@ -4815,6 +4816,7 @@ edje_edit_program_del(Evas_Object *obj, const char *prog)
_edje_if_string_free(ed, epr->name);
_edje_if_string_free(ed, epr->signal);
_edje_if_string_free(ed, epr->source);
+   _edje_if_string_free(ed, epr->source_state);
_edje_if_string_free(ed, epr->state);
_edje_if_string_free(ed, epr->state2);
 
@@ -4981,6 +4983,32 @@ edje_edit_program_source_set(Evas_Object *obj, const char *prog, const char *sou
 }
 
 EAPI const char *
+edje_edit_

Re: [E-devel] patch for edje program filter on source state

2010-02-07 Thread The Rasterman
On Mon, 1 Feb 2010 14:54:19 -0200 Gustavo Sverzut Barbieri
 said:

i agreee - he syntax isnt good. if its a filter - make it

program {
  name: "w";
  signal: "x";
  source: "y";
  filter_state: "z";

if anything... :) how about that?

> On Mon, Feb 1, 2010 at 2:19 PM, tristan  wrote:
> > Hello,
> >
> > I was having trouble with the EDC programs that were missing a filter for
> > the current state of source part. This allow for instance to make a toggle
> > button without using any C code.
> >
> > I made a patch that add an optional parameter to the "source" keyword of an
> > EDC program : the part state. If this second parameter is omitted, then it
> > behave exactly the same as before, and therefore stay compatible with all
> > other EDC files.
> >
> > Here is an example:
> > program {
> >  name: "set_on"
> >  signal: "mouse,up,*";
> >  source: "button" "is_off"
> >  action: STATE_SET "is_on" 0.0;
> >  target: "button";
> > }
> > program {
> >  name: "set_off"
> >  signal: "mouse,up,*";
> >  source: "button" "is_on"
> >  action: STATE_SET "is_off" 0.0;
> >  target: "button";
> > }
> 
> dunno if this is good... and you don't need C code to do it, you can
> use embryo or lua.
> 
> -- 
> Gustavo Sverzut Barbieri
> http://profusion.mobi embedded systems
> --
> MSN: barbi...@gmail.com
> Skype: gsbarbieri
> Mobile: +55 (19) 9225-2202
> 
> --
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] patch for edje program filter on source state

2010-02-08 Thread tristan
Ok, I followed your recommandations. Here is a new patch, with filter state
using its own keyword.

2010/2/7 Carsten Haitzler 

> On Mon, 1 Feb 2010 14:54:19 -0200 Gustavo Sverzut Barbieri
>  said:
>
> i agreee - he syntax isnt good. if its a filter - make it
>
> program {
>  name: "w";
>  signal: "x";
>  source: "y";
>  filter_state: "z";
>
> if anything... :) how about that?
>
> > On Mon, Feb 1, 2010 at 2:19 PM, tristan  wrote:
> > > Hello,
> > >
> > > I was having trouble with the EDC programs that were missing a filter
> for
> > > the current state of source part. This allow for instance to make a
> toggle
> > > button without using any C code.
> > >
> > > I made a patch that add an optional parameter to the "source" keyword
> of an
> > > EDC program : the part state. If this second parameter is omitted, then
> it
> > > behave exactly the same as before, and therefore stay compatible with
> all
> > > other EDC files.
> > >
> > > Here is an example:
> > > program {
> > >  name: "set_on"
> > >  signal: "mouse,up,*";
> > >  source: "button" "is_off"
> > >  action: STATE_SET "is_on" 0.0;
> > >  target: "button";
> > > }
> > > program {
> > >  name: "set_off"
> > >  signal: "mouse,up,*";
> > >  source: "button" "is_on"
> > >  action: STATE_SET "is_off" 0.0;
> > >  target: "button";
> > > }
> >
> > dunno if this is good... and you don't need C code to do it, you can
> > use embryo or lua.
> >
> > --
> > Gustavo Sverzut Barbieri
> > http://profusion.mobi embedded systems
> > --
> > MSN: barbi...@gmail.com
> > Skype: gsbarbieri
> > Mobile: +55 (19) 9225-2202
> >
> >
> --
> > The Planet: dedicated and managed hosting, cloud storage, colocation
> > Stay online with enterprise data centers and the best network in the
> business
> > Choose flexible plans and management services without long-term contracts
> > Personal 24x7 support from experience hosting pros just a phone call
> away.
> > http://p.sf.net/sfu/theplanet-com
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
> --
> - Codito, ergo sum - "I code, therefore I am" --
> The Rasterman (Carsten Haitzler)ras...@rasterman.com
>
>


-- 
618FE3EF
diff --git a/src/bin/edje_cc_handlers.c b/src/bin/edje_cc_handlers.c
index ca1cb45..624af10 100644
--- a/src/bin/edje_cc_handlers.c
+++ b/src/bin/edje_cc_handlers.c
@@ -210,7 +210,8 @@ static void st_collections_group_parts_part_description_params_double(void);
 static void st_collections_group_programs_program_name(void);
 static void st_collections_group_parts_part_description_params_string(void);
 static void st_collections_group_programs_program_signal(void);
- static void st_collections_group_programs_program_source(void);
+static void st_collections_group_programs_program_source(void);
+static void st_collections_group_programs_program_filter_state(void);
 static void st_collections_group_programs_program_in(void);
 static void st_collections_group_programs_program_action(void);
 static void st_collections_group_programs_program_transition(void);
@@ -477,6 +478,7 @@ New_Statement_Handler statement_handlers[] =
  {"collections.group.parts.program.name", st_collections_group_programs_program_name}, /* dup */
  {"collections.group.parts.program.signal", st_collections_group_programs_program_signal}, /* dup */
  {"collections.group.parts.program.source", st_collections_group_programs_program_source}, /* dup */
+ {"collections.group.parts.program.filter_state", st_collections_group_programs_program_filter_state}, /* dup */
  {"collections.group.parts.program.in", st_collections_group_programs_program_in}, /* dup */
  {"collections.group.parts.program.action", st_collections_group_programs_program_action}, /* dup */
  {"collections.group.parts.program.transition", st_collections_group_programs_program_transition}, /* dup */
@@ -485,6 +487,7 @@ New_Statement_Handler statement_handlers[] =
  {"collections.group.program.name", st_collections_group_programs_program_name}, /* dup */
  {"collections.group.program.signal", st_collections_group_programs_program_signal}, /* dup */
  {"collections.group.program.source", st_collections_group_programs_program_source}, /* dup */
+ {"collections.group.program.filter_state", st_collections_group_programs_program_filter_state}, /* dup */
  {"collections.group.program.in", st_collections_group_programs_program_in}, /* dup */
  {"collections.group.program.action", st_collections_group_programs_program_action}, /* dup */
  {"collections.group.program.transition", st_collections_group_programs_program_transition}, /* dup */
@@ -493,6 +496,7 @@ New_Statement_Handler statement_handlers[] =
  {"collections.group.programs.program.name", st_co

Re: [E-devel] patch for edje program filter on source state

2010-02-10 Thread Cedric BAIL
On Mon, Feb 8, 2010 at 11:20 AM, tristan  wrote:
> Ok, I followed your recommandations. Here is a new patch, with filter state
> using its own keyword.

in svn, with few modification.

-- 
Cedric BAIL

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] patch for edje program filter on source state

2010-02-18 Thread tristan
I modified the previous patch to use keyword "filter" instead of
"filter_state". It can take up to 2 arguments :

filter: partname statename;

- If both are present: it will check if state of partname matches statename.
If partname doesn't exist, program won't be called.
- if only statename is present: it will uses the source part as part to
check state from.


2010/2/10 Cedric BAIL 

> On Mon, Feb 8, 2010 at 11:20 AM, tristan  wrote:
> > Ok, I followed your recommandations. Here is a new patch, with filter
> state
> > using its own keyword.
>
> in svn, with few modification.
>
> --
> Cedric BAIL
>



-- 
618FE3EF
diff --git a/src/bin/edje_cc_handlers.c b/src/bin/edje_cc_handlers.c
index ca1cb45..2e3945f 100644
--- a/src/bin/edje_cc_handlers.c
+++ b/src/bin/edje_cc_handlers.c
@@ -210,7 +210,8 @@ static void st_collections_group_parts_part_description_params_double(void);
 static void st_collections_group_programs_program_name(void);
 static void st_collections_group_parts_part_description_params_string(void);
 static void st_collections_group_programs_program_signal(void);
- static void st_collections_group_programs_program_source(void);
+static void st_collections_group_programs_program_source(void);
+static void st_collections_group_programs_program_filter(void);
 static void st_collections_group_programs_program_in(void);
 static void st_collections_group_programs_program_action(void);
 static void st_collections_group_programs_program_transition(void);
@@ -477,6 +478,7 @@ New_Statement_Handler statement_handlers[] =
  {"collections.group.parts.program.name", st_collections_group_programs_program_name}, /* dup */
  {"collections.group.parts.program.signal", st_collections_group_programs_program_signal}, /* dup */
  {"collections.group.parts.program.source", st_collections_group_programs_program_source}, /* dup */
+ {"collections.group.parts.program.filter", st_collections_group_programs_program_filter}, /* dup */
  {"collections.group.parts.program.in", st_collections_group_programs_program_in}, /* dup */
  {"collections.group.parts.program.action", st_collections_group_programs_program_action}, /* dup */
  {"collections.group.parts.program.transition", st_collections_group_programs_program_transition}, /* dup */
@@ -485,6 +487,7 @@ New_Statement_Handler statement_handlers[] =
  {"collections.group.program.name", st_collections_group_programs_program_name}, /* dup */
  {"collections.group.program.signal", st_collections_group_programs_program_signal}, /* dup */
  {"collections.group.program.source", st_collections_group_programs_program_source}, /* dup */
+ {"collections.group.program.filter", st_collections_group_programs_program_filter}, /* dup */
  {"collections.group.program.in", st_collections_group_programs_program_in}, /* dup */
  {"collections.group.program.action", st_collections_group_programs_program_action}, /* dup */
  {"collections.group.program.transition", st_collections_group_programs_program_transition}, /* dup */
@@ -493,6 +496,7 @@ New_Statement_Handler statement_handlers[] =
  {"collections.group.programs.program.name", st_collections_group_programs_program_name},
  {"collections.group.programs.program.signal", st_collections_group_programs_program_signal},
  {"collections.group.programs.program.source", st_collections_group_programs_program_source},
+ {"collections.group.programs.program.filter", st_collections_group_programs_program_filter}, /* dup */
  {"collections.group.programs.program.in", st_collections_group_programs_program_in},
  {"collections.group.programs.program.action", st_collections_group_programs_program_action},
  {"collections.group.programs.program.transition", st_collections_group_programs_program_transition},
@@ -5698,6 +5702,7 @@ st_collections_group_parts_part_description_params_string(void)
  name: "programname";
  signal: "signalname";
  source: "partname";
+ filter: "partname" "statename";
  in: 0.3 0.0;
  action: STATE_SET "statename" state_value;
  transition: LINEAR 0.5;
@@ -5802,7 +5807,7 @@ st_collections_group_programs_program_signal(void)
 @effect
 Source of accepted signal. Sources may be globbed, but only one source
 keyword per program may be used. ex:source: "button-*"; (Signals from
-any part or program named "button-*" are accepted)
+any part or program named "button-*" are accepted).
 @endproperty
 */
 static void
@@ -5821,6 +5826,37 @@ st_collections_group_programs_program_source(void)
 /**
 @page edcref
 @property
+filter
+@parameters
+[filter part state]
+@effect
+The part [part] should be in state [state] for the signal to be accepted. Only one source state
+keyword per program may be used. ex:state: "button" "default"; (Signals a

Re: [E-devel] patch for edje program filter on source state

2010-02-22 Thread Cedric BAIL
On Thu, Feb 18, 2010 at 10:29 AM, tristan  wrote:
> I modified the previous patch to use keyword "filter" instead of
> "filter_state". It can take up to 2 arguments :
> filter: partname statename;
> - If both are present: it will check if state of partname matches statename.
> If partname doesn't exist, program won't be called.
> - if only statename is present: it will uses the source part as part to
> check state from.

In svn with little change.
-- 
Cedric BAIL

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel