AtspiDeviceListener

AtspiDeviceListener

Synopsis

gboolean            (*AtspiDeviceListenerCB)            (const AtspiDeviceEvent *stroke,
                                                         void *user_data);
gboolean            (*AtspiDeviceListenerSimpleCB)      (const AtspiDeviceEvent *stroke);
                    AtspiDeviceListener;
                    AtspiDeviceListenerClass;
AtspiDeviceListener * atspi_device_listener_new         (AtspiDeviceListenerCB callback,
                                                         GDestroyNotify callback_destroyed,
                                                         void *user_data);
AtspiDeviceListener * atspi_device_listener_new_simple  (AtspiDeviceListenerSimpleCB callback,
                                                         GDestroyNotify callback_destroyed);
void                atspi_device_listener_add_callback  (AtspiDeviceListener *listener,
                                                         AtspiDeviceListenerCB callback,
                                                         GDestroyNotify callback_destroyed,
                                                         void *user_data);
void                atspi_device_listener_remove_callback
                                                        (AtspiDeviceListener *listener,
                                                         AtspiDeviceListenerCB callback);

Object Hierarchy

  GObject
   +----AtspiDeviceListener

Description

Details

AtspiDeviceListenerCB ()

gboolean            (*AtspiDeviceListenerCB)            (const AtspiDeviceEvent *stroke,
                                                         void *user_data);

A callback function prototype via which clients receive device event notifications.

stroke :

The AtspiDeviceEvent for which notification is being received. [transfer full]

user_data :

Data which is passed to the client each time this callback is notified.

Returns :

TRUE if the client wishes to consume/preempt the event, preventing it from being relayed to the currently focussed application, FALSE if the event delivery should proceed as normal.

AtspiDeviceListenerSimpleCB ()

gboolean            (*AtspiDeviceListenerSimpleCB)      (const AtspiDeviceEvent *stroke);

Like AtspiDeviceListenerCB but with no user data.

stroke :

The AtspiDeviceEvent for which notification is being received. [transfer full]

Returns :

TRUE if the client wishes to consume/preempt the event, preventing it from being relayed to the currently focussed application, FALSE if the event delivery should proceed as normal.

AtspiDeviceListener

typedef struct _AtspiDeviceListener AtspiDeviceListener;


AtspiDeviceListenerClass

typedef struct {
  GObjectClass parent_class;
  gboolean (*device_event) (AtspiDeviceListener *, const AtspiDeviceEvent *);
} AtspiDeviceListenerClass;


atspi_device_listener_new ()

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

Create a new AtspiDeviceListener with a specified callback function.

callback :

an AtspiDeviceListenerCB callback function, or NULL. [scope notify]

callback_destroyed :

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

user_data :

a pointer to data which will be passed to the callback when invoked. [closure]

Returns :

a pointer to a newly-created AtspiDeviceListener.

atspi_device_listener_new_simple ()

AtspiDeviceListener * atspi_device_listener_new_simple  (AtspiDeviceListenerSimpleCB callback,
                                                         GDestroyNotify callback_destroyed);

Create a new AtspiDeviceListener with a specified callback function. Like atspi_device_listener_new, but callback takes no user data.

callback :

an AtspiDeviceListenerCB callback function, or NULL. [scope notify]

callback_destroyed :

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

Returns :

a pointer to a newly-created AtspiDeviceListener.

atspi_device_listener_add_callback ()

void                atspi_device_listener_add_callback  (AtspiDeviceListener *listener,
                                                         AtspiDeviceListenerCB callback,
                                                         GDestroyNotify callback_destroyed,
                                                         void *user_data);

Add an in-process callback function to an existing AtspiDeviceListener.

listener :

the AtspiDeviceListener instance to modify.

callback :

an AtspiDeviceListenerCB function pointer. [scope notify]

callback_destroyed :

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

user_data :

a pointer to data which will be passed to the callback when invoked. [closure]

atspi_device_listener_remove_callback ()

void                atspi_device_listener_remove_callback
                                                        (AtspiDeviceListener *listener,
                                                         AtspiDeviceListenerCB callback);

Remove an in-process callback function from an existing AtspiDeviceListener.

listener :

the AtspiDeviceListener instance to modify.

callback :

an AtspiDeviceListenerCB function pointer. [scope call]