clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit a8a74677c48eff84d5873470b5afa7d7c13d9656
parent da5c073b20002c52566affb26165309c2e40e0d5
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date:   Thu, 27 Jan 2022 12:05:49 +0100

Update comments for resizing the GUI

Diffstat:
Minclude/clap/ext/gui.h | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/include/clap/ext/gui.h b/include/clap/ext/gui.h @@ -17,7 +17,13 @@ /// 6. clap_plugin_gui->hide()/show() ... /// 7. clap_plugin_gui->destroy() when done with the gui /// -/// Resizing the window: +/// Resizing the window (initiated by the plugin): +/// 1. Plugins calls clap_host_gui->request_resize() +/// 2. If the host returns true the new size is accepted, +/// the host doesn't have to call clap_plugin_gui->set_size(). +/// If the host returns false, the new size is rejected. +/// +/// Resizing the window (drag): /// 1. Only possible if clap_plugin_gui->can_resize() returns true /// 2. Mouse drag -> new_size /// 3. clap_plugin_gui->round_size(new_size) -> working_size @@ -82,7 +88,8 @@ typedef struct clap_plugin_gui { typedef struct clap_host_gui { /* Request the host to resize the client area to width, height. - * Return true on success, false otherwise. + * Return true if the new size is accepted, false otherwise. + * The host doesn't have to call set_size(). * [main-thread] */ bool (*request_resize)(const clap_host_t *host, uint32_t width, uint32_t height);