From f6263cffe3289c8d8c1566195fbf0f4d14ffdc27 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 11 Apr 2012 04:48:38 +0000 Subject: Add suil_host_set_touch_func. Saner feature array manipulation. Implement port index and subscribe/unsubscribe functions via new UI features. git-svn-id: http://svn.drobilla.net/lad/trunk/suil@4160 a436a847-0d15-0410-975c-d299462d15a1 --- suil/suil.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'suil/suil.h') diff --git a/suil/suil.h b/suil/suil.h index d025df9..3c3ce19 100644 --- a/suil/suil.h +++ b/suil/suil.h @@ -105,6 +105,12 @@ typedef uint32_t (*SuilPortUnsubscribeFunc)( uint32_t protocol, const LV2_Feature* const* features); +/** Function called when a control is grabbed or released. */ +typedef void (*SuilTouchFunc)( + SuilController controller, + uint32_t port_index, + bool grabbed); + /** Create a new UI host descriptor. @param write_func Function to send a value to a plugin port. @@ -119,6 +125,16 @@ suil_host_new(SuilPortWriteFunc write_func, SuilPortSubscribeFunc subscribe_func, SuilPortUnsubscribeFunc unsubscribe_func); +/** + Set a touch function for a host descriptor. + + Note this function will only be called if the UI supports it. +*/ +SUIL_API +void +suil_host_set_touch_func(SuilHost* host, + SuilTouchFunc touch_func); + /** Free @c host. */ -- cgit v1.2.1