Util.addGlobalEventListener

Adds the specified function to the list of functions to be called when an ATK event of type event_type occurs.

The format of event_type is the following: "ATK:<atk_type>:<atk_event>:<atk_event_detail>

Where "ATK" works as the namespace, <atk_interface> is the name of the ATK type (interface or object), <atk_event> is the name of the signal defined on that interface and <atk_event_detail> is the gsignal detail of that signal. You can find more info about gsignal details here: http://developer.gnome.org/gobject/stable/gobject-Signals.html

The first three parameters are mandatory. The last one is optional.

For example: ATK:AtkObject:state-change ATK:AtkText:text-selection-changed ATK:AtkText:text-insert:system

Toolkit implementor note: ATK provides a default implementation for this virtual method. ATK implementors are discouraged from reimplementing this method.

Toolkit implementor note: this method is not intended to be used by ATK implementors but by ATK consumers.

ATK consumers note: as this method adds a listener for a given ATK type, that type should be already registered on the GType system before calling this method. A simple way to do that is creating an instance of #AtkNoOpObject. This class implements all ATK interfaces, so creating the instance will register all ATK types as a collateral effect.

struct Util
static
uint
addGlobalEventListener

Parameters

listener GSignalEmissionHook

the listener to notify

eventType string

the type of event for which notification is requested

Return: added event listener id, or 0 on failure.

Meta