### Constructor

# Atspi DeviceListener new

#### Declaration [src]

    AtspiDeviceListener*
    atspi_device_listener_new (
      AtspiDeviceListenerCB callback,
      void* user_data,
      GDestroyNotify callback_destroyed
    )

#### Description [src]

Creates a new `AtspiDeviceListener` with a specified callback function.

#### Parameters

`callback`

  Type: `AtspiDeviceListenerCB`

  An `AtspiDeviceListenerCB` callback function, or NULL.

  The argument can be `NULL`.

`user_data`

  Type: `void*`

  A pointer to data which will be passed to the callback when invoked.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`callback_destroyed`

  Type: `GDestroyNotify`

  A `GDestroyNotify` called when the listener is freed and data associated with the callback should be freed. It can be NULL.

#### Return value

Type: `AtspiDeviceListener`

A pointer to a newly-created `AtspiDeviceListener`.

The caller of the function takes ownership of the data, and is responsible for freeing it.