Plugin API: Add RmReplaceVariables function

This commit is contained in:
Birunthan Mohanathas
2013-07-12 22:55:44 +03:00
parent 0d1089608c
commit dca5795929
6 changed files with 24 additions and 0 deletions

View File

@ -46,6 +46,17 @@ double __stdcall RmReadFormula(void* rm, LPCWSTR option, double defValue)
return parser.ReadFloat(measure->GetName(), option, defValue);
}
LPCWSTR __stdcall RmReplaceVariables(void* rm, LPCWSTR str)
{
NULLCHECK(str);
MeasurePlugin* measure = (MeasurePlugin*)rm;
ConfigParser& parser = measure->GetMeterWindow()->GetParser();
g_Buffer = str;
parser.ReplaceVariables(g_Buffer);
return g_Buffer.c_str();
}
LPCWSTR __stdcall RmPathToAbsolute(void* rm, LPCWSTR relativePath)
{
NULLCHECK(relativePath);

View File

@ -2,8 +2,10 @@ LIBRARY
EXPORTS
; Note: If new functions are added, the Rainmeter.lib files in Plugins\API\x32 and Plugins\API\x64
; must be replaced by the corresponding file in Library\x32\Release and Library\x64\Release.
; Set '<ExcludeTests>true</ExcludeTests>' in Rainmeter.props first to minimize the .lib size.
RmReadString
RmReadFormula
RmReplaceVariables
RmPathToAbsolute
RmExecute
RmGet