
This is a brief description of how to make a plugin for XFracky.

See plugin.c or simple.c for *real* examples :-)

A plugin may contain 4 exported functions:

name            - the actual fractal loop [mandatory]
name_init       - initialization code for the fractal [optional]
                  The init-routine receives a structure with information
                  about the current resolution, animation time etc.
name_exit       - cleanup code for the fractal [optional]
name_tcl        - a tcl-script handling the input for the fractal [optional]
                  This tcl-script gets a window path as an argument. This
                  window should contain the gui.

Furthermore the plugin should contain an "_init()" routine. This
routine is automagically executed when a plugin is loaded. The
init routine must *register fractals* in the file by calling

register_fractal( name, menuname );	- where name is the name of the
                                        - fractal code and menuname is
                                        - an optional name to display
                                        - in the type menu of XFracky.

If the tcl-script "name_tcl" has any global variables that needs
to be accessed from the fractal (init) code then a function
"tcl_get_var(name)" is available. This function returns a string
containing the contents of the variable.

Include "xfracky.h" to get the prototypes and information about the
info-structure that the init-routine is called with.

If you want more information send me an e-mail.

- Henrik
  igkhwj@unidhp.uni-c.dk

