suil.h   suil.h 
skipping to change at line 30 skipping to change at line 30
#ifndef SUIL_SUIL_H #ifndef SUIL_SUIL_H
#define SUIL_SUIL_H #define SUIL_SUIL_H
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include "lv2/lv2plug.in/ns/lv2core/lv2.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h"
#ifdef SUIL_SHARED #ifdef SUIL_SHARED
# ifdef __WIN32__ # ifdef _WIN32
# define SUIL_LIB_IMPORT __declspec(dllimport) # define SUIL_LIB_IMPORT __declspec(dllimport)
# define SUIL_LIB_EXPORT __declspec(dllexport) # define SUIL_LIB_EXPORT __declspec(dllexport)
# else # else
# define SUIL_LIB_IMPORT __attribute__((visibility("default"))) # define SUIL_LIB_IMPORT __attribute__((visibility("default")))
# define SUIL_LIB_EXPORT __attribute__((visibility("default"))) # define SUIL_LIB_EXPORT __attribute__((visibility("default")))
# endif # endif
# ifdef SUIL_INTERNAL # ifdef SUIL_INTERNAL
# define SUIL_API SUIL_LIB_EXPORT # define SUIL_API SUIL_LIB_EXPORT
# else # else
# define SUIL_API SUIL_LIB_IMPORT # define SUIL_API SUIL_LIB_IMPORT
skipping to change at line 82 skipping to change at line 82
UI controller. UI controller.
This is an opaque pointer passed by the user which is passed to the vari ous This is an opaque pointer passed by the user which is passed to the vari ous
UI control functions (e.g. SuilPortWriteFunc). It is typically used to pass UI control functions (e.g. SuilPortWriteFunc). It is typically used to pass
a pointer to some controller object the host uses to communicate with a pointer to some controller object the host uses to communicate with
plugins. plugins.
*/ */
typedef void* SuilController; typedef void* SuilController;
/** Function to write/send a value to a port. */ /** Function to write/send a value to a port. */
typedef void (*SuilPortWriteFunc)(SuilController controller, typedef void (*SuilPortWriteFunc)(
uint32_t port_index, SuilController controller,
uint32_t buffer_size, uint32_t port_index,
uint32_t protocol, uint32_t buffer_size,
void const* buffer); uint32_t protocol,
void const* buffer);
/** Function to return the index for a port by symbol. */ /** Function to return the index for a port by symbol. */
typedef uint32_t (*SuilPortIndexFunc)(SuilController controller, typedef uint32_t (*SuilPortIndexFunc)(
const char* port_symbol); SuilController controller,
const char* port_symbol);
/** Function to subscribe to notifications for a port. */ /** Function to subscribe to notifications for a port. */
typedef uint32_t (*SuilPortSubscribeFunc)(SuilController control typedef uint32_t (*SuilPortSubscribeFunc)(
ler, SuilController controller,
uint32_t port_in uint32_t port_index,
dex, uint32_t protocol,
uint32_t protoco const LV2_Feature* const* features);
l,
const LV2_Feature* const* feature
s);
/** Function to unsubscribe from notifications for a port. */ /** Function to unsubscribe from notifications for a port. */
typedef uint32_t (*SuilPortUnsubscribeFunc)(SuilController contr typedef uint32_t (*SuilPortUnsubscribeFunc)(
oller, SuilController controller,
uint32_t port_ uint32_t port_index,
index, uint32_t protocol,
uint32_t proto const LV2_Feature* const* features);
col,
const LV2_Feature* const* featu /** Function called when a control is grabbed or released. */
res); typedef void (*SuilTouchFunc)(
SuilController controller,
uint32_t port_index,
bool grabbed);
/** /**
Create a new UI host descriptor. Create a new UI host descriptor.
@param write_func Function to send a value to a plugin port. @param write_func Function to send a value to a plugin port.
@param index_func Function to get the index for a port by symbol. @param index_func Function to get the index for a port by symbol.
@param subscribe_func Function to subscribe to port updates. @param subscribe_func Function to subscribe to port updates.
@param unsubscribe_func Function to unsubscribe from port updates. @param unsubscribe_func Function to unsubscribe from port updates.
*/ */
SUIL_API SUIL_API
SuilHost* SuilHost*
suil_host_new(SuilPortWriteFunc write_func, suil_host_new(SuilPortWriteFunc write_func,
SuilPortIndexFunc index_func, SuilPortIndexFunc index_func,
SuilPortSubscribeFunc subscribe_func, SuilPortSubscribeFunc subscribe_func,
SuilPortUnsubscribeFunc unsubscribe_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. Free @c host.
*/ */
SUIL_API SUIL_API
void void
suil_host_free(SuilHost* host); suil_host_free(SuilHost* host);
/** /**
Check if suil can wrap a UI type. Check if suil can wrap a UI type.
@param host_type_uri The URI of the desired widget type of the host, @param host_type_uri The URI of the desired widget type of the host,
corresponding to the @c type_uri parameter of @ref suil_instance_new. corresponding to the @c type_uri parameter of @ref suil_instance_new.
 End of changes. 6 change blocks. 
24 lines changed or deleted 36 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/