This is a new plugin interface which uses shared libraries that are
dynamically loaded into the running gEdit process when they are
required.

You need to configure gEdit with the `--with-gmodule-plugins' option
to use this new plugin interface. It will not affect your old plugins,
you can still use them. This is only designed for new plugins.

Plugin Description Files
========================

Plugins are installed in $(libexecdir)/gedit/plugins - to keep track of
dependencies you need to put some plugin description files into this
directories.

This files must have a `.plugin' suffix and have the same format than
any "normal" GNOME configuration file.

There must be one section called `Plugin' in each of the files.

The following keys are recogniced:

  name - The name of the Plugin as it appears in the Plugins Menu.

  library_name - Name of the shared library containing the plugin. This
    may be either an absolute or a relative filename if the library is
    in the same directory.

  deplib_<number> - Additional libraries which must be loaded first.
    <number> is any number, libraries are loaded in the order given
    by their number.

Example:
-------

[Plugin]
name=GDB Source Editor
library_name=libsource_edit.so
deplib_0=/home/baulig/INSTALL/lib/libORBitutil.so
deplib_1=/home/baulig/INSTALL/lib/libIIOP.so
deplib_2=/home/baulig/INSTALL/lib/libORBit.so

Writing your own plugins
========================

First, you need to include <gE_plugin.h>. This header file is used both
in gEdit and in all plugins since they share some data structures.

There is a `gE_Plugin_Info' type declared in this header file which is
used to store information about your plugin:

	typedef void (*gE_Plugin_InitFunc)	(gE_Plugin_Object *);

	struct _gE_Plugin_Info
	{
		gchar *plugin_name;
		gE_Plugin_InitFunc init_func;
	};

You need to declare a global, initialized variable of this type in your
plugin and call it "gedit_plugin_info".

This structure currently has the following fields:

  plugin_name - The name of your plugin (currently unused).

  init_func - Pointer to a custom initialization function, if this is not
    NULL it is called with a pointer to the gE_Plugin_Object when the
    plugin is loaded.

This is the first version of this plugin interface - so it may change
in future ...

Martin <martin@home-of-linux.org>

Btw: To see a working example, have a look at GNOME GDB in the `ggdb' module !

