commit c80eeda71c82c9199da450f1d055f721d23d371a
parent 120eaaa5991ec4aed7e2f3c041ddfe97d3a027c7
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date: Sat, 17 Dec 2022 11:44:50 +0100
Need to check ahead of time if the menu builder supports the given item kind
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/include/clap/ext/draft/context-menu.h b/include/clap/ext/draft/context-menu.h
@@ -86,6 +86,10 @@ typedef struct clap_context_menu_builder {
bool(CLAP_ABI *add_item)(const struct clap_context_menu_builder *builder,
clap_context_menu_item_kind_t item_kind,
const void *item_data);
+
+ // Returns true if the menu builder supports the given item kind
+ bool(CLAP_ABI *supports)(const struct clap_context_menu_builder *builder,
+ clap_context_menu_item_kind_t item_kind);
} clap_context_menu_builder_t;
typedef struct clap_plugin_context_menu {