projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Further fixes to non-cxx11 enabled builds
[ardour.git]
/
gtk2_ardour
/
windows_vst_plugin_ui.cc
diff --git
a/gtk2_ardour/windows_vst_plugin_ui.cc
b/gtk2_ardour/windows_vst_plugin_ui.cc
index 72e9952dece2d368b1edce9bf9ea9f011442c47e..7f1481998606455daab0eec2d6e2a525a01240d5 100644
(file)
--- a/
gtk2_ardour/windows_vst_plugin_ui.cc
+++ b/
gtk2_ardour/windows_vst_plugin_ui.cc
@@
-17,46
+17,49
@@
*/
*/
-#include <
fst
.h>
+#include <
gtkmm
.h>
#include <gtk/gtk.h>
#include <gtk/gtksocket.h>
#include <gtk/gtk.h>
#include <gtk/gtksocket.h>
+#include <fst.h>
#include "ardour/plugin_insert.h"
#include "ardour/windows_vst_plugin.h"
#include "windows_vst_plugin_ui.h"
#include "ardour/plugin_insert.h"
#include "ardour/windows_vst_plugin.h"
#include "windows_vst_plugin_ui.h"
-#ifdef GDK_WINDOWING_X11
-#include <gdk/gdkx.h>
-#elif defined GDK_WINDOWING_WIN32
+#ifdef PLATFORM_WINDOWS
#include <gdk/gdkwin32.h>
#include <gdk/gdkwin32.h>
-#elif defined GDK_WINDOWING_QUARTZ
-/* not yet supported */
+#elif defined __APPLE__
+// TODO
+#else
+#include <gdk/gdkx.h>
#endif
using namespace Gtk;
using namespace ARDOUR;
using namespace PBD;
#endif
using namespace Gtk;
using namespace ARDOUR;
using namespace PBD;
-WindowsVSTPluginUI::WindowsVSTPluginUI (boost::shared_ptr<PluginInsert> pi, boost::shared_ptr<VSTPlugin> vp)
+WindowsVSTPluginUI::WindowsVSTPluginUI (boost::shared_ptr<PluginInsert> pi, boost::shared_ptr<VSTPlugin> vp
, GtkWidget *parent
)
: VSTPluginUI (pi, vp)
{
#ifdef GDK_WINDOWING_WIN32
: VSTPluginUI (pi, vp)
{
#ifdef GDK_WINDOWING_WIN32
- GtkWindow* wobj = win->gobj();
- gtk_widget_realize(GTK_WIDGET(wobj));
- void* hWndHost = gdk_win32_drawable_get_handle(GTK_WIDGET(wobj)->window);
+ gtk_widget_realize(parent);
+ void* hWndHost = gdk_win32_drawable_get_handle(parent->window);
fst_run_editor (_vst->state(), hWndHost);
fst_run_editor (_vst->state(), hWndHost);
+ // TODO pack a placeholder (compare to VSTPluginUI::VSTPluginUI X11 socket)
+ // have placeholder use VSTPluginUI::get_preferred_height(), width()
+ // TODO pack plugin_analysis_expander at the bottom.
#else
fst_run_editor (_vst->state(), NULL);
#else
fst_run_editor (_vst->state(), NULL);
-#endif
-
-
pack_start (plugin_analysis_expander, true, true);
pack_start (plugin_analysis_expander, true, true);
+#endif
}
WindowsVSTPluginUI::~WindowsVSTPluginUI ()
{
}
WindowsVSTPluginUI::~WindowsVSTPluginUI ()
{
+ fst_destroy_editor (_vst->state());
+
// plugin destructor destroys the custom GUI, via Windows fun-and-games,
// and then our PluginUIWindow does the rest
}
// plugin destructor destroys the custom GUI, via Windows fun-and-games,
// and then our PluginUIWindow does the rest
}
@@
-85,10
+88,10
@@
WindowsVSTPluginUI::forward_key_event (GdkEventKey* ev)
/* buffer full */
return;
}
/* buffer full */
return;
}
-
+
int special_windows_key = 0;
int character_windows_key = 0;
int special_windows_key = 0;
int character_windows_key = 0;
-
+
switch (ev->keyval) {
case GDK_Left:
special_windows_key = 0x25;
switch (ev->keyval) {
case GDK_Left:
special_windows_key = 0x25;
@@
-110,11
+113,11
@@
WindowsVSTPluginUI::forward_key_event (GdkEventKey* ev)
character_windows_key = ev->keyval;
break;
}
character_windows_key = ev->keyval;
break;
}
-
+
fst->pending_keys[fst->n_pending_keys].special = special_windows_key;
fst->pending_keys[fst->n_pending_keys].character = character_windows_key;
fst->n_pending_keys++;
fst->pending_keys[fst->n_pending_keys].special = special_windows_key;
fst->pending_keys[fst->n_pending_keys].character = character_windows_key;
fst->n_pending_keys++;
-
+
pthread_mutex_unlock (&fst->lock);
}
pthread_mutex_unlock (&fst->lock);
}