# Host

typedef struct SuilHostImpl SuilHost

  UI host descriptor.

  This contains the various functions that a plugin UI may use to communicate with the plugin. It is passed to `suil_instance_new()` to provide these functions to the UI.

SuilHost *suil_host_new(SuilPortWriteFunc write_func, SuilPortIndexFunc index_func, SuilPortSubscribeFunc subscribe_func, SuilPortUnsubscribeFunc unsubscribe_func)

  Create a new UI host descriptor.

  Parameters:

    - write_func – Function to send a value to a plugin port.

    - index_func – Function to get the index for a port by symbol.

    - subscribe_func – Function to subscribe to port updates.

    - unsubscribe_func – Function to unsubscribe from port updates.

void suil_host_set_touch_func(SuilHost *host, SuilTouchFunc touch_func)

  Set a touch function for a host descriptor.

  Note this function will only be called if the UI supports it.

void suil_host_free(SuilHost *host)

  Free `host`.