1313/// Embedding the window gives more control to the host, and feels more integrated.
1414/// Floating window are sometimes the only option due to technical limitations.
1515///
16+ /// The Embedding protocol is by far the most common, supported by all hosts to date,
17+ /// and a plugin author should support at least that case.
18+ ///
1619/// Showing the GUI works as follow:
1720/// 1. clap_plugin_gui->is_api_supported(), check what can work
1821/// 2. clap_plugin_gui->create(), allocates gui resources
@@ -85,7 +88,10 @@ typedef struct clap_gui_resize_hints {
8588 bool can_resize_horizontally ;
8689 bool can_resize_vertically ;
8790
88- // only if can resize horizontally and vertically
91+ // if both horizontal and vertical resize are available, do we preserve the
92+ // aspect ratio, and if so, what is the width x height aspect ratio to preserve.
93+ // These flags are unused if can_resize_horizontally or vertically are false,
94+ // and ratios are unused if preserve is false.
8995 bool preserve_aspect_ratio ;
9096 uint32_t aspect_ratio_width ;
9197 uint32_t aspect_ratio_height ;
@@ -94,7 +100,8 @@ typedef struct clap_gui_resize_hints {
94100// Size (width, height) is in pixels; the corresponding windowing system extension is
95101// responsible for defining if it is physical pixels or logical pixels.
96102typedef struct clap_plugin_gui {
97- // Returns true if the requested gui api is supported
103+ // Returns true if the requested gui api is supported, either in floating (plugin-created)
104+ // or non-floating (embedded) mode.
98105 // [main-thread]
99106 bool (CLAP_ABI * is_api_supported )(const clap_plugin_t * plugin , const char * api , bool is_floating );
100107
0 commit comments