Callbacks

  EventListener (obj)
  EventListenerInit ()
  FocusHandler (object, focus_in)
  Function (*user_data)
  KeySnoopFunc (event, *user_data)
  PropertyChangeHandler (obj, vals)

Details

Atk.EventListener(obj)
Parameters:obj (Atk.Object) – An Atk.Object instance for whom the callback will be called when the specified event (e.g. ‘focus:’) takes place.

A function which is called when an object emits a matching event, as used in #atk_add_focus_tracker. Currently the only events for which object-specific handlers are supported are events of type “focus:”. Most clients of ATK will prefer to attach signal handlers for the various ATK signals instead.

see atk_add_focus_tracker.

Atk.EventListenerInit()

An Atk.EventListenerInit function is a special function that is called in order to initialize the per-object event registration system used by Atk.EventListener, if any preparation is required.

see atk_focus_tracker_init.

Atk.FocusHandler(object, focus_in)
Parameters:

The type of callback function used for atk_component_add_focus_handler() and Atk.Component.remove_focus_handler()

Deprecated since version 2.9.4: Deprecated with atk_component_add_focus_handler() and Atk.Component.remove_focus_handler(). See those methods for more information.

Atk.Function(*user_data)
Parameters:user_data (object or None) – custom data defined by the user
Returns:not used
Return type:bool

An Atk.Function is a function definition used for padding which has been added to class and interface structures to allow for expansion in the future.

Atk.KeySnoopFunc(event, *user_data)
Parameters:
  • event (Atk.KeyEventStruct) – an Atk.KeyEventStruct containing information about the key event for which notification is being given.
  • user_data (object or None) – a block of data which will be passed to the event listener, on notification.
Returns:

True (nonzero) if the event emission should be stopped and the event discarded without being passed to the normal GUI recipient; False (zero) if the event dispatch to the client application should proceed as normal.

see atk_add_key_event_listener.

Return type:

int

An Atk.KeySnoopFunc is a type of callback which is called whenever a key event occurs, if registered via atk_add_key_event_listener. It allows for pre-emptive interception of key events via the return code as described below.

Atk.PropertyChangeHandler(obj, vals)
Parameters:

An Atk.PropertyChangeHandler is a function which is executed when an Atk.Object’s property changes value. It is specified in a call to atk_object_connect_property_change_handler().

Deprecated since version 2.12.