PipeWire
1.0.5
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
9
extern
"C"
{
10
#endif
11
12
#include <
spa/pod/pod.h
>
13
19
struct
spa_event_body
{
20
struct
spa_pod_object_body
body
;
21
};
22
23
struct
spa_event
{
24
struct
spa_pod
pod
;
25
struct
spa_event_body
body
;
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__ } }) \
35
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 */
pod.h
spa/pod/pod.h
spa_event_body
Definition
event.h:24
spa_event_body::body
struct spa_pod_object_body body
Definition
event.h:25
spa_event
Definition
event.h:28
spa_event::body
struct spa_event_body body
Definition
event.h:30
spa_event::pod
struct spa_pod pod
Definition
event.h:29
spa_pod_object_body
Definition
pod.h:177
spa_pod
Definition
pod.h:43
spa
pod
event.h
Generated by
1.10.0