Subject: Re: [linux-audio-dev] ladspa plugin GUI proposal
From: Paul Barton-Davis (pbd_AT_Op.Net)
Date: Fri May 26 2000 - 18:14:00 EEST
In message <Pine.LNX.4.10.10005260749430.25202-100000_AT_luca.pas.lab>you write:
>> i think you mean "which toolkits are used by each plugin", right? its
>> just another part of the GUI spec for the plugin. Once again, if the
>> host doesn't support the toolkit(s) used by the plugin, the host can
>> either reject the plugin, or build the (G)UI itself, which it may have
>> decided to do anyway.
>
>yeah, i just meant it's a hassle b/c you
>can't dynamically load the plugin without having the gui library
>installed and you can't avoid having the gui library loaded
>for you when you test. not a big deal obviously.
well, i continue to think that the LADSPA_Descriptor should declare
the GUI status of the plugin, even if the GUI (XML, .so, or whatever)
is in another file. Then you just take a look at the plugin GUI
requirements. Check this out:
#ifndef __ladspa_gui_h__
#define __ladspa_gui_h__
/* potential support for 32 toolkits */
#define LADSPA_GUI_NATIVE_GTK 0x1
#define LADSPA_GUI_NATIVE_QT 0x2
#define LADSPA_GUI_NATIVE_MOTIF 0x4
#define LADSPA_GUI_NATIVE_WHATEVER 0x8
#define LADSPA_GUI_XML 0x10
#endif
ladspa.h:
LADSPA_Descriptor {
....
unsigned int ladspa_gui_status;
}
plugin.cc:
#include "ladspa.h"
#ifdef WITH_GUI
#include "ladspa_gui.h"
#endif
.
.
.
#if WITH_GUI
descriptor->ladspa_gui_status = LADSPA_GUI_XML|LADSPA_GUI_GTK;
#else
descriptor->ladspa_gui_status = 0;
#endif
host.cc:
if (descriptor->ladspa_gui_status & LADSPA_GUI_GTK) {
build_gtk_gui (descriptor);
} else if (descriptor->ladspa_gui_status & LADSPA_GUI_XML) {
build_xml_gui (descriptor);
} else {
if (descriptor->ladspa_gui_status != 0) {
warning ("This host doesn't support GUI's other than GTK+XML");
}
build_standard_ui (descriptor);
}
Hmm. I *like* it.
--p
This archive was generated by hypermail 2b28 : Fri May 26 2000 - 20:17:52 EEST