LMMS
Loading...
Searching...
No Matches
lv2_atom.h
Go to the documentation of this file.
1/*
2 Copyright 2008-2012 David Robillard <http://drobilla.net>
3
4 Permission to use, copy, modify, and/or distribute this software for any
5 purpose with or without fee is hereby granted, provided that the above
6 copyright notice and this permission notice appear in all copies.
7
8 THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
21
22#ifndef LV2_ATOM_H
23#define LV2_ATOM_H
24
25#include <stdint.h>
26#include <stddef.h>
27
28#define LV2_ATOM_URI "http://lv2plug.in/ns/ext/atom"
29#define LV2_ATOM_PREFIX LV2_ATOM_URI "#"
30
31#define LV2_ATOM__Atom LV2_ATOM_PREFIX "Atom"
32#define LV2_ATOM__AtomPort LV2_ATOM_PREFIX "AtomPort"
33#define LV2_ATOM__Blank LV2_ATOM_PREFIX "Blank"
34#define LV2_ATOM__Bool LV2_ATOM_PREFIX "Bool"
35#define LV2_ATOM__Chunk LV2_ATOM_PREFIX "Chunk"
36#define LV2_ATOM__Double LV2_ATOM_PREFIX "Double"
37#define LV2_ATOM__Event LV2_ATOM_PREFIX "Event"
38#define LV2_ATOM__Float LV2_ATOM_PREFIX "Float"
39#define LV2_ATOM__Int LV2_ATOM_PREFIX "Int"
40#define LV2_ATOM__Literal LV2_ATOM_PREFIX "Literal"
41#define LV2_ATOM__Long LV2_ATOM_PREFIX "Long"
42#define LV2_ATOM__Number LV2_ATOM_PREFIX "Number"
43#define LV2_ATOM__Object LV2_ATOM_PREFIX "Object"
44#define LV2_ATOM__Path LV2_ATOM_PREFIX "Path"
45#define LV2_ATOM__Property LV2_ATOM_PREFIX "Property"
46#define LV2_ATOM__Resource LV2_ATOM_PREFIX "Resource"
47#define LV2_ATOM__Sequence LV2_ATOM_PREFIX "Sequence"
48#define LV2_ATOM__Sound LV2_ATOM_PREFIX "Sound"
49#define LV2_ATOM__String LV2_ATOM_PREFIX "String"
50#define LV2_ATOM__Tuple LV2_ATOM_PREFIX "Tuple"
51#define LV2_ATOM__URI LV2_ATOM_PREFIX "URI"
52#define LV2_ATOM__URID LV2_ATOM_PREFIX "URID"
53#define LV2_ATOM__Vector LV2_ATOM_PREFIX "Vector"
54#define LV2_ATOM__atomTransfer LV2_ATOM_PREFIX "atomTransfer"
55#define LV2_ATOM__beatTime LV2_ATOM_PREFIX "beatTime"
56#define LV2_ATOM__bufferType LV2_ATOM_PREFIX "bufferType"
57#define LV2_ATOM__childType LV2_ATOM_PREFIX "childType"
58#define LV2_ATOM__eventTransfer LV2_ATOM_PREFIX "eventTransfer"
59#define LV2_ATOM__frameTime LV2_ATOM_PREFIX "frameTime"
60#define LV2_ATOM__supports LV2_ATOM_PREFIX "supports"
61#define LV2_ATOM__timeUnit LV2_ATOM_PREFIX "timeUnit"
62
63#define LV2_ATOM_REFERENCE_TYPE 0
64
65#ifdef __cplusplus
66extern "C" {
67#endif
68
71 ((sizeof(double) <= sizeof(uint64_t)) * 2) - 1];
72
79#define LV2_ATOM_CONTENTS(type, atom) \
80 ((void*)((uint8_t*)(atom) + sizeof(type)))
81
85#define LV2_ATOM_CONTENTS_CONST(type, atom) \
86 ((const void*)((const uint8_t*)(atom) + sizeof(type)))
87
92#define LV2_ATOM_BODY(atom) LV2_ATOM_CONTENTS(LV2_Atom, atom)
93
97#define LV2_ATOM_BODY_CONST(atom) LV2_ATOM_CONTENTS_CONST(LV2_Atom, atom)
98
100typedef struct {
101 uint32_t size;
102 uint32_t type;
103} LV2_Atom;
104
106typedef struct {
107 LV2_Atom atom;
108 int32_t body;
110
112typedef struct {
113 LV2_Atom atom;
114 int64_t body;
116
118typedef struct {
119 LV2_Atom atom;
120 float body;
122
124typedef struct {
125 LV2_Atom atom;
126 double body;
128
131
133typedef struct {
134 LV2_Atom atom;
135 uint32_t body;
137
139typedef struct {
140 LV2_Atom atom;
141 /* Contents (a null-terminated UTF-8 string) follow here. */
143
145typedef struct {
146 uint32_t datatype;
147 uint32_t lang;
148 /* Contents (a null-terminated UTF-8 string) follow here. */
150
152typedef struct {
153 LV2_Atom atom;
156
158typedef struct {
159 LV2_Atom atom;
160 /* Contents (a series of complete atoms) follow here. */
162
164typedef struct {
165 uint32_t child_size;
166 uint32_t child_type;
167 /* Contents (a series of packed atom bodies) follow here. */
169
171typedef struct {
172 LV2_Atom atom;
175
177typedef struct {
178 uint32_t key;
179 uint32_t context;
181 /* Value atom body follows here. */
183
185typedef struct {
186 LV2_Atom atom;
189
191typedef struct {
192 uint32_t id;
193 uint32_t otype;
194 /* Contents (a series of property bodies) follow here. */
196
198typedef struct {
199 LV2_Atom atom;
202
204typedef struct {
206 union {
207 int64_t frames;
208 double beats;
209 } time;
210 LV2_Atom body;
211 /* Body atom contents follow here. */
213
230typedef struct {
231 uint32_t unit;
232 uint32_t pad;
233 /* Contents (a series of events) follow here. */
235
237typedef struct {
238 LV2_Atom atom;
241
242#ifdef __cplusplus
243} /* extern "C" */
244#endif
245
246#endif /* LV2_ATOM_H */
CAdPlugDatabase::CRecord::RecordType type
Definition adplugdb.cpp:93
LV2_Atom_Int LV2_Atom_Bool
Definition atom.h:136
static PuglViewHint int value
Definition pugl.h:1708
char lv2_atom_assert_double_fits_in_64_bits[((sizeof(double)<=sizeof(uint64_t)) *2) - 1]
Definition lv2_atom.h:71
int int32_t
Definition mid.cpp:97
unsigned int uint32_t
Definition mid.cpp:100
png_const_structrp png_const_inforp int * unit
Definition png.h:2161
Definition atom.h:130
Definition atom.h:210
Definition atom.h:124
Definition atom.h:112
Definition atom.h:151
Definition atom.h:158
Definition atom.h:118
Definition atom.h:197
Definition atom.h:204
Definition atom.h:183
Definition atom.h:191
Definition atom.h:236
Definition atom.h:243
Definition atom.h:145
Definition atom.h:164
Definition atom.h:139
Definition atom.h:170
Definition atom.h:177
Definition atom.h:106
ZCONST char * key
Definition crypt.c:587
ulg size
Definition extract.c:2350