How to write a Kmud plugin
==========================

All examples assume that you want to write a plugin named "myplugin".

1. Copy all files in the template_kmudplg directory into another subdirectory.
This subdirectory must be located in the same directory.
(example: kmud/plugins/myplugin_kmudplg/)

2. Rename the source files (plgtemplate.[h|cpp]) to your name
(plgmyplugin.[h|cpp])

3. Edit the source files so that the classname and everything else has
the correct names (myplugin instead of template).

4. Edit the Makefile.am and change everything that has a "template" in it's
name so that it has "myplugin" in it's name instead.


These four steps should enable you to have a basic plugin. Try

make -f Makefile.dist
./configure
make

in your plugin directory to see if it works.
Now you can start to implement your desired functionality. You should have a
look to the KmudPlugin class of Kmud, which every plugin class derives from.

The plugin-name must end with "_kmudplg" so that your plugin (i.e. shared
library) is something like libmyplugin_kmudplg.so.1.1.0.
The Kmud pluginmanager looks for all *_kmudplg.so files in:

$LD_LIBRARY_PATH      - for plugin developers (like you ;-)
$HOME/.kde/lib/kmud/  - for users without root access
$KDEDIR/lib/kmud/     - normal "make install"

So you can set your LD_LIBRARY_PATH to kmud/plugins/myplugin_kmudplg/.libs/. That way
you don't need to "make install" everytime you recompiled your plugin.

If you have any problems just send me a mail. Also contact me if you want to
have your plugin listed on the plugin page at www.kmud.de.


Stephan Uhlmann <suhlmann@gmx.de>, ICQ:53637201

