Messaging System
The GObject messaging system consists of two complementary parts: closures and signals.
- Closures
- A GObject closure is a generalized version of a callback. Support exists for closures written in C and C++, as well as arbitrary languages (when bindings are provided). This allows code written in (for example) Python and Java to be invoked via a GObject closure.
- Signals
- Signals are the primary mechanism by which closures are invoked. Objects register signal listeners with the type system, specifying a mapping between a given signal and a given closure. Upon emission of a registered signal, that signal's closure is invoked. In GTK+, all native GUI events (such as mouse motion and keyboard actions) can generate GObject signals for listeners to potentially act upon.
Read more about this topic: GObject
Famous quotes containing the word system:
“Psychoanalysis is an attempt to examine a persons self-justifications. Hence it can be undertaken only with the patients cooperation and can succeed only when the patient has something to gain by abandoning or modifying his system of self-justification.”
—Thomas Szasz (b. 1920)