next up previous contents
Next: Namespaces Up: Python Scripting Previous: Initialisation   Contents

Callback Functions (Hooks)

There are a number of callbacks available which will be called from different places within Mahogany. These are defined in the header file Mcallbacks.h. The documentation of these callbacks can be found in the Classes documentation(Classes online docs). All of these callbacks are called with at least two arguments:

  1. The name of the hook for which the function got called, e.g. FolderOpenHook
  2. A pointer to the object from which it was called. E.g. for FolderOpenHook, this would be a pointer to a MailFolder object. This object does not carry a useable type with it and needs to be converted in the callback, e.g. if the argument is called arg and the object is a MailFolder, the object must either be used as MailFolder.MailFolder(arg) or be converted as mf = MailFolder.MailFolder(arg).
  3. Some callbacks have a third argument. This is either a single value or a tuple holding several values.



Charlie & 2001-04-19