Visual plug-in interface has not been changed since version 1.0, eventhough they could be ameliorated in the future. Currently, Visual plug-ins allow the creation of internal or external windows and they can tap into PM123 in several ways: they can retrieve currently playing samples, control PM123 and so on. Plug-ins are Dynamic Linked Libraries, DLLs, which PM123 loads on use. Note that visual plug-ins cannot be loaded via PM123's Properties dialog because they are skin specific. They can of course be loaded when loading a new skin.
plugin.h contains the necessary structures for all pm123 plug-ins. A plug-in must have a function that identifies it as a plug-in:
int _System plugin_query(PPLUGIN_QUERYPARAM param);The plug-in will then have to fill the variables in the param structure, for example:
param->type = PLUGIN_VISUAL; /* Identify the plug-in as
visual plug-in. Types can be ORred to include multiple plug-in types in
the same DLL. */
param->author = "Matti Meikäläinen";
/* Author of the plug-in */
param->desc = "Example plug-in";
/* A short description of the plug-in */
param->configurable = TRUE;
/* Toggles plug-in configurability via PM123 Properties dialog */
If you set param->configurable = TRUE, configuration dialog should appear when PM123 calls
int _System plugin_configure(HWND hwnd, HMODULE module);where hwnd is the notebook window so that you can "lock" your window on it if you want and where module can be used to load a resource from your DLL
Visual plug-ins should deinitialize and destroy their windows and free allocated memory when receiving a
int _System plugin_deinit(int unload);It can also be used to save settings in your INI file for other sort of plug-ins.