Visual plug-in interface has not been changed since version 1.0, eventhough it could have been ameliorate. This might be done later on. Currently, Visual plugins 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. Plugins are Dynamic Linked Libraries, DLLs, which PM123 loads on use. Note that visual plugins 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 plugin must have a function that identifies it as a plugin:
int _System plugin_query(PPLUGIN_QUERYPARAM param);The plugin will then have to fill the variables in the param structure, for example:
param->type = PLUGIN_VISUAL; /* Identify the plugin as visual plugin. Types can be ORred to include multiple plugin types in the same DLL. */ param->author = "Matti Meikäläinen"; /* Author of the plugin */ param->desc = "Example plugin"; /* A short description of the plugin */ param->configurable = TRUE; /* Toggles plugin 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 plugins 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.