diff options
author | David Robillard <d@drobilla.net> | 2012-04-11 04:48:38 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-04-11 04:48:38 +0000 |
commit | f6263cffe3289c8d8c1566195fbf0f4d14ffdc27 (patch) | |
tree | 96c3ec5a8a28207b335d018e0468b0e8b3e7b0fc /src/host.c | |
parent | 1b3485bcd0fa09e44aff5457db1d399b611a7151 (diff) | |
download | suil-f6263cffe3289c8d8c1566195fbf0f4d14ffdc27.tar.gz suil-f6263cffe3289c8d8c1566195fbf0f4d14ffdc27.tar.bz2 suil-f6263cffe3289c8d8c1566195fbf0f4d14ffdc27.zip |
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
Diffstat (limited to 'src/host.c')
-rw-r--r-- | src/host.c | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -24,16 +24,28 @@ suil_host_new(SuilPortWriteFunc write_func, SuilPortUnsubscribeFunc unsubscribe_func) { SuilHost* host = malloc(sizeof(struct SuilHostImpl)); - host->write_func = write_func; - host->index_func = index_func; - host->subscribe_func = subscribe_func; - host->unsubscribe_func = unsubscribe_func; - host->gtk_lib = NULL; + host->write_func = write_func; + host->port_map.handle = host; + host->port_map.port_index = index_func; + host->port_subscribe.handle = host; + host->port_subscribe.subscribe = subscribe_func; + host->port_subscribe.unsubscribe = unsubscribe_func; + host->touch.handle = host; + host->touch.touch = NULL; + host->gtk_lib = NULL; return host; } SUIL_API void +suil_host_set_touch_func(SuilHost* host, + SuilTouchFunc touch_func) +{ + host->touch.touch = touch_func; +} + +SUIL_API +void suil_host_free(SuilHost* host) { if (host) { |