From 0bfa8e085d431e56348631cbd9fdac05b8a6885b Mon Sep 17 00:00:00 2001 From: Roelof van Krimpen Date: Mon, 18 Nov 2024 09:39:08 +0100 Subject: [PATCH] Remove global index from clap_plugin_location_element_t, add constant for transparent color in color.h --- include/clap/color.h | 2 ++ include/clap/ext/draft/location.h | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/clap/color.h b/include/clap/color.h index 3f643590..9da24fac 100644 --- a/include/clap/color.h +++ b/include/clap/color.h @@ -13,6 +13,8 @@ typedef struct clap_color { uint8_t blue; } clap_color_t; +static const CLAP_CONSTEXPR clap_color_t CLAP_COLOR_TRANSPARENT = { 0, 0, 0, 0 }; + #ifdef __cplusplus } #endif diff --git a/include/clap/ext/draft/location.h b/include/clap/ext/draft/location.h index 30ec8f01..519c4e6c 100644 --- a/include/clap/ext/draft/location.h +++ b/include/clap/ext/draft/location.h @@ -31,11 +31,8 @@ typedef struct clap_plugin_location_element { int kind; // Index within the parent element. uint32_t index_in_group; - // Index of the element in a global context. When sorting elements by this index, - // the order should mirror the order as it is displayed in the host. - uint32_t global_index; - // Color for this element, should be 0x00000000 if no color is used for this - // element. + // Color for this element, should be CLAP_COLOR_TRANSPARENT if no color is + // used for this element. clap_color_t color; } clap_plugin_location_element_t;