Visual Plugin SDK |
The following functions are for Visual Plugins only. NOTES: The SAMURIZE_PLUGIN_CHAR and SAMURIZE_PLUGIN_INT types are defined as #define SAMURIZE_PLUGIN_CHAR extern "C" __declspec(dllexport) char* __stdcall
In Delphi they are simply the PChar and Integer types. Function List |
SAMURIZE_PLUGIN_INT vis_configure(int id) |
VISUAL PLUGINS ONLY vis_configure() is called when the user clicks on the "Configure..." button in Samurize. You can display some kind of popup window that allows users to specify various display settings for this visual plugin. Note that you need to store the settings for each meter individually for saving later on. This function is optional - if it is not provided, you will not be able to specify settings on a meter-by-meter basis. Parameters:
This function should always return 0. |
SAMURIZE_PLUGIN_INT repaint(HDC hdc, int id, char* cValue, int width, int height) |
VISUAL PLUGINS ONLY repaint() is called every time Samurize refreshes its display. Visual plugins need to be repainted every time this occurs. The bitmap you are drawing on is a 32-bit bitmap with alpha channel. Thus if you use GDI functions to draw, the alpha will be 0 and you will see nothing. You can either use GDI+ (supports transparency) or a custom library such as the graphics32 library for Delphi. Parameters:
This function should always return 0. |
SAMURIZE_PLUGIN_INT load_settings(int id, char* inifile, char* section) |
VISUAL PLUGINS ONLY load_settings() is called when the config is loaded from file in the config editor or the clients. Your plugin should load its settings from the given section of the specified config file. Parameters:
This function should always return 0. |
SAMURIZE_PLUGIN_INT save_settings(int id, char* inifile, char* section) |
VISUAL PLUGINS ONLY save_settings() is called when the config is being saved by the config editor. Your plugin should save its settings to the given section of the specified config file. Parameters:
|
SAMURIZE_PLUGIN_INT setdefaults(int unique_id, PPluginDefaults* def) |
VISUAL PLUGINS ONLY setdefaults is called when the config editor receives the WM_SAM_CONFIGEDITOR_SETDEFAULTS message. When this is called, your plugin can set the X, Y, Width and Height of its meter via the passed pointer. Parameters:
This function should always return 0. |