PulseAudio 16.1

Data Fields
pa_mainloop_api Struct Reference

An abstract mainloop API vtable. More...

`#include <mainloop-api.h>`

## Data Fields
void * | userdata
| A pointer to some private, arbitrary data of the main loop implementation. More...
pa_io_event *(* | io_new )(pa_mainloop_api *a, int fd, pa_io_event_flags_t events, pa_io_event_cb_t cb, void *userdata)
| Create a new IO event source object. More...
void(* | io_enable )(pa_io_event *e, pa_io_event_flags_t events)
| Enable or disable IO events on this object. More...
void(* | io_free )(pa_io_event *e)
| Free a IO event source object. More...
void(* | io_set_destroy )(pa_io_event *e, pa_io_event_destroy_cb_t cb)
| Set a function that is called when the IO event source is destroyed. More...
pa_time_event *(* | time_new )(pa_mainloop_api *a, const struct timeval *tv, pa_time_event_cb_t cb, void *userdata)
| Create a new timer event source object for the specified Unix time. More...
void(* | time_restart )(pa_time_event *e, const struct timeval *tv)
| Restart a running or expired timer event source with a new Unix time. More...
void(* | time_free )(pa_time_event *e)
| Free a deferred timer event source object. More...
void(* | time_set_destroy )(pa_time_event *e, pa_time_event_destroy_cb_t cb)
| Set a function that is called when the timer event source is destroyed. More...
pa_defer_event *(* | defer_new )(pa_mainloop_api *a, pa_defer_event_cb_t cb, void *userdata)
| Create a new deferred event source object. More...
void(* | defer_enable )(pa_defer_event *e, int b)
| Enable or disable a deferred event source temporarily. More...
void(* | defer_free )(pa_defer_event *e)
| Free a deferred event source object. More...
void(* | defer_set_destroy )(pa_defer_event *e, pa_defer_event_destroy_cb_t cb)
| Set a function that is called when the deferred event source is destroyed. More...
void(* | quit )(pa_mainloop_api *a, int retval)
| Exit the main loop and return the specified retval. More...

## Detailed Description

An abstract mainloop API vtable.

## Field Documentation

## ◆ defer_enable

void(* pa_mainloop_api::defer_enable) (pa_defer_event *e, int b)

Enable or disable a deferred event source temporarily.

## ◆ defer_free

void(* pa_mainloop_api::defer_free) (pa_defer_event *e)

Free a deferred event source object.

## ◆ defer_new

pa_defer_event *(* pa_mainloop_api::defer_new) (pa_mainloop_api *a, pa_defer_event_cb_t cb, void *userdata)

Create a new deferred event source object.

## ◆ defer_set_destroy

void(* pa_mainloop_api::defer_set_destroy) (pa_defer_event *e, pa_defer_event_destroy_cb_t cb)

Set a function that is called when the deferred event source is destroyed.

Use this to free the userdata argument if required

## ◆ io_enable

void(* pa_mainloop_api::io_enable) (pa_io_event *e, pa_io_event_flags_t events)

Enable or disable IO events on this object.

## ◆ io_free

void(* pa_mainloop_api::io_free) (pa_io_event *e)

Free a IO event source object.

## ◆ io_new

pa_io_event *(* pa_mainloop_api::io_new) (pa_mainloop_api *a, int fd, pa_io_event_flags_t events, pa_io_event_cb_t cb, void *userdata)

Create a new IO event source object.

## ◆ io_set_destroy

void(* pa_mainloop_api::io_set_destroy) (pa_io_event *e, pa_io_event_destroy_cb_t cb)

Set a function that is called when the IO event source is destroyed.

Use this to free the userdata argument if required

## ◆ quit

void(* pa_mainloop_api::quit) (pa_mainloop_api *a, int retval)

Exit the main loop and return the specified retval.

## ◆ time_free

void(* pa_mainloop_api::time_free) (pa_time_event *e)

Free a deferred timer event source object.

## ◆ time_new

pa_time_event *(* pa_mainloop_api::time_new) (pa_mainloop_api *a, const struct timeval *tv, pa_time_event_cb_t cb, void *userdata)

Create a new timer event source object for the specified Unix time.

## ◆ time_restart

void(* pa_mainloop_api::time_restart) (pa_time_event *e, const struct timeval *tv)

Restart a running or expired timer event source with a new Unix time.

## ◆ time_set_destroy

void(* pa_mainloop_api::time_set_destroy) (pa_time_event *e, pa_time_event_destroy_cb_t cb)

Set a function that is called when the timer event source is destroyed.

Use this to free the userdata argument if required

## ◆ userdata

void* pa_mainloop_api::userdata

A pointer to some private, arbitrary data of the main loop implementation.

The documentation for this struct was generated from the following file:

- mainloop-api.h