diff --git a/source/includes/lv2/atom-forge.h b/source/includes/lv2/atom-forge.h index d803d23fc..248b5f378 100644 --- a/source/includes/lv2/atom-forge.h +++ b/source/includes/lv2/atom-forge.h @@ -1,5 +1,5 @@ /* - Copyright 2008-2013 David Robillard + Copyright 2008-2014 David Robillard Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -39,6 +39,12 @@ This header is non-normative, it is provided for convenience. */ +/** + @defgroup forge Forge + @ingroup atom + @{ +*/ + #ifndef LV2_ATOM_FORGE_H #define LV2_ATOM_FORGE_H @@ -48,7 +54,7 @@ #include "atom-util.h" #include "urid.h" -#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) # define LV2_ATOM_FORGE_DEPRECATED __attribute__((__deprecated__)) #else # define LV2_ATOM_FORGE_DEPRECATED @@ -119,9 +125,9 @@ static inline void lv2_atom_forge_set_buffer(LV2_Atom_Forge* forge, uint8_t* buf, size_t size); /** - Initialise @p forge. + Initialise `forge`. - URIs will be mapped using @p map and stored, a reference to @p map itself is + URIs will be mapped using `map` and stored, a reference to `map` itself is not held. */ static inline void @@ -208,7 +214,7 @@ lv2_atom_forge_top_is(LV2_Atom_Forge* forge, uint32_t type) (lv2_atom_forge_deref(forge, forge->stack->ref)->type == type); } -/** Return true iff @p type is an atom:Object. */ +/** Return true iff `type` is an atom:Object. */ static inline bool lv2_atom_forge_is_object_type(const LV2_Atom_Forge* forge, uint32_t type) { @@ -229,7 +235,7 @@ lv2_atom_forge_is_object_type(const LV2_Atom_Forge* forge, uint32_t type) #endif } -/** Return true iff @p type is an atom:Object with a blank ID. */ +/** Return true iff `type` is an atom:Object with a blank ID. */ static inline bool lv2_atom_forge_is_blank(const LV2_Atom_Forge* forge, uint32_t type, @@ -257,7 +263,7 @@ lv2_atom_forge_is_blank(const LV2_Atom_Forge* forge, @{ */ -/** Set the output buffer where @p forge will write atoms. */ +/** Set the output buffer where `forge` will write atoms. */ static inline void lv2_atom_forge_set_buffer(LV2_Atom_Forge* forge, uint8_t* buf, size_t size) { @@ -271,7 +277,7 @@ lv2_atom_forge_set_buffer(LV2_Atom_Forge* forge, uint8_t* buf, size_t size) } /** - Set the sink function where @p forge will write output. + Set the sink function where `forge` will write output. The return value of forge functions is an LV2_Atom_Forge_Ref which is an integer type safe to use as a pointer but is otherwise opaque. The sink @@ -456,7 +462,7 @@ lv2_atom_forge_typed_string(LV2_Atom_Forge* forge, return out; } -/** Write an atom:String. Note that @p str need not be NULL terminated. */ +/** Write an atom:String. Note that `str` need not be NULL terminated. */ static inline LV2_Atom_Forge_Ref lv2_atom_forge_string(LV2_Atom_Forge* forge, const char* str, uint32_t len) { @@ -464,7 +470,7 @@ lv2_atom_forge_string(LV2_Atom_Forge* forge, const char* str, uint32_t len) } /** - Write an atom:URI. Note that @p uri need not be NULL terminated. + Write an atom:URI. Note that `uri` need not be NULL terminated. This does not map the URI, but writes the complete URI string. To write a mapped URI, use lv2_atom_forge_urid(). */ @@ -474,7 +480,7 @@ lv2_atom_forge_uri(LV2_Atom_Forge* forge, const char* uri, uint32_t len) return lv2_atom_forge_typed_string(forge, forge->URI, uri, len); } -/** Write an atom:Path. Note that @p path need not be NULL terminated. */ +/** Write an atom:Path. Note that `path` need not be NULL terminated. */ static inline LV2_Atom_Forge_Ref lv2_atom_forge_path(LV2_Atom_Forge* forge, const char* path, uint32_t len) { @@ -738,6 +744,7 @@ lv2_atom_forge_beat_time(LV2_Atom_Forge* forge, double beats) /** @} + @} */ #ifdef __cplusplus diff --git a/source/includes/lv2/atom.h b/source/includes/lv2/atom.h index 91c4fa3f3..1af831c86 100644 --- a/source/includes/lv2/atom.h +++ b/source/includes/lv2/atom.h @@ -1,5 +1,5 @@ /* - Copyright 2008-2012 David Robillard + Copyright 2008-2014 David Robillard Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -15,8 +15,12 @@ */ /** - @file atom.h C header for the LV2 Atom extension - . + @defgroup atom Atom + + A generic value container and several data types, see + for details. + + @{ */ #ifndef LV2_ATOM_H @@ -239,6 +243,10 @@ typedef struct { LV2_Atom_Sequence_Body body; /**< Body. */ } LV2_Atom_Sequence; +/** + @} +*/ + #ifdef __cplusplus } /* extern "C" */ #endif