PipeWire 1.6.8

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
9 extern "C" {
10#endif
11
16
21
23 struct pw_main_loop;
24
25#include <pipewire/loop.h>
26
28 struct pw_main_loop_events {
29#define PW_VERSION_MAIN_LOOP_EVENTS 0
30 uint32_t version;
31
33 void (*destroy) (void *data);
34};
35
37 struct pw_main_loop *
38 pw_main_loop_new(const struct spa_dict *props);
39
41 void pw_main_loop_add_listener(struct pw_main_loop *loop,
42 struct spa_hook *listener,
43 const struct pw_main_loop_events *events,
44 void *data);
45
47 struct pw_loop * pw_main_loop_get_loop(struct pw_main_loop *loop);
48
50 void pw_main_loop_destroy(struct pw_main_loop *loop);
51
56 int pw_main_loop_run(struct pw_main_loop *loop);
57
59 int pw_main_loop_quit(struct pw_main_loop *loop);
60
64
65#ifdef __cplusplus
66}
67#endif
68
69#endif /* PIPEWIRE_MAIN_LOOP_H */
pw_main_loop_quit
int pw_main_loop_quit(struct pw_main_loop *loop)
Quit a main loop.
Definition main-loop.c:108
pw_main_loop_destroy
void pw_main_loop_destroy(struct pw_main_loop *loop)
Destroy a loop.
Definition main-loop.c:73
pw_main_loop_run
int pw_main_loop_run(struct pw_main_loop *loop)
Run a main loop.
Definition main-loop.c:122
pw_main_loop_new
struct pw_main_loop * pw_main_loop_new(const struct spa_dict *props)
Create a new main loop.
Definition main-loop.c:63
pw_main_loop_get_loop
struct pw_loop * pw_main_loop_get_loop(struct pw_main_loop *loop)
Get the loop implementation.
Definition main-loop.c:96
pw_main_loop_add_listener
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:87
loop.h
pipewire/loop.h
pw_loop
Definition loop.h:33
pw_loop::loop
struct spa_loop * loop
wrapped loop
Definition loop.h:35
pw_main_loop_events
Events of the main loop.
Definition main-loop.h:33
pw_main_loop_events::destroy
void(* destroy)(void *data)
Emitted when the main loop is destroyed.
Definition main-loop.h:39
pw_main_loop_events::version
uint32_t version
Definition main-loop.h:36
pw_main_loop
A main loop object.
spa_dict
Definition dict.h:51
spa_hook
A hook, contains the structure with functions and the data passed to the functions.
Definition hook.h:427