PipeWire 1.1.0
Loading...
Searching...
No Matches
main-loop.h
Go to the documentation of this file.
1/* PipeWire */
2/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
3/* SPDX-License-Identifier: MIT */
4
5#ifndef PIPEWIRE_MAIN_LOOP_H
6#define PIPEWIRE_MAIN_LOOP_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
23struct pw_main_loop;
24
25#include <pipewire/loop.h>
26
29#define PW_VERSION_MAIN_LOOP_EVENTS 0
30 uint32_t version;
31
33 void (*destroy) (void *data);
34};
37struct pw_main_loop *
38pw_main_loop_new(const struct spa_dict *props);
42 struct spa_hook *listener,
43 const struct pw_main_loop_events *events,
44 void *data);
45
48
51
54
57
62#ifdef __cplusplus
63}
64#endif
65
66#endif /* PIPEWIRE_MAIN_LOOP_H */
int pw_main_loop_quit(struct pw_main_loop *loop)
Quit a main loop.
Definition main-loop.c:106
void pw_main_loop_destroy(struct pw_main_loop *loop)
Destroy a loop.
Definition main-loop.c:71
int pw_main_loop_run(struct pw_main_loop *loop)
Run a main loop.
Definition main-loop.c:120
struct pw_main_loop * pw_main_loop_new(const struct spa_dict *props)
Create a new main loop.
Definition main-loop.c:61
struct pw_loop * pw_main_loop_get_loop(struct pw_main_loop *loop)
Get the loop implementation.
Definition main-loop.c:94
void pw_main_loop_add_listener(struct pw_main_loop *loop, struct spa_hook *listener, const struct pw_main_loop_events *events, void *data)
Add an event listener.
Definition main-loop.c:85
pipewire/loop.h
Definition loop.h:33
struct spa_loop * loop
wrapped loop
Definition loop.h:35
Events of the main loop.
Definition main-loop.h:33
void(* destroy)(void *data)
Emitted when the main loop is destroyed.
Definition main-loop.h:39
uint32_t version
Definition main-loop.h:36
A main loop object.
Definition dict.h:39
A hook, contains the structure with functions and the data passed to the functions.
Definition hook.h:350