Re: Repassing Signals.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 10, 2006, at 8:51 AM, Alexandre Moreira wrote:
> Clients A, B, C connects to the "emitted_bar" signal on object of  
> class WO (wrapper object). But I actually want them to listen to  
> the "emitted_foo" signal on object of class UC (used component).
>
> Is it possible to make sure that the signals connected with  
> g_signal_connect on "emitted_bar" will only be triggered before the  
> default handler of "emitted_foo" and those with  
> g_signal_connect_after only after it ?
>
> I know it is weird, but it is just that I need to use the signals  
> and wouldn't like having to change my application whenever I  
> decided to use another, perhaps more powerful, component if they  
> have the

IMHO, if you're exposing the before/after of the UC signal, you're  
already breaking abstraction.  But anyway...

As I see it, you have a couple options: one, implement specialized  
wrapper_object_connect_foo()/connect_foo_after() methods that connect  
wrapper callbacks to the underlying signal.  Other option would be to  
have bar and bar_after signals.  I don't know of a way to actually  
link the signals, but then again I'm not an expert on deep GObject  
magic.

If you can get away from depending on before/after semantics, just  
having a "bar" signal that's fired on "foo" seems like it should work.

- Michael
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux