On the weekend I checked in the new plugin framework for dia.  It has a
few benefits over the old system.  One is that it uses the libtool .la
files to deduce the correct filename for the shared library, which should
fix the problems with knowing what suffix shared libraries have.  Another
is the ability to get some information about the currently installed
plugins.  It also has the ability to unload plugins (if the plugin says it
can be unloaded -- currently none of the plugins implement this).

I have just commited the new plugins dialog for dia.  This allows you to
view the info on each of the plugin types, load/unload them and specify
whether a plugin should be loaded on startup.

Here is a brief description of how a plugin is now initialised:

The plugin should have a version check function.  This can be implemented
by calling the DIA_PLUGIN_CHECK_INIT macro.

The initialisation entry point into the plugin is the dia_plugin_init
function.  It is passed a PluginInfo structure as an argument.  The
function should calld dia_plugin_info_init to set the plugin's name,
description and unload functions (passing NULL for the unload functions
means the plugin can't be unloaded).

After calling dia_plugin_info_init, it should register its objects or
export filters or what ever else the plugin does.  The function should
return DIA_PLUGIN_INIT_OK on successful initialisation.

If anyone has any comments on the new plugin interface, please share them.

James.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


Reply via email to