The Plugin API: Writing Plugins

[Note] The breve Plugin API

In order to build plugins for breve, you'll need the breve plugin API which is included with all command-line distributions of breve. You'll also need a C compiler—the instructions here assume you're using GCC.

In addition to the documentation listed here, you should also look at the sample plugin files included with the breve distribution. These samples show how to build simple plugins for Mac OS X, Linux and Windows.

A number of the names and symbols have been changed from versions of the breve plugin API prior to version 2.0, though the older symbols should be preserved for backward compatibility. Still, you will most likely have to rebuild your plugin using the 2.0 header file to ensure continued compatibility.

In order to write plugins for breve, you'll need to follow a few simple steps.

  1. compose C wrapper functions around your external code (C or C++), [link]

  2. create an "entry point function" in C which will load your functions into the breve engine [link]

  3. write a class (or classes) to interface with your newly created functions