Monkey API

Chapter 5. Monkey API

5.1. Introduction

The Monkey API allows to extend the Monkey features and behavior through plugins, which are shared libraries loaded on startup. It also provides a set of specific functions to make easier the developer work.

In a Plugin context, exists two sets of functions: 'api functions' and 'hook functions'. API functions are provided through the plugin_api structure passed to the plugin on startup when the _mkp_init() hook function is invoked. This structure contains the API functions to handle strings, events, memory and others.

In the other side, hook functions are callbacks used by Monkey depending of the type of plugin defined. For an easy identification, all hooks functions are prefixed with _mkp_. Please check the following sections for more details.