diff options
author | David Robillard <d@drobilla.net> | 2011-02-22 07:57:23 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-02-22 07:57:23 +0000 |
commit | 3d3ae423b30e61c624b737a306d4fa66a9af411e (patch) | |
tree | 807193125ae2d97ebb073c69701b8583c8afe93f /src/suil_internal.h | |
parent | 292f32b8932227e010f059de00a7df7c3b3b2a8d (diff) | |
download | suil-3d3ae423b30e61c624b737a306d4fa66a9af411e.tar.gz suil-3d3ae423b30e61c624b737a306d4fa66a9af411e.tar.bz2 suil-3d3ae423b30e61c624b737a306d4fa66a9af411e.zip |
Initial UI instance implementation.
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@3010 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/suil_internal.h')
-rw-r--r-- | src/suil_internal.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/suil_internal.h b/src/suil_internal.h index a755187..4940b69 100644 --- a/src/suil_internal.h +++ b/src/suil_internal.h @@ -21,6 +21,44 @@ #include <assert.h> #include <stdlib.h> +#include <dlfcn.h> + #include "suil/suil.h" +#define SUIL_ERRORF(fmt, ...) fprintf(stderr, "error: %s: " fmt, \ + __func__, __VA_ARGS__) + +struct _SuilUI { + char* uri; + char* type_uri; + char* bundle_path; + char* binary_path; +}; + +typedef struct _SuilUI* SuilUI; + +struct _SuilUIs { + char* plugin_uri; + SuilUI* uis; + size_t n_uis; +}; + +struct _SuilInstance { + void* lib_handle; + const LV2UI_Descriptor* descriptor; + LV2UI_Handle handle; + LV2UI_Widget widget; +}; + +typedef void (*SuilVoidFunc)(); + +/** dlsym wrapper to return a function pointer (without annoying warning) */ +static inline SuilVoidFunc +suil_dlfunc(void* handle, const char* symbol) +{ + typedef SuilVoidFunc (*VoidFuncGetter)(void*, const char*); + VoidFuncGetter dlfunc = (VoidFuncGetter)dlsym; + return dlfunc(handle, symbol); +} + #endif // SUIL_INTERNAL_H |