XINE, A Free Video Player Project - API reference

Main Page Modules Data Structures File List Data Fields Globals

# Sending events

## Typedefs
typedef void | event_t
typedef void (* | event_listener_t )(xine_t *xine, event_t *event, void *data)
## Functions
int | xine_register_event_listener (xine_t *self, event_listener_t listener)
| registers an event listener callback.
int | xine_remove_event_listener (xine_t *self, event_listener_t listener)
| Attempts to remove a registered event listener.
void | xine_send_event (xine_t *self, event_t *event, void *data)
| sends an event to all listeners.

## Detailed Description

Event dispatcher mechanism

## Typedef Documentation

typedef void(* event_listener_t)(xine_t *xine, event_t *event, void *data)

| Event listener callback. See also: xine_register_event_listener, xine_remove_event_listener

typedef void event_t

| Opaque data type. See also: event_listener_t, xine_send_event

## Function Documentation

int xine_register_event_listener ( | xine_t * self,
| event_listener_t listener )

  | registers an event listener callback. Parameters:
  self | Current xine engine configuration ( see xine_init() )
  listener | callback function.
  Returns: 0 if the listener was registerd, non-zero if it could not. See also: event_listener_t Parameters:
  self |
  listener |

int xine_remove_event_listener ( | xine_t * self,
| event_listener_t listener )

  | Attempts to remove a registered event listener. Parameters:
  self | Current xine engine configuration ( see xine_init() )
  listener | callback function.
  Returns: 0 if the listener was removes, non-zero if it wasn't (e.g. not found). See also: event_listener_t Parameters:
  self |
  listener |

void xine_send_event ( | xine_t * self,
| event_t * event,
| void * data )

  | sends an event to all listeners. Parameters:
  self | Current xine engine configuration ( see xine_init() )
  event | FILLME
  data | FILLME.
  See also: event_t Parameters:
  self |
  event |
  data |