[prev in list] [next in list] [prev in thread] [next in thread] 

List:       irssi-dev
Subject:    Re: Questions for eventual Python module
From:       Timo Sirainen <tss () iki ! fi>
Date:       2002-08-27 13:10:52
[Download RAW message or body]

On Tue, Aug 27, 2002 at 02:51:27PM +0200, Christian Borup wrote:
> > Oh, and GLIB signals aren't powerful enough for irssi anyway. At least they
> > weren't in 1.2.x.
> 
> Not powerfull enough? How so?

There's only two "priorities", normal and G_CONNECT_AFTER. Irssi has always
required at least 3, and nowadays it has infinite amount of them of which 4
are actually useful :)

Also GLIB's signals don't really fit into how irssi wants to use them.
They're always bound to some object, while irssi (or scripts) rarely cares
about which "object" (could be eg. server or channel) actually sends the
signal. Of course, there could always be a single object which emits all
signals but that feels somewhat nasty :)

One final thing CVS irssi has is signal_continue() for continuing signal
emission with different parameters. This is excellent feature :)

Maybe if all I did was move the signal definitions from signals.txt to
sources. Something like

signal_register("event ", "SERVER_REC", "string", "string", "string", NULL);

And maybe to prevent typos breaking things:

signal_arg_register("SERVER_REC");
signal_register("event ", "SERVER_REC", ARG_STRING, ARG_STRING, ARG_STRING, NULL);

and signal_register() would fail if it found any unregistered arguments.

Scripts could also then create their own signals using
Irssi::signal_register().


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic