Loading...
Searching...
No Matches
main-loop.h
Go to the documentation of this file.
/* PipeWire */
/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
/* SPDX-License-Identifier: MIT */
#ifndef PIPEWIRE_MAIN_LOOP_H
#define PIPEWIRE_MAIN_LOOP_H
#ifdef __cplusplus
extern "C" {
#endif
struct pw_main_loop;
#include <pipewire/loop.h>
struct pw_main_loop_events {
#define PW_VERSION_MAIN_LOOP_EVENTS 0
uint32_t version;
void (*destroy) (void *data);
};
struct pw_main_loop *
pw_main_loop_new(const struct spa_dict *props);
void pw_main_loop_add_listener(struct pw_main_loop *loop,
struct spa_hook *listener,
const struct pw_main_loop_events *events,
void *data);
struct pw_loop * pw_main_loop_get_loop(struct pw_main_loop *loop);
void pw_main_loop_destroy(struct pw_main_loop *loop);
int pw_main_loop_run(struct pw_main_loop *loop);
int pw_main_loop_quit(struct pw_main_loop *loop);
#ifdef __cplusplus
}
#endif
#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