From f75ff9c2ed3ce219ac6f2ab257a61e5232e24dfa Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 2 Sep 2023 19:23:32 -0400 Subject: Arrange API into documentation groups --- include/suil/suil.h | 81 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 27 deletions(-) (limited to 'include') diff --git a/include/suil/suil.h b/include/suil/suil.h index 7f7f3a7..ba55a91 100644 --- a/include/suil/suil.h +++ b/include/suil/suil.h @@ -36,27 +36,14 @@ extern "C" { #endif /** - @defgroup suil Suil + @defgroup suil Suil C API @{ */ /** - UI host descriptor. - - This contains the various functions that a plugin UI may use to communicate - with the plugin. It is passed to suil_instance_new() to provide these - functions to the UI. + @defgroup suil_callbacks Callbacks + @{ */ -typedef struct SuilHostImpl SuilHost; - -/// An instance of an LV2 plugin UI -typedef struct SuilInstanceImpl SuilInstance; - -/// Opaque pointer to a UI handle -typedef void* SuilHandle; - -/// Opaque pointer to a UI widget -typedef void* SuilWidget; /** UI controller. @@ -101,6 +88,12 @@ typedef void (*SuilTouchFunc)( // uint32_t port_index, bool grabbed); +/** + @} + @defgroup suil_library Library + @{ +*/ + /// Initialization argument typedef enum { SUIL_ARG_NONE } SuilArg; @@ -116,6 +109,37 @@ SUIL_API void suil_init(int* argc, char*** argv, SuilArg key, ...); +/** + Check if suil can wrap a UI type. + + @param host_type_uri The URI of the desired widget type of the host, + corresponding to the `type_uri` parameter of suil_instance_new(). + + @param ui_type_uri The URI of the UI widget type. + + @return 0 if wrapping is unsupported, otherwise the quality of the wrapping + where 1 is the highest quality (direct native embedding with no wrapping) + and increasing values are of a progressively lower quality and/or stability. +*/ +SUIL_API +unsigned +suil_ui_supported(const char* host_type_uri, const char* ui_type_uri); + +/** + @} + @defgroup suil_host Host + @{ +*/ + +/** + UI host descriptor. + + This contains the various functions that a plugin UI may use to communicate + with the plugin. It is passed to suil_instance_new() to provide these + functions to the UI. +*/ +typedef struct SuilHostImpl SuilHost; + /** Create a new UI host descriptor. @@ -148,20 +172,22 @@ void suil_host_free(SuilHost* host); /** - Check if suil can wrap a UI type. + @} +*/ - @param host_type_uri The URI of the desired widget type of the host, - corresponding to the `type_uri` parameter of suil_instance_new(). +/** + @defgroup suil_instance Instance + @{ +*/ - @param ui_type_uri The URI of the UI widget type. +/// An instance of an LV2 plugin UI +typedef struct SuilInstanceImpl SuilInstance; - @return 0 if wrapping is unsupported, otherwise the quality of the wrapping - where 1 is the highest quality (direct native embedding with no wrapping) - and increasing values are of a progressively lower quality and/or stability. -*/ -SUIL_API -unsigned -suil_ui_supported(const char* host_type_uri, const char* ui_type_uri); +/// Opaque pointer to a UI handle +typedef void* SuilHandle; + +/// Opaque pointer to a UI widget +typedef void* SuilWidget; /** Instantiate a UI for an LV2 plugin. @@ -266,6 +292,7 @@ suil_instance_extension_data(SuilInstance* instance, const char* uri); /** @} + @} */ #ifdef __cplusplus -- cgit v1.2.1