From 75d524c764a6f91aa9662040a2c218e8d2802438 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 16 Feb 2012 23:05:48 +0000 Subject: Add atom:eventTransfer (for UIs that talk to atom event ports). Add lv2_atom_total_size() helper. Make LV2_Atom_Literal definiton consistent with others. Rework forge API to support writing to an arbitrary sink function (e.g. ringbuffer). --- lv2/lv2plug.in/ns/ext/atom/atom-helpers.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lv2/lv2plug.in/ns/ext/atom/atom-helpers.h') diff --git a/lv2/lv2plug.in/ns/ext/atom/atom-helpers.h b/lv2/lv2plug.in/ns/ext/atom/atom-helpers.h index ae2eb43..3bfad57 100644 --- a/lv2/lv2plug.in/ns/ext/atom/atom-helpers.h +++ b/lv2/lv2plug.in/ns/ext/atom/atom-helpers.h @@ -45,6 +45,13 @@ lv2_atom_pad_size(uint32_t size) return (size + 7) & (~7); } +/** Return the total size of @p atom, including the header. */ +static inline uint32_t +lv2_atom_total_size(const LV2_Atom* atom) +{ + return sizeof(LV2_Atom) + atom->size; +} + /** Return true iff @p atom is null. */ static inline bool lv2_atom_is_null(const LV2_Atom* atom) -- cgit v1.2.1