PipeWire: main-loop.h Source File

PipeWire 0.3.70

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
28struct pw_main_loop_events {
29#define PW_VERSION_MAIN_LOOP_EVENTS 0
30 uint32_t version;
31
33 void (*destroy) (void *data);
34};
35
37struct pw_main_loop *
38 pw_main_loop_new(const struct spa_dict *props);
39
41void 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
47struct pw_loop * pw_main_loop_get_loop(struct pw_main_loop *loop);
48
50void pw_main_loop_destroy(struct pw_main_loop *loop);
51
53int pw_main_loop_run(struct pw_main_loop *loop);
54
56int pw_main_loop_quit(struct pw_main_loop *loop);
57
62#ifdef __cplusplus
63}
64#endif
65
66#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:105
pw_main_loop_destroy
void pw_main_loop_destroy(struct pw_main_loop *loop)
Destroy a loop.
Definition: main-loop.c:70
pw_main_loop_run
int pw_main_loop_run(struct pw_main_loop *loop)
Run a main loop.
Definition: main-loop.c:119
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:60
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:93
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:84
loop.h
pipewire/loop.h
pw_loop
Definition: src/pipewire/loop.h:31
pw_loop::loop
struct spa_loop * loop
wrapped loop
Definition: src/pipewire/loop.h:33
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: utils/dict.h:39
spa_hook
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:331