Input Plugin SDK |
|
The following functions are for Input 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
#define SAMURIZE_PLUGIN_INT extern "C" __declspec(dllexport) int __stdcall
In Delphi they are simply the PChar and Integer types.
Function List
|
SAMURIZE_PLUGIN_INT action(int id, int action, int sourcepluginid, int outputpluginid, int X, int Y, int left, int top, int right, int bottom, char* files)
|
|
INPUT PLUGINS ONLY
action() is called when ever an action occurs for example left click.
Your plugin can cope with all the actions or a subset of actions. However your plugin must not assume that the
user has assigned it to the correct action, and should perform a check before processing the command.
Parameters:
- id - the unique ID assigned to the meter by the dllstartup() function
- action - this is an integer representing the action that has occurred
- 5001 - Left mouse click has occurred
- 5002 - Right mouse click has occurred
- 5003 - Middle mouse click has occurred
- 5004 - Left mouse double click has occurred
- 5005 - Right mouse double click has occurred
- 5006 - Middle mouse double click has occurred
- 5007 - Left mouse drag has occurred
- 5008 - Right mouse drag has occurred
- 5009 - Middle mouse drag click has occurred
- 5010 - The mouse is hovering over the meter
- 5011 - The mouse has left the meter (NB: This maybe called more than once for a meter)
- 5012 - Action triggered when the mouse moves over the form
- 5013 - Action triggered when the mouse moves out of the form area
- 5020 - A user has dragged and dropped files onto that meter
- 5030 - Left mouse up click has occurred
- 5031 - Right mouse up click has occurred
- 5032 - Middle mouse up click has occurred
- 5033 - Left mouse down click has occurred
- 5034 - Right mouse down click has occurred
- 5035 - Middle mouse down click has occurred
- 5040 - Mouse Wheel Up
- 5041 - Mouse Wheel Down
- 5050 - Key press has occured
- sourcepluginid - id of the plugin source associated with this meter, 0 if no meter is associated
- outputpluginid - id of the plugin output associated with this meter, 0 if no meter is associated
- X - X location of the mouse click
- Y - Y Location of the mouse click
- left - Meter Location value - Left
- top - Meter Location value - Top
- right - Meter Location value - Right
- bottom - Meter Location value - Bottom
- Value - This is only used when a 5020 or 5050 action occurs. For a 5020 action this value contains a list of files
separated by a |. For the 5050 action it contains the key that has been pressed, or a keyword for a special key either [BACKSPACE],
[RETURN] or [ESCAPE]
Return Value:
This function should return 0.
|
|
SAMURIZE_PLUGIN_INT actionsprovided()
|
|
INPUT PLUGINS ONLY
actionsprovided() is called to determine what input actions the plugin is willing
to handle. The plugin will only be called when these actions occurs.
Return Value:
This function should return a list of Actions separated by a | for example
5001|5002|5010|5011|5020|, the list must have the tailing | at the end to ensure
the parsing of it occurs correctly.
|
|
SAMURIZE_PLUGIN_INT input_configure(int id, int action)
|
|
INPUT PLUGINS ONLY
input_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 settings
for this input 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:
- id - the unique ID of the meter being configured (that your plugin assigned to the meter
as the return value of dllstartup)
- action - Provides the action value for the configure button see action
for the full list of actions
Return Value:
This function should always return 0.
|
|
SAMURIZE_PLUGIN_INT input_load_settings(int id, char* inifile, char* section)
|
|
INPUT PLUGINS ONLY
input_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:
- id - the unique ID assigned to the meter by the dllstartup() function
- inifile - the full path to the config file
- section - the section of the config file where the values are listed
Return Value:
This function should always return 0.
|
|
SAMURIZE_PLUGIN_INT input_save_settings(int id, char* inifile, char* section)
|
|
INPUT PLUGINS ONLY
input_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:
- id - the unique ID assigned to the meter by the dllstartup() function
- inifile - the full path to the config file
- section - the section of the config file where the values should be saved
|
|