@@ -54,14 +54,28 @@ typedef struct clap_mini_display_curve_hints {
5454
5555} clap_mini_display_curve_hints_t ;
5656
57-
5857typedef struct clap_plugin_mini_curve_display {
58+ // Returns the number of curves the plugin wants to paint.
59+ // Be aware that the space to display those curves will be small, and too much data will make
60+ // the output hard to read.
61+ uint32_t (CLAP_ABI * get_curve_count )(const clap_plugin_t * plugin );
62+
5963 // Renders the curve into the data buffer.
60- // The value 0 will be at the bottom of the curve and UINT16_MAX will be at the top.
61- // The value at index 0 will be the leftmost and the value at index data_size -1 will be the
62- // rightmost.
64+ //
65+ // The host will "stack" the curves, from the first one to the last one.
66+ // data[0] is the first curve to be painted.
67+ // data[n + 1] will be painted over data[n].
68+ // The data[n][0] will be the leftmost value and data[n][data_size -1] will be the rightmost
69+ // value.
70+ //
71+ // The value 0 and UINT16_MAX won't be painted.
72+ // The value 1 will be at the bottom of the curve and UINT16_MAX - 1 will be at the top.
73+ //
6374 // [main-thread]
64- bool (CLAP_ABI * render )(const clap_plugin_t * plugin , uint16_t * data , uint32_t data_size );
75+ bool (CLAP_ABI * render )(const clap_plugin_t * plugin ,
76+ uint32_t curve_count ,
77+ uint16_t * const * data ,
78+ uint32_t data_size );
6579
6680 // Tells the plugin if the curve is currently observed or not.
6781 // When it isn't observed render() can't be called.
@@ -97,8 +111,8 @@ typedef struct clap_host_mini_curve_display {
97111 // true if succesful. If not, return false.
98112 // [main-thread]
99113 bool (CLAP_ABI * get )(const clap_host_t * host ,
100- uint32_t kind ,
101- clap_mini_display_curve_hints_t * hints );
114+ uint32_t kind ,
115+ clap_mini_display_curve_hints_t * hints );
102116
103117 // Mark the curve as being static or dynamic.
104118 // The curve is initially considered as static, though the plugin should explicitely
0 commit comments