From 4b982ef895e1e5d36b0be0b20e7a2810e3f16945 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 7 Mar 2017 03:22:13 +0100 Subject: Prepare moving to a dedicated x-thread signal for VST UI resizing (this changes the internal API, pending follow-up GUI update) --- libs/ardour/ardour/vst_plugin.h | 1 + libs/ardour/ardour/vst_types.h | 72 +++++++++++++++++++---------------------- 2 files changed, 35 insertions(+), 38 deletions(-) (limited to 'libs/ardour/ardour') diff --git a/libs/ardour/ardour/vst_plugin.h b/libs/ardour/ardour/vst_plugin.h index b35ef6b25e..bb172d9efd 100644 --- a/libs/ardour/ardour/vst_plugin.h +++ b/libs/ardour/ardour/vst_plugin.h @@ -62,6 +62,7 @@ public: std::set automatable() const; PBD::Signal0 LoadPresetProgram; + PBD::Signal0 VSTSizeWindow; bool parameter_is_audio (uint32_t) const { return false; } bool parameter_is_control (uint32_t) const { return true; } diff --git a/libs/ardour/ardour/vst_types.h b/libs/ardour/ardour/vst_types.h index 21e9ea01fc..9e9269e5c0 100644 --- a/libs/ardour/ardour/vst_types.h +++ b/libs/ardour/ardour/vst_types.h @@ -77,24 +77,21 @@ typedef struct _VSTHandle VSTHandle; struct LIBARDOUR_API _VSTState { - AEffect* plugin; + AEffect* plugin; + VSTHandle* handle; + audioMasterCallback amc; + + void* gtk_window_parent; + int xid; ///< X11 XWindow (wine + lxvst) - /* Linux */ + /* LXVST/X11 */ int linux_window; ///< The plugin's parent X11 XWindow int linux_plugin_ui_window; ///< The ID of the plugin UI window created by the plugin + void (* eventProc) (void * event); ///< X11 UI _XEventProc /* Windows */ void* windows_window; - int xid; ///< X11 XWindow - - int want_resize; ///< Set to signal the plugin resized its UI - void* extra_data; ///< Pointer to any extra data - - void * event_callback_thisptr; - void (* eventProc) (void * event); - - VSTHandle* handle; int width; int height; @@ -107,33 +104,32 @@ struct LIBARDOUR_API _VSTState int vst_version; int has_editor; - int program_set_without_editor; - - int want_program; - int want_chunk; - int n_pending_keys; - unsigned char * wanted_chunk; - int wanted_chunk_size; - float * want_params; - float * set_params; - - VSTKey pending_keys[16]; - - int dispatcher_wantcall; - int dispatcher_opcode; - int dispatcher_index; - int dispatcher_val; - void * dispatcher_ptr; - float dispatcher_opt; - int dispatcher_retval; - - struct _VSTState * next; - pthread_mutex_t lock; - pthread_mutex_t state_lock; - pthread_cond_t window_status_change; - pthread_cond_t plugin_dispatcher_called; - pthread_cond_t window_created; - int been_activated; + int program_set_without_editor; + int want_program; + int want_chunk; + int n_pending_keys; + unsigned char* wanted_chunk; + int wanted_chunk_size; + float* want_params; + float* set_params; + + VSTKey pending_keys[16]; + + int dispatcher_wantcall; + int dispatcher_opcode; + int dispatcher_index; + int dispatcher_val; + void* dispatcher_ptr; + float dispatcher_opt; + int dispatcher_retval; + + struct _VSTState* next; + pthread_mutex_t lock; + pthread_mutex_t state_lock; + pthread_cond_t window_status_change; + pthread_cond_t plugin_dispatcher_called; + pthread_cond_t window_created; + int been_activated; }; typedef struct _VSTState VSTState; -- cgit v1.2.3