On Wednesday 08 February 2006 02:27, Ed Presutti wrote:

> I have no problem with using signals. I've already implemented it into
> the code that i'm working on. I was just curious if there was a faster
> way, but I do understand your point.

To further clarify, using signals instead of directly setting state means that 
you are specifying and interface to the the theme. When you want something to 
happen you just send a "do_this" signal, and leave it up to the theme to 
determine how this needs to happen. By not setting state directly, the themer 
can implement it however they want (for example, they may have a transition 
they want to happen, or several parts may need to change state). This allows 
that sort of flexibility.

>
> I'll look into that macro thing. Thx for the tip.

They're just c preprocessor macros. So, something like:

#define SET_STATE_PROG(SIGNAL,SOURCE,TARGET,STATE) \
program { \
  name: "prog_"SIGNAL"_"SOURCE"_"TARGET"_"STATE; \
  signal: SIGNAL; \
  source: SOURCE; \
  action: SET_STATE state 0.0; \
  target: TARGET; \
}

This isn't tested, and may have typos, but should give you the basic idea.
--
rephorm


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to