mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Plugin API: Add RmReplaceVariables function
This commit is contained in:
@ -44,6 +44,9 @@ namespace Rainmeter
|
||||
[DllImport("Rainmeter.dll", CharSet = CharSet.Auto)]
|
||||
private extern static unsafe double RmReadFormula(void* rm, char* option, double defValue);
|
||||
|
||||
[DllImport("Rainmeter.dll", CharSet = CharSet.Auto)]
|
||||
private extern static unsafe char* RmReplaceVariables(void* rm, char* str);
|
||||
|
||||
[DllImport("Rainmeter.dll", CharSet = CharSet.Auto)]
|
||||
private extern static unsafe char* RmPathToAbsolute(void* rm, char* relativePath);
|
||||
|
||||
@ -87,6 +90,12 @@ namespace Rainmeter
|
||||
return (int)RmReadFormula((void*)m_Rm, ToUnsafe(option), defValue);
|
||||
}
|
||||
|
||||
public unsafe string ReplaceVariables(string str)
|
||||
{
|
||||
char* value = RmReplaceVariables((void*)m_Rm, ToUnsafe(str));
|
||||
return new string(value);
|
||||
}
|
||||
|
||||
public unsafe string GetMeasureName()
|
||||
{
|
||||
char* value = (char*)RmGet((void*)m_Rm, 0);
|
||||
|
@ -39,6 +39,8 @@ LIBRARY_EXPORT LPCWSTR __stdcall RmReadString(void* rm, LPCWSTR option, LPCWSTR
|
||||
|
||||
LIBRARY_EXPORT double __stdcall RmReadFormula(void* rm, LPCWSTR option, double defValue);
|
||||
|
||||
LIBRARY_EXPORT LPCWSTR __stdcall RmReplaceVariables(void* rm, LPCWSTR str);
|
||||
|
||||
LIBRARY_EXPORT LPCWSTR __stdcall RmPathToAbsolute(void* rm, LPCWSTR relativePath);
|
||||
|
||||
LIBRARY_EXPORT void __stdcall RmExecute(void* skin, LPCWSTR command);
|
||||
|
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user