Re: How to define own signals



Thanks Tritan,

Tristan Van Berkom wrote:

        I struggled with this a while myself.
youre going to need to understand what a GClosure is.

you have marshallers (functions to call functions
see gtkmarshallers.c and gtkmarshallers.list for a list of predefined marshalers)

and you have your accumulators (functions that get called
with the GValue arguments of the signal throughout
signal emission and the return values of the signal
handlers. theese define what stops signal emmision.)

see gtkwidget.c for examples of g_signal_new and
g_signal_emit.

you should also traverse the gobject section
of the API reference for a better comprehension
of GValue, GClosure etc...

a not-published document that helped me
imensly is here:

http://www.gnome.org/~james/language-bindings/

this covers signals and closures in more detail
that the api reference but in the context of
writing a language binding. (I think it uses
a out-of-date api also).


good luck!
                        -Tristan

"tcheer gmx de" wrote:
Hi all

I am building a gtk application and would like to define my own signals.
Is it actually possible?
OK, I would like my event not to react to an user action like button
presed, mouse moved or sth. like that, but it should be emmited to the
GUI from my controller only when some conditions are true.

Iurgently need some hints, documentation about this, and thank everyone
for any contribution for this thread.

---
Eric Tchepannou

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list







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