From d842b7d2b27e2cc68d6976069bf90fafcf293ccf Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 30 Mar 2021 21:07:37 -0400 Subject: WIP: Add documentation --- include/suil/suil.h | 50 +++++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 19 deletions(-) (limited to 'include/suil/suil.h') diff --git a/include/suil/suil.h b/include/suil/suil.h index ec2ea5e..779a169 100644 --- a/include/suil/suil.h +++ b/include/suil/suil.h @@ -1,5 +1,5 @@ /* - Copyright 2011-2017 David Robillard + Copyright 2011-2021 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 @@ -47,27 +47,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_host UI Host + @{ */ -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. @@ -112,6 +99,15 @@ typedef void (*SuilTouchFunc)( // uint32_t port_index, bool grabbed); +/** + 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; + /// Initialization argument typedef enum { SUIL_ARG_NONE } SuilArg; @@ -158,6 +154,21 @@ SUIL_API void suil_host_free(SuilHost* host); +/** + @} + @defgroup suil_ui UI Instances + @{ +*/ + +/// 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; + /** Check if suil can wrap a UI type. @@ -224,8 +235,8 @@ suil_instance_free(SuilInstance* instance); Get the handle for a UI instance. Returns the handle to the UI instance. The returned handle has opaque type - to insulate the Suil API from LV2 extensions, but in pactice it is currently - of type `LV2UI_Handle`. This should not normally be needed. + to insulate the Suil API from LV2 extensions, but in practice it is + currently of type `LV2UI_Handle`. This should not normally be needed. The returned handle is shared and must not be deleted. */ @@ -277,6 +288,7 @@ suil_instance_extension_data(SuilInstance* instance, const char* uri); /** @} + @} */ #ifdef __cplusplus -- cgit v1.2.1