### Virtual Method

# Atk Component add_focus_handler

deprecated: 2.9.4

#### Declaration [src]

    guint
    add_focus_handler (
      AtkComponent* component,
      AtkFocusHandler handler
    )

#### Description [src]

Add the specified handler to the set of functions to be called when this object receives focus events (in or out). If the handler is already added it is not added again.

Deprecated since: 2.9.4

If you need to track when an object gains or lose the focus, use the `AtkObject::state-change` “focused” notification instead.

#### Parameters

`handler`

  Type: `AtkFocusHandler`

  The `AtkFocusHandler` to be attached to `component`.

#### Return value

Type: `guint`

A handler id which can be used in `atk_component_remove_focus_handler()` or zero if the handler was already added.