PipeWire 1.2.7
Loading...
Searching...
No Matches
event.h
Go to the documentation of this file.
1/* Simple Plugin API */
2/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
3/* SPDX-License-Identifier: MIT */
4
5#ifndef SPA_EVENT_H
6#define SPA_EVENT_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12#include <spa/pod/pod.h>
13
19struct spa_event_body {
21};
22
23struct spa_event {
24 struct spa_pod pod;
26};
27
28#define SPA_EVENT_TYPE(ev) ((ev)->body.body.type)
29#define SPA_EVENT_ID(ev,type) (SPA_EVENT_TYPE(ev) == (type) ? \
30 (ev)->body.body.id : SPA_ID_INVALID)
31
32#define SPA_EVENT_INIT_FULL(t,size,type,id,...) ((t) \
33 { { (size), SPA_TYPE_Object }, \
34 { { (type), (id) }, ##__VA_ARGS__ } }) \
36#define SPA_EVENT_INIT(type,id) \
37 SPA_EVENT_INIT_FULL(struct spa_event, \
38 sizeof(struct spa_event_body), type, id)
39
44#ifdef __cplusplus
45} /* extern "C" */
46#endif
47
48#endif /* SPA_EVENT_H */
spa/pod/pod.h
Definition event.h:24
struct spa_pod_object_body body
Definition event.h:25
Definition event.h:28
struct spa_event_body body
Definition event.h:30
struct spa_pod pod
Definition event.h:29
Definition pod.h:177
Definition pod.h:43