diff options
author | David Robillard <d@drobilla.net> | 2011-12-10 04:40:00 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-12-10 04:40:00 +0000 |
commit | c545e17c4d3d1f0bf791e9112d2873de01c06e51 (patch) | |
tree | 3cb5257796cf59d78d024c6525894ce122a08c60 /src/suil_internal.h | |
parent | 5810fec09eee8491744482b882a635ab8e3d7e78 (diff) | |
download | suil-c545e17c4d3d1f0bf791e9112d2873de01c06e51.tar.gz suil-c545e17c4d3d1f0bf791e9112d2873de01c06e51.tar.bz2 suil-c545e17c4d3d1f0bf791e9112d2873de01c06e51.zip |
Rework module interface to support modules that need to pass features.
Pass experimental parent window ID feature for embedding X11 UIs with events working.
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@3851 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/suil_internal.h')
-rw-r--r-- | src/suil_internal.h | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/src/suil_internal.h b/src/suil_internal.h index 5987f1c..bcf0777 100644 --- a/src/suil_internal.h +++ b/src/suil_internal.h @@ -45,29 +45,42 @@ struct SuilHostImpl { void* gtk_lib; }; +struct _SuilWrapper; + +typedef void (*SuilWrapperFreeFunc)(struct _SuilWrapper*); + +typedef int (*SuilWrapperWrapFunc)(struct _SuilWrapper* wrapper, + SuilInstance* instance); + +typedef struct _SuilWrapper { + SuilWrapperWrapFunc wrap; + SuilWrapperFreeFunc free; + void* lib; + LV2_Feature** features; + void* impl; +} SuilWrapper; + struct SuilInstanceImpl { void* lib_handle; const LV2UI_Descriptor* descriptor; LV2UI_Handle handle; + SuilWrapper* wrapper; SuilWidget ui_widget; SuilWidget host_widget; }; /** - Type of a module's suil_wrap_init function. + The type of the suil_wrapper_new entry point in a wrapper module. - This initialisation function must be called before instantiating any UI that - will need to be wrapped by this wrapper (e.g. it will perform any - initialisation required to create a widget for the given toolkit). + This constructs a SuilWrapper which contains everything necessary + to wrap a widget, including a possibly extended features array to + be used for instantiating the UI. */ -typedef int (*SuilWrapInitFunc)(SuilHost* host, - const char* host_type_uri, - const char* ui_type_uri, - const LV2_Feature* const* features); - -typedef int (*SuilWrapFunc)(const char* host_type_uri, - const char* ui_type_uri, - SuilInstance* instance); +typedef SuilWrapper* (*SuilWrapperNewFunc)( + SuilHost* host, + const char* host_type_uri, + const char* ui_type_uri, + const LV2_Feature* const* features); typedef void (*SuilVoidFunc)(); |