first part of merging windows and wine VST

libfst is now very ardour specific (no longer compatible with /upstream/)
This commit is contained in:
Robin Gareus 2014-02-21 17:28:47 +01:00
parent 99076689f7
commit 40aa7e5e90
8 changed files with 546 additions and 804 deletions

View File

@ -78,6 +78,21 @@ VSTPluginUI::package (Gtk::Window& win)
return 0;
}
bool
VSTPluginUI::on_window_show(const std::string& title)
{
_vst->state()->gui_shown = 1;
return PlugUIBase::on_window_show(title);
}
void
VSTPluginUI::on_window_hide()
{
_vst->state()->gui_shown = 0;
PlugUIBase::on_window_hide();
}
bool
VSTPluginUI::configure_handler (GdkEventConfigure*)
{

View File

@ -35,6 +35,9 @@ public:
virtual int get_preferred_height ();
virtual int get_preferred_width ();
bool on_window_show (const std::string& title);
void on_window_hide();
virtual int package (Gtk::Window &);
bool non_gtk_gui () const { return true; }

View File

@ -34,7 +34,7 @@ using namespace PBD;
WindowsVSTPluginUI::WindowsVSTPluginUI (boost::shared_ptr<PluginInsert> pi, boost::shared_ptr<VSTPlugin> vp)
: VSTPluginUI (pi, vp)
{
fst_run_editor (_vst->state());
fst_run_editor (_vst->state(), NULL);
pack_start (plugin_analysis_expander, true, true);
}

View File

@ -62,6 +62,7 @@ struct LIBARDOUR_API _VSTHandle
void* dll;
char* name;
char* nameptr;
char* path;
main_entry_t main_entry;
@ -90,13 +91,16 @@ struct LIBARDOUR_API _VSTState
void (* eventProc) (void * event);
VSTHandle* handle;
int width;
int height;
int wantIdle;
int destroy;
int vst_version;
int has_editor;
int width;
int height;
int wantIdle;
int voffset;
int gui_shown;
int destroy;
int vst_version;
int has_editor;
int program_set_without_editor;

View File

@ -3,7 +3,7 @@
#include "fst.h"
void
void
fst_error (const char *fmt, ...)
{
va_list ap;
@ -15,7 +15,7 @@ fst_error (const char *fmt, ...)
va_end (ap);
}
void
void
default_fst_error_callback (const char *desc)
{
fprintf(stderr, "%s\n", desc);

View File

@ -33,36 +33,21 @@ extern "C" {
#endif
extern int fst_init (void* possible_hmodule);
extern void fst_exit ();
extern void fst_exit (void);
extern VSTHandle* fst_load (const char*);
extern int fst_unload (VSTHandle*);
extern int fst_unload (VSTHandle**);
extern VSTState * fst_instantiate (VSTHandle *, audioMasterCallback amc, void* userptr);
extern void fst_close (VSTState *);
extern int fst_create_editor (VSTState* fst);
extern int fst_run_editor (VSTState *);
extern int fst_run_editor (VSTState *, void* window_parent);
extern void fst_destroy_editor (VSTState *);
extern void fst_move_window_into_view (VSTState *);
extern VSTInfo *fst_get_info (char *dllpathname);
extern void fst_free_info (VSTInfo *info);
extern void fst_event_loop_remove_plugin (VSTState* fst);
extern int fst_call_dispatcher (VSTState *, int, int, int, void *, float);
/**
* Load a plugin state from a file.
*/
extern int fst_load_state (VSTState *, char *);
/**
* Save a plugin state to a file.
*/
extern int fst_save_state (VSTState *, char *);
extern int wine_pthread_create (pthread_t* thread_id, const pthread_attr_t* attr, void *(*function)(void*), void* arg);
#ifdef __cplusplus
}

View File

@ -248,14 +248,14 @@ fst_get_info (char* dllpath)
if( !(h = fst_load( dllpath )) ) return NULL;
if( !(fst = fst_instantiate( h, simple_master_callback, NULL )) ) {
fst_unload( h );
fst_unload( &h );
fst_error( "instantiate failed\n" );
return NULL;
}
fstpath = fst_dllpath_to_infopath( dllpath );
if( !fstpath ) {
fst_close( fst );
fst_unload( h );
fst_unload( &h );
fst_error( "get fst filename failed\n" );
return NULL;
}
@ -264,7 +264,7 @@ fst_get_info (char* dllpath)
free( fstpath );
fst_close( fst );
fst_unload( h );
fst_unload( &h );
return info;
}
}

File diff suppressed because it is too large Load Diff