Fixed some Lua related issues.

Removed some internal functions from exposed functions for Lua.
Code cleanup and optimizing for VC2010.
This commit is contained in:
spx 2011-02-15 13:22:19 +00:00
parent b01465a20a
commit 1ba57f2adf
37 changed files with 754 additions and 1127 deletions

View File

@ -337,7 +337,7 @@ void UpdateWidgets()
++i;
}
if (g_Plugins.size() > 0)
if (!g_Plugins.empty())
{
ListView_SetItemState(widget, 0, LVIS_SELECTED, LVIS_SELECTED);
}

View File

@ -132,7 +132,7 @@ void CConfigParser::ReadVariables()
{
std::vector<std::wstring> listVariables = GetKeys(L"Variables");
for (size_t i = 0; i < listVariables.size(); ++i)
for (size_t i = 0, isize = listVariables.size(); i < isize; ++i)
{
SetVariable(listVariables[i], ReadString(L"Variables", listVariables[i].c_str(), L"", false));
}
@ -278,7 +278,7 @@ void CConfigParser::SetMultiMonitorVariables(bool reset)
const MULTIMONITOR_INFO& multimonInfo = CSystem::GetMultiMonitorInfo();
const std::vector<MONITOR_INFO>& monitors = multimonInfo.monitors;
for (size_t i = 0; i < monitors.size(); ++i)
for (size_t i = 0, isize = monitors.size(); i < isize; ++i)
{
WCHAR buffer2[64];
@ -592,12 +592,12 @@ const std::wstring& CConfigParser::ReadString(LPCTSTR section, LPCTSTR key, LPCT
std::wstring strDefault = defValue;
// If the template is defined read the value first from there.
if (!m_StyleTemplate.empty())
if (m_StyleTemplate.size() > 0)
{
std::vector<std::wstring>::const_reverse_iterator iter = m_StyleTemplate.rbegin();
for ( ; iter != m_StyleTemplate.rend(); ++iter)
{
if (!(*iter).empty())
if ((*iter).size() > 0)
{
std::wstring strSection = (*iter);
@ -630,7 +630,7 @@ const std::wstring& CConfigParser::ReadString(LPCTSTR section, LPCTSTR key, LPCT
const std::wstring& strValue = GetValue(section, key, strDefault);
result = strValue;
if (!m_LastUsedStyle.empty())
if (m_LastUsedStyle.size() > 0)
{
if (&strValue != &strDefault)
{
@ -650,12 +650,12 @@ const std::wstring& CConfigParser::ReadString(LPCTSTR section, LPCTSTR key, LPCT
if (Rainmeter && !Rainmeter->GetDummyLitestep())
{
std::string ansi = ConvertToAscii(result.c_str());
char buffer[4096]; // lets hope the buffer is large enough...
if (ansi.size() < 4096)
{
char* buffer = new char[4096]; // lets hope the buffer is large enough...
VarExpansion(buffer, ansi.c_str());
result = ConvertToWide(buffer);
delete [] buffer;
}
}
@ -685,7 +685,7 @@ bool CConfigParser::IsKeyDefined(LPCTSTR section, LPCTSTR key)
bool CConfigParser::IsValueDefined(LPCTSTR section, LPCTSTR key)
{
const std::wstring& result = ReadString(section, key, L"", false);
return (!m_LastDefaultUsed && !result.empty());
return (!m_LastDefaultUsed && result.size() > 0);
}
void CConfigParser::AddMeasure(CMeasure* pMeasure)
@ -718,7 +718,7 @@ std::vector<Gdiplus::REAL> CConfigParser::ReadFloats(LPCTSTR section, LPCTSTR ke
{
std::vector<Gdiplus::REAL> result;
const std::wstring& string = ReadString(section, key, L"");
if (!string.empty())
if (string.size() > 0)
{
std::wstring tmp = string;
if (tmp[tmp.length() - 1] != L';')
@ -728,7 +728,7 @@ std::vector<Gdiplus::REAL> CConfigParser::ReadFloats(LPCTSTR section, LPCTSTR ke
// Tokenize and parse the floats
std::vector<std::wstring> tokens = Tokenize(tmp, L";");
for (size_t i = 0; i < tokens.size(); ++i)
for (size_t i = 0, isize = tokens.size(); i < isize; ++i)
{
result.push_back((Gdiplus::REAL)ParseDouble(tokens[i], 0));
}
@ -749,7 +749,7 @@ double CConfigParser::ReadFormula(LPCTSTR section, LPCTSTR key, double defValue)
const std::wstring& result = ReadString(section, key, L"");
// Formulas must be surrounded by parenthesis
if (!result.empty() && result[0] == L'(' && result[result.size() - 1] == L')')
if (result.size() > 0 && result[0] == L'(' && result[result.size() - 1] == L')')
{
double resultValue = defValue;
char* errMsg = MathParser_Parse(m_Parser, ConvertToAscii(result.substr(1, result.size() - 2).c_str()).c_str(), &resultValue);
@ -769,7 +769,7 @@ double CConfigParser::ReadFormula(LPCTSTR section, LPCTSTR key, double defValue)
int CConfigParser::ReadFormula(const std::wstring& result, double* resultValue)
{
// Formulas must be surrounded by parenthesis
if (!result.empty() && result[0] == L'(' && result[result.size() - 1] == L')')
if (result.size() > 0 && result[0] == L'(' && result[result.size() - 1] == L')')
{
char* errMsg = MathParser_Parse(m_Parser, ConvertToAscii(result.substr(1, result.size() - 2).c_str()).c_str(), resultValue);
@ -1049,7 +1049,7 @@ void CConfigParser::ReadIniFile(const std::vector<std::wstring>& iniFileMappings
// Avoid "IniFileMapping"
std::wstring iniRead = CSystem::GetTemporaryFile(iniFileMappings, iniFile);
bool temporary = (!iniRead.empty() && iniRead != L"<>");
bool temporary = (iniRead.size() > 0 && iniRead != L"<>");
if (temporary)
{

View File

@ -32,7 +32,7 @@ void CGroup::InitializeGroup(const std::wstring& groups)
m_OldGroups = groups;
m_Groups.clear();
if (!groups.empty())
if (groups.size() > 0)
{
std::vector<std::wstring> vGroups = CConfigParser::Tokenize(groups, L"|");
@ -40,7 +40,7 @@ void CGroup::InitializeGroup(const std::wstring& groups)
for ( ; iter != vGroups.end(); ++iter)
{
std::wstring group = CreateGroup(*iter);
if (!group.empty())
if (group.size() > 0)
{
m_Groups.insert(group);
}

View File

@ -610,7 +610,7 @@ void Log(int nLevel, const WCHAR* message)
void LogWithArgs(int nLevel, const WCHAR* format, ... )
{
WCHAR buffer[4096];
WCHAR* buffer = new WCHAR[4096];
va_list args;
va_start( args, format );
@ -618,15 +618,17 @@ void LogWithArgs(int nLevel, const WCHAR* format, ... )
_CrtSetReportMode(_CRT_ASSERT, 0);
errno = 0;
_vsnwprintf_s( buffer, _TRUNCATE, format, args );
_vsnwprintf_s( buffer, 4096, _TRUNCATE, format, args );
if (errno != 0)
{
nLevel = LOG_ERROR;
_snwprintf_s(buffer, _TRUNCATE, L"LogWithArgs() internal error: %s", format);
_snwprintf_s(buffer, 4096, _TRUNCATE, L"LogWithArgs() internal error: %s", format);
}
_set_invalid_parameter_handler(oldHandler);
LSLog(nLevel, L"Rainmeter", buffer);
va_end(args);
delete [] buffer;
}

View File

@ -196,14 +196,14 @@ const WCHAR* CMeasure::CheckSubstitute(const WCHAR* buffer)
{
str = buffer;
for (size_t i = 0; i < m_Substitute.size(); i += 2)
for (size_t i = 0, isize = m_Substitute.size(); i < isize; i += 2)
{
if (str.empty() && m_Substitute[i].empty())
{
// Empty result and empty substitute -> use second
str = m_Substitute[i + 1];
}
else if (m_Substitute[i].size() > 0)
else if (!m_Substitute[i].empty())
{
size_t start = 0;
size_t pos = std::wstring::npos;
@ -267,54 +267,65 @@ bool CMeasure::ParseSubstitute(std::wstring buffer)
*/
std::wstring CMeasure::ExtractWord(std::wstring& buffer)
{
std::wstring::size_type end = 0;
std::wstring::size_type pos = 0;
std::wstring::size_type end, len;
std::wstring ret;
if (buffer.empty()) return ret;
len = buffer.size();
// Remove whitespaces
std::wstring::size_type notwhite = buffer.find_first_not_of(L" \t\n");
buffer.erase(0, notwhite);
if (buffer[0] == L'\"' || buffer[0] == L'\'')
end = 0;
while (end < len && (buffer[end] == L' ' || buffer[end] == L'\t' || buffer[end] == L'\n')) ++end;
if (end == len)
{
WCHAR quote = buffer[0];
end = 1; // Skip the '"'
// Quotes around the word
while (buffer[end] != quote && end < buffer.size()) ++end;
if (buffer[end] == quote)
{
ret = buffer.substr(1, end - 1);
buffer.erase(0, end + 1);
}
else
{
// End of string reached
ret = buffer.substr(end);
buffer.erase(0, end);
}
// End of line reached
end = std::wstring::npos;
}
else
{
end = 0;
while ((buffer[end] != L',') && (buffer[end] != L':') && (buffer[end] != L' ') && (buffer[end] != L'\t') && end < buffer.size()) ++end;
buffer.erase(0, end);
len = buffer.size();
if (end == buffer.size())
if (buffer[0] == L'\"' || buffer[0] == L'\'')
{
// End of line reached
ret = buffer;
buffer.erase(0, end);
WCHAR quote = buffer[0];
end = 1; // Skip the '"'
// Quotes around the word
while (end < len && (buffer[end] != quote)) ++end;
if (end == len) end = std::wstring::npos;
if (end != std::wstring::npos)
{
ret = buffer.substr(1, end - 1);
++end;
}
else
{
// End of string reached - discard result
}
}
else
{
ret = buffer.substr(0, end + 1); // The separator is also returned!
buffer.erase(0, end + 1);
end = 0;
while (end < len && (buffer[end] != L',' && buffer[end] != L':' && buffer[end] != L' ' && buffer[end] != L'\t')) ++end;
if (end == len) end = std::wstring::npos;
if (end == std::wstring::npos)
{
// End of line reached
ret = buffer;
}
else
{
ret = buffer.substr(0, ++end); // The separator is also returned!
}
}
}
buffer.erase(0, end);
return ret;
}
@ -436,22 +447,24 @@ bool CMeasure::PostUpdate()
{
if (m_AverageSize > 0)
{
if (m_AverageValues.size() == 0)
if (!m_AverageValues.empty())
{
m_AverageValues.resize(m_AverageSize, m_Value);
}
m_AverageValues[m_AveragePos] = m_Value;
size_t averageValuesSize = m_AverageValues.size();
++m_AveragePos;
m_AveragePos %= m_AverageValues.size();
m_AveragePos %= averageValuesSize;
// Calculate the average value
m_Value = 0;
for (size_t i = 0; i < m_AverageValues.size(); ++i)
for (size_t i = 0; i < averageValuesSize; ++i)
{
m_Value += m_AverageValues[i];
}
m_Value = m_Value / (double)m_AverageValues.size();
m_Value /= (double)averageValuesSize;
}
return true;
}

View File

@ -389,14 +389,15 @@ ULONG64 CMeasureNet::GetNetOctets(NET net)
ULONG64 CMeasureNet::GetNetStatsValue(NET net)
{
ULONG64 value = 0;
size_t statsSize = c_StatValues.size() / 2;
if (m_Interface == 0)
{
// Get all interfaces
for(size_t i = 0; i < c_StatValues.size() / 2; ++i)
for(size_t i = 0; i < statsSize; ++i)
{
// Ignore the loopback and filter interfaces
if (c_NumOfTables == c_StatValues.size() / 2)
if (c_NumOfTables == statsSize)
{
if (c_UseNewApi)
{
@ -429,7 +430,7 @@ ULONG64 CMeasureNet::GetNetStatsValue(NET net)
else
{
// Get the selected interface
if (m_Interface <= c_StatValues.size() / 2)
if (m_Interface <= statsSize)
{
switch (net)
{
@ -517,13 +518,15 @@ void CMeasureNet::UpdateStats()
{
if (c_Table)
{
size_t statsSize = c_NumOfTables * 2;
// Fill the vectors
while (c_StatValues.size() < c_NumOfTables * 2)
while (c_StatValues.size() < statsSize)
{
c_StatValues.push_back(0);
}
while (c_OldStatValues.size() < c_NumOfTables * 2)
while (c_OldStatValues.size() < statsSize)
{
c_OldStatValues.push_back(0);
}
@ -617,11 +620,13 @@ void CMeasureNet::WriteStats(const std::wstring& iniFile)
{
WCHAR buffer[32];
WCHAR buffer2[64];
size_t statsSize = c_StatValues.size() / 2;
_snwprintf_s(buffer, _TRUNCATE, L"%i", (int)c_StatValues.size() / 2);
_snwprintf_s(buffer, _TRUNCATE, L"%i", (int)statsSize);
WritePrivateProfileString(L"Statistics", L"NetStatsCount", buffer, iniFile.c_str());
for (size_t i = 0; i < c_StatValues.size() / 2; ++i)
for (size_t i = 0; i < statsSize; ++i)
{
ULARGE_INTEGER value;

View File

@ -58,7 +58,7 @@ bool CMeasureRegistry::Update()
if(m_RegKey != NULL)
{
DWORD size = 4096;
WCHAR data[4096];
WCHAR* data = new WCHAR[size];
DWORD type = 0;
if(RegQueryValueEx(m_RegKey,
@ -98,6 +98,8 @@ bool CMeasureRegistry::Update()
m_StringValue.erase();
RegOpenKeyEx(m_HKey, m_RegKeyName.c_str(), 0, KEY_READ, &m_RegKey);
}
delete [] data;
}
else
{

View File

@ -116,7 +116,7 @@ bool CMeasureTime::Update()
if (m_Format.size() > 0)
{
// If there is some date format, parse the value from it instead
WCHAR tmpSz[MAX_LINE_LENGTH];
WCHAR* tmpSz = new WCHAR[MAX_LINE_LENGTH];
SYSTEMTIME sysToday;
FILETIME ftToday;
@ -152,6 +152,8 @@ bool CMeasureTime::Update()
}
m_Value = wcstod(tmpSz, NULL);
delete [] tmpSz;
}
else
{

View File

@ -648,7 +648,7 @@ void CMeter::ReplaceToolTipMeasures(std::wstring& str)
if (!m_AllMeasures.empty())
{
// Get the values for the measures
for (size_t i = 0; i < m_AllMeasures.size(); ++i)
for (size_t i = 0, isize = m_AllMeasures.size(); i < isize; ++i)
{
stringValues.push_back(m_AllMeasures[i]->GetStringValue(AUTOSCALE_ON, 1, 0, false));
}

View File

@ -44,14 +44,14 @@ public:
bool HasDynamicVariables() { return m_DynamicVariables; }
virtual int GetH() { return m_Hidden ? 0 : m_H; }
virtual int GetW() { return m_Hidden ? 0 : m_W; }
virtual int GetH() { return m_Hidden ? 0 : m_H; }
virtual int GetX(bool abs = false);
virtual int GetY(bool abs = false);
void SetW(int w) { m_W = w; }
void SetH(int h) { m_H = h; }
RECT GetMeterRect();
void SetW(int w) { m_W = w; }
void SetH(int h) { m_H = h; }
void SetX(int x) { m_X = x; m_RelativeX = POSITION_ABSOLUTE; }
void SetY(int y) { m_Y = y; m_RelativeY = POSITION_ABSOLUTE; }

View File

@ -191,7 +191,7 @@ bool CMeterImage::Update()
stringValues.push_back(val);
// Get the values for the other measures
for (size_t i = 0; i < m_Measures.size(); ++i)
for (size_t i = 0, isize = m_Measures.size(); i < isize; ++i)
{
stringValues.push_back(m_Measures[i]->GetStringValue(AUTOSCALE_OFF, 1, 0, false));
}

View File

@ -489,7 +489,7 @@ bool CMeterString::Update()
if (m_Measure) stringValues.push_back(m_Measure->GetStringValue(m_AutoScale, m_Scale, decimals, m_Percentual));
// Get the values for the other measures
for (size_t i = 0; i < m_Measures.size(); ++i)
for (size_t i = 0, isize = m_Measures.size(); i < isize; ++i)
{
stringValues.push_back(m_Measures[i]->GetStringValue(m_AutoScale, m_Scale, decimals, m_Percentual));
}
@ -498,7 +498,7 @@ bool CMeterString::Update()
m_String = m_Prefix;
if (m_Text.empty())
{
if (stringValues.size() > 0)
if (!stringValues.empty())
{
m_String += stringValues[0];
}

View File

@ -734,14 +734,7 @@ void CMeterWindow::RunBang(BANGCOMMAND bang, const WCHAR* arg)
case BANG_SHOW:
m_Hidden = false;
ShowWindow(m_Window, SW_SHOWNOACTIVATE);
if (m_WindowHide == HIDEMODE_FADEOUT)
{
UpdateTransparency(255, false);
}
else
{
UpdateTransparency(m_AlphaValue, false);
}
UpdateTransparency((m_WindowHide == HIDEMODE_FADEOUT) ? 255 : m_AlphaValue, false);
break;
case BANG_HIDE:
@ -757,14 +750,7 @@ void CMeterWindow::RunBang(BANGCOMMAND bang, const WCHAR* arg)
m_Hidden = false;
if (!IsWindowVisible(m_Window))
{
if (m_WindowHide == HIDEMODE_FADEOUT)
{
FadeWindow(0, 255);
}
else
{
FadeWindow(0, m_AlphaValue);
}
FadeWindow(0, (m_WindowHide == HIDEMODE_FADEOUT) ? 255 : m_AlphaValue);
}
break;
@ -799,56 +785,28 @@ void CMeterWindow::RunBang(BANGCOMMAND bang, const WCHAR* arg)
case BANG_CLICKTHROUGH:
{
int f = _wtoi(arg);
if (f == -1)
{
SetClickThrough(!m_ClickThrough);
}
else
{
SetClickThrough(f != 0);
}
SetClickThrough((f == -1) ? !m_ClickThrough : f);
}
break;
case BANG_DRAGGABLE:
{
int f = _wtoi(arg);
if (f == -1)
{
SetWindowDraggable(!m_WindowDraggable);
}
else
{
SetWindowDraggable(f != 0);
}
SetWindowDraggable((f == -1) ? !m_WindowDraggable : f);
}
break;
case BANG_SNAPEDGES:
{
int f = _wtoi(arg);
if (f == -1)
{
SetSnapEdges(!m_SnapEdges);
}
else
{
SetSnapEdges(f != 0);
}
SetSnapEdges((f == -1) ? !m_SnapEdges : f);
}
break;
case BANG_KEEPONSCREEN:
{
int f = _wtoi(arg);
if (f == -1)
{
SetKeepOnScreen(!m_KeepOnScreen);
}
else
{
SetKeepOnScreen(f != 0);
}
SetKeepOnScreen((f == -1) ? !m_KeepOnScreen : f);
}
break;
@ -938,14 +896,11 @@ void CMeterWindow::RunBang(BANGCOMMAND bang, const WCHAR* arg)
if (!measure.empty())
{
std::list<CMeasure*>::const_iterator iter = m_Measures.begin();
for( ; iter != m_Measures.end(); ++iter)
CMeasure* m = GetMeasure(measure);
if (m)
{
if (_wcsicmp((*iter)->GetName(), measure.c_str()) == 0)
{
(*iter)->ExecuteBang(args.c_str());
return;
}
m->ExecuteBang(args.c_str());
return;
}
LogWithArgs(LOG_WARNING, L"Unable to find [%s] for !RainmeterPluginBang", measure.c_str());
@ -1492,7 +1447,7 @@ void CMeterWindow::ScreenToWindow()
if (hMonitor != NULL)
{
for (size_t i = 0; i < monitors.size(); ++i)
for (size_t i = 0, isize = monitors.size(); i < isize; ++i)
{
if (monitors[i].active && monitors[i].handle == hMonitor)
{
@ -1639,7 +1594,7 @@ void CMeterWindow::ReadConfig()
if (!m_Rainmeter->GetDummyLitestep())
{
char tmpSz[MAX_LINE_LENGTH];
char* tmpSz = new char[MAX_LINE_LENGTH];
// Check if step.rc has overrides these values
if (GetRCString("RainmeterWindowX", tmpSz, ConvertToAscii(m_WindowX.c_str()).c_str(), MAX_LINE_LENGTH - 1))
{
@ -1649,6 +1604,7 @@ void CMeterWindow::ReadConfig()
{
m_WindowY = ConvertToWide(tmpSz);
}
delete [] tmpSz;
}
// Check if the window position should be read as a formula
@ -1934,9 +1890,9 @@ bool CMeterWindow::ReadSkin()
// Get all the sections (i.e. different meters, measures and the other stuff)
std::vector<std::wstring> arraySections = m_Parser.GetSections();
for (size_t i = 0; i < arraySections.size(); ++i)
for (size_t i = 0, isize = arraySections.size(); i < isize; ++i)
{
std::wstring strSection = arraySections[i];
const std::wstring& strSection = arraySections[i];
if(_wcsicmp(L"Rainmeter", strSection.c_str()) != 0 &&
_wcsicmp(L"Variables", strSection.c_str()) != 0 &&
@ -4838,7 +4794,7 @@ std::wstring CMeterWindow::MakePathAbsolute(const std::wstring& path)
}
CMeter* CMeterWindow::GetMeter(std::wstring meterName)
CMeter* CMeterWindow::GetMeter(const std::wstring& meterName)
{
std::list<CMeter*>::const_iterator j = m_Meters.begin();
for( ; j != m_Meters.end(); ++j)
@ -4852,14 +4808,14 @@ CMeter* CMeterWindow::GetMeter(std::wstring meterName)
return 0;
}
CMeasure* CMeterWindow::GetMeasure(std::wstring measureName)
CMeasure* CMeterWindow::GetMeasure(const std::wstring& measureName)
{
std::list<CMeasure*>::const_iterator j = m_Measures.begin();
for( ; j != m_Measures.end(); ++j)
std::list<CMeasure*>::const_iterator i = m_Measures.begin();
for( ; i != m_Measures.end(); ++i)
{
if (_wcsicmp((*j)->GetName(), measureName.c_str()) == 0)
if (_wcsicmp((*i)->GetName(), measureName.c_str()) == 0)
{
return (*j);
return (*i);
}
}
return 0;

View File

@ -179,11 +179,6 @@ public:
const std::wstring& GetSkinName() { return m_SkinName; }
const std::wstring& GetSkinIniFile() { return m_SkinIniFile; }
// Added by Peter Souza IV / psouza4 / 2010.12.13
//
// Public read-only access to the skin's pathname (necessary for the plugin bridge)
const std::wstring& GetSkinPath() { return m_SkinPath; }
std::list<CMeasure*>& GetMeasures() { return m_Measures; }
std::list<CMeter*>& GetMeters() { return m_Meters; }
@ -223,9 +218,9 @@ public:
Gdiplus::PrivateFontCollection* GetPrivateFontCollection() { return m_FontCollection; }
CMeter* GetMeter(std::wstring meterName);
CMeasure* GetMeasure(std::wstring measureName);
CMeter* GetMeter(const std::wstring& meterName);
CMeasure* GetMeasure(const std::wstring& measureName);
const char* ReplaceVariables(const char* p_str);
protected:

View File

@ -92,7 +92,7 @@ std::vector<std::wstring> CRainmeter::ParseString(LPCTSTR str)
}
// Strip the quotes from all strings
for (size_t i = 0; i < result.size(); ++i)
for (size_t i = 0, isize = result.size(); i < isize; ++i)
{
size_t pos = result[i].find(L"\"");
while (pos != std::wstring::npos)
@ -300,7 +300,7 @@ LPCTSTR PluginBridge(LPCTSTR _sCommand, LPCTSTR _sData)
const std::wstring& config = subStrings[0];
std::wstring arguments;
for (size_t i = 1; i < subStrings.size(); ++i)
for (size_t i = 1, isize = subStrings.size(); i < isize; ++i)
{
if (i != 1) arguments += L" ";
arguments += subStrings[i];
@ -367,6 +367,7 @@ void BangWithArgs(BANGCOMMAND bang, const WCHAR* arg, size_t numOfArgs)
if(Rainmeter)
{
std::vector<std::wstring> subStrings = CRainmeter::ParseString(arg);
size_t subStringsSize = subStrings.size();
std::wstring config;
std::wstring argument;
@ -374,15 +375,15 @@ void BangWithArgs(BANGCOMMAND bang, const WCHAR* arg, size_t numOfArgs)
for (size_t i = 0; i < numOfArgs; ++i)
{
if (i != 0) argument += L" ";
if (i < subStrings.size())
if (i < subStringsSize)
{
argument += subStrings[i];
}
}
if (subStrings.size() >= numOfArgs)
if (subStringsSize >= numOfArgs)
{
if (subStrings.size() > numOfArgs)
if (subStringsSize > numOfArgs)
{
config = subStrings[numOfArgs];
}
@ -413,9 +414,10 @@ void BangWithArgs(BANGCOMMAND bang, const WCHAR* arg, size_t numOfArgs)
else
{
// No config defined -> apply to all.
std::map<std::wstring, CMeterWindow*>::const_iterator iter = Rainmeter->GetAllMeterWindows().begin();
const std::map<std::wstring, CMeterWindow*>& windows = Rainmeter->GetAllMeterWindows();
std::map<std::wstring, CMeterWindow*>::const_iterator iter = windows.begin();
for (; iter != Rainmeter->GetAllMeterWindows().end(); ++iter)
for (; iter != windows.end(); ++iter)
{
((*iter).second)->RunBang(bang, argument.c_str());
}
@ -1189,11 +1191,11 @@ void RainmeterActivateConfigWide(const WCHAR* arg)
{
const std::vector<CRainmeter::CONFIG>& configs = Rainmeter->GetAllConfigs();
for (int i = 0; i < (int)configs.size(); ++i)
for (int i = 0, isize = (int)configs.size(); i < isize; ++i)
{
if (_wcsicmp(configs[i].config.c_str(), subStrings[0].c_str()) == 0)
{
for (int j = 0; j < (int)configs[i].iniFiles.size(); ++j)
for (int j = 0, jsize = (int)configs[i].iniFiles.size(); j < jsize; ++j)
{
if (_wcsicmp(configs[i].iniFiles[j].c_str(), subStrings[1].c_str()) == 0)
{
@ -1225,7 +1227,7 @@ void RainmeterDeactivateConfigWide(const WCHAR* arg)
{
std::vector<std::wstring> subStrings = CRainmeter::ParseString(arg);
if (subStrings.size() > 0)
if (!subStrings.empty())
{
CMeterWindow* mw = Rainmeter->GetMeterWindow(subStrings[0]);
if (mw)
@ -1285,7 +1287,7 @@ void RainmeterDeactivateConfigGroupWide(const WCHAR* arg)
{
std::vector<std::wstring> subStrings = CRainmeter::ParseString(arg);
if (subStrings.size() > 0)
if (!subStrings.empty())
{
std::multimap<int, CMeterWindow*> windows;
Rainmeter->GetMeterWindowsByLoadOrder(windows, subStrings[0]);
@ -1344,7 +1346,7 @@ void RainmeterSkinMenuWide(const WCHAR* arg)
{
std::vector<std::wstring> subStrings = CRainmeter::ParseString(arg);
if (subStrings.size() > 0)
if (!subStrings.empty())
{
CMeterWindow* mw = Rainmeter->GetMeterWindow(subStrings[0]);
if (mw)
@ -1596,10 +1598,7 @@ CRainmeter::CRainmeter() :
*/
CRainmeter::~CRainmeter()
{
while (m_Meters.size() > 0)
{
DeleteMeterWindow((*m_Meters.begin()).second, false); // This removes the window from the vector
}
DeleteMeterWindow(NULL, false); // This removes the window from the vector
if (m_TrayWindow) delete m_TrayWindow;
@ -1643,21 +1642,22 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath)
}
m_Instance = Instance;
WCHAR tmpSz[MAX_LINE_LENGTH];
GetModuleFileName(m_Instance, tmpSz, MAX_LINE_LENGTH);
WCHAR* tmpSzPath = new WCHAR[MAX_LINE_LENGTH];
GetModuleFileName(m_Instance, tmpSzPath, MAX_LINE_LENGTH);
// Remove the module's name from the path
WCHAR* pos = wcsrchr(tmpSz, L'\\');
WCHAR* pos = wcsrchr(tmpSzPath, L'\\');
if(pos)
{
*(pos + 1) = L'\0';
}
else
{
tmpSz[0] = L'\0';
tmpSzPath[0] = L'\0';
}
m_Path = tmpSz;
m_Path = tmpSzPath;
if(!c_DummyLitestep) InitalizeLitestep();
@ -1752,10 +1752,10 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath)
m_SkinPath += L"Skins\\";
// Read the skin folder from the ini file
tmpSz[0] = L'\0';
if (GetPrivateProfileString(L"Rainmeter", L"SkinPath", L"", tmpSz, MAX_LINE_LENGTH, m_IniFile.c_str()) > 0)
tmpSzPath[0] = L'\0';
if (GetPrivateProfileString(L"Rainmeter", L"SkinPath", L"", tmpSzPath, MAX_LINE_LENGTH, m_IniFile.c_str()) > 0)
{
m_SkinPath = tmpSz;
m_SkinPath = tmpSzPath;
ExpandEnvironmentVariables(m_SkinPath);
if (!m_SkinPath.empty())
@ -1770,12 +1770,12 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath)
else if (bDefaultIniLocation)
{
// If the skin path is not defined in the Rainmeter.ini file use My Documents/Rainmeter/Skins
tmpSz[0] = L'\0';
HRESULT hr = SHGetFolderPath(NULL, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, tmpSz);
tmpSzPath[0] = L'\0';
HRESULT hr = SHGetFolderPath(NULL, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, tmpSzPath);
if (SUCCEEDED(hr))
{
// Make the folders if they don't exist yet
m_SkinPath = tmpSz;
m_SkinPath = tmpSzPath;
m_SkinPath += L"\\Rainmeter";
CreateDirectory(m_SkinPath.c_str(), NULL);
m_SkinPath += L"\\Skins\\";
@ -1806,9 +1806,12 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath)
}
WritePrivateProfileString(L"Rainmeter", L"SkinPath", m_SkinPath.c_str(), m_IniFile.c_str());
delete [] tmpSzPath;
tmpSzPath = NULL;
if (!c_DummyLitestep)
{
char tmpSz[MAX_LINE_LENGTH];
char* tmpSz = new char[MAX_LINE_LENGTH];
// Check if step.rc has overrides these values
if (GetRCString("RainmeterIniFile", tmpSz, NULL, MAX_LINE_LENGTH - 1))
@ -1826,6 +1829,8 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath)
m_PluginPath = ConvertToWide(tmpSz);
}
delete [] tmpSz;
if (!m_SkinPath.empty())
{
WCHAR ch = m_SkinPath[m_SkinPath.size() - 1];
@ -2013,7 +2018,7 @@ void CRainmeter::CheckSkinVersions()
std::vector<CONFIGMENU> menu;
ScanForConfigsRecursive(strMainSkinsPath, L"", 0, menu, true);
for (size_t i = 0; i < menu.size(); ++i)
for (size_t i = 0, isize = menu.size(); i < isize; ++i)
{
// LogWithArgs(LOG_DEBUG, L"%s", menu[i].name.c_str());
@ -2144,18 +2149,20 @@ int CRainmeter::CompareVersions(const std::wstring& strA, const std::wstring& st
std::vector<std::wstring> arrayA = CConfigParser::Tokenize(strA, L".");
std::vector<std::wstring> arrayB = CConfigParser::Tokenize(strB, L".");
size_t arrayASize = arrayA.size();
size_t arrayBSize = arrayB.size();
size_t len = max(arrayA.size(), arrayB.size());
size_t len = max(arrayASize, arrayBSize);
for (size_t i = 0; i < len; ++i)
{
int a = 0;
int b = 0;
if (i < arrayA.size())
if (i < arrayASize)
{
a = _wtoi(arrayA[i].c_str());
}
if (i < arrayB.size())
if (i < arrayBSize)
{
b = _wtoi(arrayB[i].c_str());
}
@ -2212,7 +2219,7 @@ void CRainmeter::ActivateConfig(int configIndex, int iniIndex)
{
const std::wstring skinIniFile = m_ConfigStrings[configIndex].iniFiles[iniIndex];
const std::wstring skinConfig = m_ConfigStrings[configIndex].config;
const std::wstring skinPath = m_ConfigStrings[configIndex].path;
const std::wstring& skinPath = m_SkinPath;
// Verify that the config is not already active
std::map<std::wstring, CMeterWindow*>::const_iterator iter = m_Meters.find(skinConfig);
@ -2270,7 +2277,7 @@ bool CRainmeter::DeactivateConfig(CMeterWindow* meterWindow, int configIndex)
{
// Deactivate the config by using the meter window's config name
const std::wstring skinConfig = meterWindow->GetSkinName();
for (size_t i = 0; i < m_ConfigStrings.size(); ++i)
for (size_t i = 0, isize = m_ConfigStrings.size(); i < isize; ++i)
{
if (_wcsicmp(skinConfig.c_str(), m_ConfigStrings[i].config.c_str()) == 0)
{
@ -2340,15 +2347,20 @@ bool CRainmeter::DeleteMeterWindow(CMeterWindow* meterWindow, bool bLater)
{
if (bLater)
{
m_DelayDeleteList.push_back(meterWindow);
meterWindow->RunBang(BANG_HIDEFADE, NULL); // Fade out the window
if (meterWindow)
{
m_DelayDeleteList.push_back(meterWindow);
meterWindow->RunBang(BANG_HIDEFADE, NULL); // Fade out the window
}
}
else
{
m_DelayDeleteList.remove(meterWindow); // Remove the window from the delete later list if it is there
if (meterWindow)
{
m_DelayDeleteList.remove(meterWindow); // Remove the window from the delete later list if it is there
}
std::map<std::wstring, CMeterWindow*>::iterator iter = m_Meters.begin();
for (; iter != m_Meters.end(); ++iter)
{
if (meterWindow == NULL)
@ -2380,7 +2392,6 @@ bool CRainmeter::DeleteMeterWindow(CMeterWindow* meterWindow, bool bLater)
CMeterWindow* CRainmeter::GetMeterWindow(const std::wstring& config)
{
std::map<std::wstring, CMeterWindow*>::const_iterator iter = m_Meters.begin();
for (; iter != m_Meters.end(); ++iter)
{
if (_wcsicmp((*iter).first.c_str(), config.c_str()) == 0)
@ -2399,18 +2410,20 @@ CMeterWindow* CRainmeter::GetMeterWindow(const std::wstring& config)
// the config, this is used to convert the INI filename to a config name.
CMeterWindow* CRainmeter::GetMeterWindowByINI(const std::wstring& ini_searching)
{
std::map<std::wstring, CMeterWindow*>::const_iterator iter = m_Meters.begin();
for (; iter != m_Meters.end(); ++iter)
if (_wcsnicmp(m_SkinPath.c_str(), ini_searching.c_str(), m_SkinPath.length()) == 0)
{
std::wstring ini_current = (*iter).second->GetSkinPath();
ini_current += (*iter).second->GetSkinName();
ini_current += L"\\";
ini_current += (*iter).second->GetSkinIniFile();
const std::wstring config_searching = ini_searching.substr(m_SkinPath.length());
if (_wcsicmp(ini_current.c_str(), ini_searching.c_str()) == 0)
std::map<std::wstring, CMeterWindow*>::const_iterator iter = m_Meters.begin();
for (; iter != m_Meters.end(); ++iter)
{
return (*iter).second;
std::wstring config_current = (*iter).second->GetSkinName() + L"\\";
config_current += (*iter).second->GetSkinIniFile();
if (_wcsicmp(config_current.c_str(), config_searching.c_str()) == 0)
{
return (*iter).second;
}
}
}
@ -2420,7 +2433,6 @@ CMeterWindow* CRainmeter::GetMeterWindowByINI(const std::wstring& ini_searching)
CMeterWindow* CRainmeter::GetMeterWindow(HWND hwnd)
{
std::map<std::wstring, CMeterWindow*>::const_iterator iter = m_Meters.begin();
for (; iter != m_Meters.end(); ++iter)
{
if ((*iter).second->GetWindow() == hwnd)
@ -2613,7 +2625,6 @@ int CRainmeter::ScanForConfigsRecursive(const std::wstring& path, std::wstring b
{
// Scan for ini-files
CONFIG config;
config.path = path;
config.config = base;
config.active = false;
@ -2984,7 +2995,7 @@ BOOL CRainmeter::ExecuteBang(const std::wstring& bang, const std::wstring& arg,
std::wstring::size_type start = std::wstring::npos;
std::wstring::size_type end = std::wstring::npos;
int count = 0;
for (size_t i = 0; i < arg.size(); ++i)
for (size_t i = 0, isize = arg.size(); i < isize; ++i)
{
if (arg[i] == L'[')
{
@ -3059,8 +3070,9 @@ std::wstring CRainmeter::ParseCommand(const WCHAR* command, CMeterWindow* meterW
{
if (meterWindow)
{
std::list<CMeasure*>::const_iterator iter = meterWindow->GetMeasures().begin();
for( ; iter != meterWindow->GetMeasures().end(); ++iter)
const std::list<CMeasure*>& measures = meterWindow->GetMeasures();
std::list<CMeasure*>::const_iterator iter = measures.begin();
for( ; iter != measures.end(); ++iter)
{
if (_wcsicmp((*iter)->GetName(), measureName.c_str()) == 0)
{
@ -3070,9 +3082,9 @@ std::wstring CRainmeter::ParseCommand(const WCHAR* command, CMeterWindow* meterW
break;
}
}
if (iter == meterWindow->GetMeasures().end())
if (iter == measures.end())
{
LogWithArgs(LOG_WARNING, L"No such measure [%s] for execute string: %s", measureName.c_str(), command);
//LogWithArgs(LOG_WARNING, L"No such measure [%s] for execute string: %s", measureName.c_str(), command);
start = end + 1;
}
}
@ -3290,7 +3302,7 @@ void CRainmeter::ReadGeneralSettings(const std::wstring& iniFile)
// Check which configs are active
if (!c_DummyLitestep)
{
char tmpSz[MAX_LINE_LENGTH];
char* tmpSz = new char[MAX_LINE_LENGTH];
std::wstring skinName;
std::wstring skinIni = L"Rainmeter.ini";
@ -3304,6 +3316,8 @@ void CRainmeter::ReadGeneralSettings(const std::wstring& iniFile)
{
skinIni = ConvertToWide(tmpSz);
}
delete [] tmpSz;
if (!skinName.empty())
{
@ -3319,7 +3333,7 @@ void CRainmeter::ReadGeneralSettings(const std::wstring& iniFile)
}
}
for (int i = 0; i < (int)m_ConfigStrings.size(); ++i)
for (int i = 0, isize = (int)m_ConfigStrings.size(); i < isize; ++i)
{
int active = parser.ReadInt(m_ConfigStrings[i].config.c_str(), L"Active", 0);
@ -3340,13 +3354,13 @@ void CRainmeter::ReadGeneralSettings(const std::wstring& iniFile)
*/
bool CRainmeter::SetActiveConfig(const std::wstring& skinName, const std::wstring& skinIni)
{
for (int i = 0; i < (int)m_ConfigStrings.size(); ++i)
for (int i = 0, isize = (int)m_ConfigStrings.size(); i < isize; ++i)
{
m_ConfigStrings[i].active = 0; // Disable all other configs
if (skinName == m_ConfigStrings[i].config)
{
for (int j = 0; j < (int)m_ConfigStrings[i].iniFiles.size(); ++j)
for (int j = 0, jsize = (int)m_ConfigStrings[i].iniFiles.size(); j < jsize; ++j)
{
if (skinIni == m_ConfigStrings[i].iniFiles[j])
{
@ -3395,13 +3409,13 @@ void CRainmeter::RefreshAll()
// Verify whether the cached information is valid
int found = 0;
std::wstring skinConfig = mw->GetSkinName();
for (int i = 0; i < (int)m_ConfigStrings.size(); ++i)
for (int i = 0, isize = (int)m_ConfigStrings.size(); i < isize; ++i)
{
if (_wcsicmp(skinConfig.c_str(), m_ConfigStrings[i].config.c_str()) == 0)
{
found = 1;
std::wstring skinIniFile = mw->GetSkinIniFile();
for (int j = 0; j < (int)m_ConfigStrings[i].iniFiles.size(); ++j)
for (int j = 0, jsize = (int)m_ConfigStrings[i].iniFiles.size(); j < jsize; ++j)
{
if (_wcsicmp(skinIniFile.c_str(), m_ConfigStrings[i].iniFiles[j].c_str()) == 0)
{
@ -3471,7 +3485,7 @@ void CRainmeter::UpdateDesktopWorkArea(bool reset)
{
if (!m_OldDesktopWorkAreas.empty())
{
for (size_t i = 0; i < m_OldDesktopWorkAreas.size(); ++i)
for (size_t i = 0, isize = m_OldDesktopWorkAreas.size(); i < isize; ++i)
{
RECT r = m_OldDesktopWorkAreas[i];
@ -3579,13 +3593,15 @@ void CRainmeter::UpdateDesktopWorkArea(bool reset)
*/
void CRainmeter::ReadStats()
{
WCHAR tmpSz[MAX_LINE_LENGTH];
WCHAR* tmpSz = new WCHAR[MAX_LINE_LENGTH];
if(GetPrivateProfileString(L"Statistics", L"Since", L"", tmpSz, MAX_LINE_LENGTH, m_IniFile.c_str()) > 0)
{
m_StatsDate = tmpSz;
}
delete [] tmpSz;
// Only Net measure has stats at the moment
CMeasureNet::ReadStats(m_IniFile);
}
@ -3800,11 +3816,11 @@ HMENU CRainmeter::CreateConfigMenu(std::vector<CONFIGMENU>& configMenuData)
{
HMENU configMenu = NULL;
if (configMenuData.size() > 0)
if (!configMenuData.empty())
{
configMenu = CreatePopupMenu();
for (int i = 0; i < (int)configMenuData.size(); ++i)
for (int i = 0, isize = (int)configMenuData.size(); i < isize; ++i)
{
if (configMenuData[i].index == -1)
{
@ -3833,7 +3849,7 @@ HMENU CRainmeter::CreateThemeMenu()
{
HMENU themeMenu = CreatePopupMenu();
for (size_t i = 0; i < m_Themes.size(); ++i)
for (size_t i = 0, isize = m_Themes.size(); i < isize; ++i)
{
AppendMenu(themeMenu, 0, ID_THEME_FIRST + i, m_Themes[i].c_str());
}
@ -3991,13 +4007,13 @@ HMENU CRainmeter::CreateSkinMenu(CMeterWindow* meterWindow, int index, HMENU con
ChangeSkinIndex(skinMenu, index);
// Add the variants menu
for (int i = 0; i < (int)m_ConfigStrings.size(); ++i)
for (int i = 0, isize = (int)m_ConfigStrings.size(); i < isize; ++i)
{
const CONFIG& config = m_ConfigStrings[i];
if (_wcsicmp(config.config.c_str(), skinName.c_str()) == 0)
{
HMENU variantsMenu = CreatePopupMenu();
for (int j = 0; j < (int)config.iniFiles.size(); ++j)
for (int j = 0, jsize = (int)config.iniFiles.size(); j < jsize; ++j)
{
InsertMenu(variantsMenu, j, MF_BYPOSITION, config.commands[j], config.iniFiles[j].c_str());
@ -4056,7 +4072,7 @@ void CRainmeter::CreateMonitorMenu(HMENU monitorMenu, CMeterWindow* meterWindow)
const MULTIMONITOR_INFO& multimonInfo = CSystem::GetMultiMonitorInfo();
const std::vector<MONITOR_INFO>& monitors = multimonInfo.monitors;
for (int i = 0; i < (int)monitors.size(); ++i)
for (int i = 0, isize = (int)monitors.size(); i < isize; ++i)
{
WCHAR buffer[64];
_snwprintf_s(buffer, _TRUNCATE, L"@%i: ", i + 1);
@ -4276,7 +4292,8 @@ void CRainmeter::ExpandEnvironmentVariables(std::wstring& strPath)
{
if (strPath.find(L'%') != std::wstring::npos)
{
WCHAR buffer[4096]; // lets hope the buffer is large enough...
WCHAR bufSize = 4096;
WCHAR* buffer = new WCHAR[bufSize]; // lets hope the buffer is large enough...
// %APPDATA% is a special case
std::wstring::size_type pos = strPath.find(L"%APPDATA%");
@ -4297,8 +4314,8 @@ void CRainmeter::ExpandEnvironmentVariables(std::wstring& strPath)
if (strPath.find(L'%') != std::wstring::npos)
{
// Expand the environment variables
DWORD ret = ExpandEnvironmentStrings(strPath.c_str(), buffer, 4096);
if (ret != 0 && ret < 4096)
DWORD ret = ExpandEnvironmentStrings(strPath.c_str(), buffer, bufSize);
if (ret != 0 && ret < bufSize)
{
strPath = buffer;
}
@ -4307,5 +4324,7 @@ void CRainmeter::ExpandEnvironmentVariables(std::wstring& strPath)
LogWithArgs(LOG_WARNING, L"Unable to expand the environment strings for string: %s", strPath.c_str());
}
}
delete [] buffer;
}
}

View File

@ -133,7 +133,6 @@ class CRainmeter
public:
struct CONFIG
{
std::wstring path;
std::wstring config;
std::vector<std::wstring> iniFiles;
std::vector<UINT> commands;

View File

@ -186,7 +186,7 @@ BOOL CALLBACK MyInfoEnumProc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonit
if (m->useEnumDisplayDevices)
{
for (size_t i = 0; i < m->monitors.size(); ++i)
for (size_t i = 0, isize = m->monitors.size(); i < isize; ++i)
{
if (m->monitors[i].handle == NULL && _wcsnicmp(info.szDevice, m->monitors[i].deviceName, 32) == 0)
{
@ -240,7 +240,7 @@ BOOL CALLBACK MyInfoEnumProc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonit
*/
size_t CSystem::GetMonitorCount()
{
if (c_Monitors.monitors.size() == 0)
if (c_Monitors.monitors.empty())
{
SetMultiMonitorInfo();
}
@ -492,7 +492,7 @@ void CSystem::SetMultiMonitorInfo()
c_Monitors.vsL, c_Monitors.vsT, c_Monitors.vsL + c_Monitors.vsW, c_Monitors.vsT + c_Monitors.vsH,
c_Monitors.vsW, c_Monitors.vsH);
for (size_t i = 0; i < monitors.size(); ++i)
for (size_t i = 0, isize = monitors.size(); i < isize; ++i)
{
if (monitors[i].active)
{
@ -525,7 +525,7 @@ void CSystem::UpdateWorkareaInfo()
return;
}
for (size_t i = 0; i < monitors.size(); ++i)
for (size_t i = 0, isize = monitors.size(); i < isize; ++i)
{
if (monitors[i].active && monitors[i].handle != NULL)
{
@ -1278,7 +1278,7 @@ std::wstring CSystem::GetTemporaryFile(const std::vector<std::wstring>& iniFileM
filename = iniFile;
}
for (size_t i = 0; i < iniFileMappings.size(); ++i)
for (size_t i = 0, isize = iniFileMappings.size(); i < isize; ++i)
{
if (_wcsicmp(iniFileMappings[i].c_str(), filename.c_str()) == 0)
{

View File

@ -92,7 +92,7 @@ CTrayWindow::~CTrayWindow()
delete m_Bitmap;
delete m_Measure;
for (size_t i = 0; i < m_TrayIcons.size(); ++i)
for (size_t i = 0, isize = m_TrayIcons.size(); i < isize; ++i)
{
DestroyIcon(m_TrayIcons[i]);
}
@ -274,7 +274,7 @@ void CTrayWindow::ReadConfig(CConfigParser& parser)
delete m_Measure;
m_Measure = NULL;
for (size_t i = 0; i < m_TrayIcons.size(); ++i)
for (size_t i = 0, isize = m_TrayIcons.size(); i < isize; ++i)
{
DestroyIcon(m_TrayIcons[i]);
}
@ -346,7 +346,7 @@ void CTrayWindow::ReadConfig(CConfigParser& parser)
}
}
if (m_TrayIcons.size() == 0)
if (m_TrayIcons.empty())
{
// No icons found so load as bitmap
delete m_Bitmap;
@ -495,9 +495,9 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
// Check which config was selected
const std::vector<CRainmeter::CONFIG>& configs = Rainmeter->GetAllConfigs();
for (int i = 0; i < (int)configs.size(); ++i)
for (int i = 0, isize = (int)configs.size(); i < isize; ++i)
{
for (int j = 0; j < (int)configs[i].commands.size(); ++j)
for (int j = 0, jsize = (int)configs[i].commands.size(); j < jsize; ++j)
{
if (configs[i].commands[j] == wParam)
{

View File

@ -61,7 +61,7 @@ void LuaManager::ReportErrors(lua_State * L)
void LuaManager::LuaLog(int nLevel, const char* format, ... )
{
char buffer[4096];
char* buffer = new char[4096];
va_list args;
va_start( args, format );
@ -69,10 +69,10 @@ void LuaManager::LuaLog(int nLevel, const char* format, ... )
_CrtSetReportMode(_CRT_ASSERT, 0);
errno = 0;
_vsnprintf_s( buffer, _TRUNCATE, format, args );
_vsnprintf_s( buffer, 4096, _TRUNCATE, format, args );
if (errno != 0)
{
_snprintf_s(buffer, _TRUNCATE, "Script: LuaLog internal error: %s", format);
_snprintf_s(buffer, 4096, _TRUNCATE, "Script: LuaLog internal error: %s", format);
}
_set_invalid_parameter_handler(oldHandler);
@ -87,4 +87,6 @@ void LuaManager::LuaLog(int nLevel, const char* format, ... )
LSLog(nLevel, L"Rainmeter", str.c_str());
va_end(args);
delete [] buffer;
}

View File

@ -4,28 +4,19 @@
#include "../Litestep.h"
void push_wstring(lua_State* L, void* value, const char* type)
{
std::string str2 = std::string(ConvertToAscii((const wchar_t*)value));
lua_pushstring(L,str2.c_str());
{
push_wchar(L, (void*)((const std::wstring*)value)->c_str(), type);
}
void push_wchar(lua_State* L, void* value, const char* type)
{
std::string str2 = ConvertToAscii((WCHAR*)value);
std::string str2 = ConvertToAscii((const WCHAR*)value);
lua_pushstring(L,str2.c_str());
}
std::wstring to_wstring(lua_State* L, int arg, void* type)
{
// We have a static wstring here so we can keep a copy of the string
// passed in alive while its being passed around.
// This isn't exactly safe, but we shouldn't really have to worry as
// Rainmeter isn't threaded.
static std::wstring str2 = std::wstring(L"");
str2 = ConvertToWide(lua_tostring(L,arg));
return str2;
return ConvertToWide(lua_tostring(L,arg));
}
const wchar_t* to_wchar (lua_State* L, int arg, void* type)
@ -34,7 +25,7 @@ const wchar_t* to_wchar (lua_State* L, int arg, void* type)
// passed in alive while its being passed around.
// This isn't exactly safe, but we shouldn't really have to worry as
// Rainmeter isn't threaded.
static std::wstring str = std::wstring(L"");
static std::wstring str;
str = ConvertToWide(lua_tostring(L,arg));

View File

@ -1,6 +1,6 @@
/*
** Lua binding: group
** Generated automatically by tolua++-1.0.92 on 11/22/10 21:20:13.
** Generated automatically by tolua++-1.0.92 on 02/15/11 03:01:14.
*/
#include "../../StdAfx.h"
@ -33,7 +33,7 @@ static int tolua_group_CGroup_BelongsToGroup00(lua_State* tolua_S)
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CGroup",0,&tolua_err) ||
(tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const std::wstring",0,&tolua_err)) ||
(tolua_isvaluenil(tolua_S,2,&tolua_err) || !is_wstring(tolua_S,2,"const std::wstring",0,&tolua_err)) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
@ -41,12 +41,12 @@ static int tolua_group_CGroup_BelongsToGroup00(lua_State* tolua_S)
#endif
{
CGroup* self = (CGroup*) tolua_tousertype(tolua_S,1,0);
const std::wstring* group = ((const std::wstring*) tolua_tousertype(tolua_S,2,0));
const std::wstring group = ((const std::wstring) to_wstring(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'BelongsToGroup'", NULL);
#endif
{
bool tolua_ret = (bool) self->BelongsToGroup(*group);
bool tolua_ret = (bool) self->BelongsToGroup(group);
tolua_pushboolean(tolua_S,(bool)tolua_ret);
}
}

View File

@ -1,6 +1,6 @@
/*
** Lua binding: group
** Generated automatically by tolua++-1.0.92 on 11/22/10 21:20:13.
** Generated automatically by tolua++-1.0.92 on 02/15/11 03:01:14.
*/
/* Exported function */

View File

@ -1,6 +1,6 @@
/*
** Lua binding: measure
** Generated automatically by tolua++-1.0.92 on 01/19/11 04:59:42.
** Generated automatically by tolua++-1.0.92 on 02/15/11 18:55:46.
*/
#include "../../StdAfx.h"
@ -15,9 +15,6 @@
/* Exported function */
TOLUA_API int tolua_measure_open (lua_State* tolua_S);
#include "../../MeterWindow.h"
#include "../../Litestep.h"
#include "../../Group.h"
#include "../../Measure.h"
#include "../LuaPush.h"
@ -29,34 +26,33 @@ static void tolua_reg_types (lua_State* tolua_S)
tolua_usertype(tolua_S,"WCHAR");
}
/* method: SetName of class CMeasure */
#ifndef TOLUA_DISABLE_tolua_measure_CMeasure_SetName00
static int tolua_measure_CMeasure_SetName00(lua_State* tolua_S)
/* method: GetName of class CMeasure */
#ifndef TOLUA_DISABLE_tolua_measure_CMeasure_GetName00
static int tolua_measure_CMeasure_GetName00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeasure",0,&tolua_err) ||
!is_wchar(tolua_S,2,"const WCHAR",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeasure* self = (CMeasure*) tolua_tousertype(tolua_S,1,0);
const WCHAR* name = ((const WCHAR*) to_wchar(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetName'", NULL);
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetName'", NULL);
#endif
{
self->SetName(name);
const WCHAR* tolua_ret = (const WCHAR*) self->GetName();
push_wchar(tolua_S,(void*)tolua_ret,"const WCHAR");
}
}
return 0;
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'SetName'.",&tolua_err);
tolua_error(tolua_S,"#ferror in function 'GetName'.",&tolua_err);
return 0;
#endif
}
@ -188,38 +184,6 @@ static int tolua_measure_CMeasure_IsDisabled00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetName of class CMeasure */
#ifndef TOLUA_DISABLE_tolua_measure_CMeasure_GetName00
static int tolua_measure_CMeasure_GetName00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeasure",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeasure* self = (CMeasure*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetName'", NULL);
#endif
{
const WCHAR* tolua_ret = (const WCHAR*) self->GetName();
push_wchar(tolua_S,(void*)tolua_ret,"const WCHAR");
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'GetName'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: HasDynamicVariables of class CMeasure */
#ifndef TOLUA_DISABLE_tolua_measure_CMeasure_HasDynamicVariables00
static int tolua_measure_CMeasure_HasDynamicVariables00(lua_State* tolua_S)
@ -252,39 +216,6 @@ static int tolua_measure_CMeasure_HasDynamicVariables00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: ExecuteBang of class CMeasure */
#ifndef TOLUA_DISABLE_tolua_measure_CMeasure_ExecuteBang00
static int tolua_measure_CMeasure_ExecuteBang00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeasure",0,&tolua_err) ||
!is_wchar(tolua_S,2,"const WCHAR",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeasure* self = (CMeasure*) tolua_tousertype(tolua_S,1,0);
const WCHAR* args = ((const WCHAR*) to_wchar(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ExecuteBang'", NULL);
#endif
{
self->ExecuteBang(args);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'ExecuteBang'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetValue of class CMeasure */
#ifndef TOLUA_DISABLE_tolua_measure_CMeasure_GetValue00
static int tolua_measure_CMeasure_GetValue00(lua_State* tolua_S)
@ -464,7 +395,7 @@ static int tolua_measure_CMeasure_GetStringValue00(lua_State* tolua_S)
#endif
{
CMeasure* self = (CMeasure*) tolua_tousertype(tolua_S,1,0);
AUTOSCALE autoScale = ((AUTOSCALE) (int) tolua_tonumber(tolua_S,2,0));
AUTOSCALE autoScale = ((AUTOSCALE) (int) tolua_tonumber(tolua_S,2,AUTOSCALE_OFF));
double scale = ((double) tolua_tonumber(tolua_S,3,1.0));
int decimals = ((int) tolua_tonumber(tolua_S,4,0));
bool percentual = ((bool) tolua_toboolean(tolua_S,5,false));
@ -492,16 +423,20 @@ TOLUA_API int tolua_measure_open (lua_State* tolua_S)
tolua_reg_types(tolua_S);
tolua_module(tolua_S,NULL,0);
tolua_beginmodule(tolua_S,NULL);
tolua_constant(tolua_S,"AUTOSCALE_1024",AUTOSCALE_1024);
tolua_constant(tolua_S,"AUTOSCALE_1000",AUTOSCALE_1000);
tolua_constant(tolua_S,"AUTOSCALE_1024K",AUTOSCALE_1024K);
tolua_constant(tolua_S,"AUTOSCALE_1000K",AUTOSCALE_1000K);
tolua_constant(tolua_S,"AUTOSCALE_OFF",AUTOSCALE_OFF);
tolua_constant(tolua_S,"AUTOSCALE_ON",AUTOSCALE_ON);
tolua_cclass(tolua_S,"CMeasure","CMeasure","CGroup",NULL);
tolua_beginmodule(tolua_S,"CMeasure");
tolua_function(tolua_S,"SetName",tolua_measure_CMeasure_SetName00);
tolua_function(tolua_S,"GetName",tolua_measure_CMeasure_GetName00);
tolua_function(tolua_S,"GetANSIName",tolua_measure_CMeasure_GetANSIName00);
tolua_function(tolua_S,"Disable",tolua_measure_CMeasure_Disable00);
tolua_function(tolua_S,"Enable",tolua_measure_CMeasure_Enable00);
tolua_function(tolua_S,"IsDisabled",tolua_measure_CMeasure_IsDisabled00);
tolua_function(tolua_S,"GetName",tolua_measure_CMeasure_GetName00);
tolua_function(tolua_S,"HasDynamicVariables",tolua_measure_CMeasure_HasDynamicVariables00);
tolua_function(tolua_S,"ExecuteBang",tolua_measure_CMeasure_ExecuteBang00);
tolua_function(tolua_S,"GetValue",tolua_measure_CMeasure_GetValue00);
tolua_function(tolua_S,"GetRelativeValue",tolua_measure_CMeasure_GetRelativeValue00);
tolua_function(tolua_S,"GetValueRange",tolua_measure_CMeasure_GetValueRange00);

View File

@ -1,6 +1,6 @@
/*
** Lua binding: measure
** Generated automatically by tolua++-1.0.92 on 01/19/11 04:59:42.
** Generated automatically by tolua++-1.0.92 on 02/15/11 18:55:46.
*/
/* Exported function */

View File

@ -1,6 +1,6 @@
/*
/*
** Lua binding: meter
** Generated automatically by tolua++-1.0.92 on 11/22/10 21:20:13.
** Generated automatically by tolua++-1.0.92 on 02/15/11 18:55:46.
*/
#include "../../StdAfx.h"
@ -40,37 +40,6 @@ static void tolua_reg_types (lua_State* tolua_S)
tolua_usertype(tolua_S,"WCHAR");
}
/* method: Initialize of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_Initialize00
static int tolua_meter_CMeter_Initialize00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeter",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeter* self = (CMeter*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Initialize'", NULL);
#endif
{
self->Initialize();
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'Initialize'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: Update of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_Update00
static int tolua_meter_CMeter_Update00(lua_State* tolua_S)
@ -167,38 +136,6 @@ static int tolua_meter_CMeter_HasDynamicVariables00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetH of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_GetH00
static int tolua_meter_CMeter_GetH00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeter",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeter* self = (CMeter*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetH'", NULL);
#endif
{
int tolua_ret = (int) self->GetH();
tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'GetH'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetW of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_GetW00
static int tolua_meter_CMeter_GetW00(lua_State* tolua_S)
@ -231,6 +168,38 @@ static int tolua_meter_CMeter_GetW00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetH of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_GetH00
static int tolua_meter_CMeter_GetH00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeter",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeter* self = (CMeter*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetH'", NULL);
#endif
{
int tolua_ret = (int) self->GetH();
tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'GetH'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetX of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_GetX00
static int tolua_meter_CMeter_GetX00(lua_State* tolua_S)
@ -299,6 +268,72 @@ static int tolua_meter_CMeter_GetY00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: SetW of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_SetW00
static int tolua_meter_CMeter_SetW00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeter",0,&tolua_err) ||
!tolua_isnumber(tolua_S,2,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeter* self = (CMeter*) tolua_tousertype(tolua_S,1,0);
int w = ((int) tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetW'", NULL);
#endif
{
self->SetW(w);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'SetW'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: SetH of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_SetH00
static int tolua_meter_CMeter_SetH00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeter",0,&tolua_err) ||
!tolua_isnumber(tolua_S,2,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeter* self = (CMeter*) tolua_tousertype(tolua_S,1,0);
int h = ((int) tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetH'", NULL);
#endif
{
self->SetH(h);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'SetH'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: SetX of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_SetX00
static int tolua_meter_CMeter_SetX00(lua_State* tolua_S)
@ -385,7 +420,7 @@ static int tolua_meter_CMeter_GetToolTipText00(lua_State* tolua_S)
#endif
{
const std::wstring& tolua_ret = (const std::wstring&) self->GetToolTipText();
tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const std::wstring");
push_wstring(tolua_S,(void*)&tolua_ret,"const std::wstring");
}
}
return 1;
@ -397,6 +432,38 @@ static int tolua_meter_CMeter_GetToolTipText00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: HasToolTip of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_HasToolTip00
static int tolua_meter_CMeter_HasToolTip00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeter",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeter* self = (CMeter*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasToolTip'", NULL);
#endif
{
bool tolua_ret = (bool) self->HasToolTip();
tolua_pushboolean(tolua_S,(bool)tolua_ret);
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'HasToolTip'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: SetToolTipHidden of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_SetToolTipHidden00
static int tolua_meter_CMeter_SetToolTipHidden00(lua_State* tolua_S)
@ -720,39 +787,6 @@ static int tolua_meter_CMeter_HitTest00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: SetMouseOver of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_SetMouseOver00
static int tolua_meter_CMeter_SetMouseOver00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeter",0,&tolua_err) ||
!tolua_isboolean(tolua_S,2,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeter* self = (CMeter*) tolua_tousertype(tolua_S,1,0);
bool over = ((bool) tolua_toboolean(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetMouseOver'", NULL);
#endif
{
self->SetMouseOver(over);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'SetMouseOver'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: IsMouseOver of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_IsMouseOver00
static int tolua_meter_CMeter_IsMouseOver00(lua_State* tolua_S)
@ -785,39 +819,6 @@ static int tolua_meter_CMeter_IsMouseOver00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: SetName of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_SetName00
static int tolua_meter_CMeter_SetName00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeter",0,&tolua_err) ||
!is_wchar(tolua_S,2,"const WCHAR",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeter* self = (CMeter*) tolua_tousertype(tolua_S,1,0);
const WCHAR* name = ((const WCHAR*) to_wchar(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetName'", NULL);
#endif
{
self->SetName(name);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'SetName'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetName of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_GetName00
static int tolua_meter_CMeter_GetName00(lua_State* tolua_S)
@ -850,73 +851,6 @@ static int tolua_meter_CMeter_GetName00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: SetW of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_SetW00
static int tolua_meter_CMeter_SetW00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeter",0,&tolua_err) ||
!tolua_isnumber(tolua_S,2,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeter* self = (CMeter*) tolua_tousertype(tolua_S,1,0);
int w = ((int) tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetW'", NULL);
#endif
{
self->SetW(w);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'SetW'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: SetH of class CMeter */
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_SetH00
static int tolua_meter_CMeter_SetH00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeter",0,&tolua_err) ||
!tolua_isnumber(tolua_S,2,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeter* self = (CMeter*) tolua_tousertype(tolua_S,1,0);
int h = ((int) tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetH'", NULL);
#endif
{
self->SetH(h);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'SetH'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* Open function */
TOLUA_API int tolua_meter_open (lua_State* tolua_S)
{
@ -926,19 +860,19 @@ TOLUA_API int tolua_meter_open (lua_State* tolua_S)
tolua_beginmodule(tolua_S,NULL);
tolua_cclass(tolua_S,"CMeter","CMeter","CGroup",NULL);
tolua_beginmodule(tolua_S,"CMeter");
tolua_function(tolua_S,"Initialize",tolua_meter_CMeter_Initialize00);
tolua_function(tolua_S,"Update",tolua_meter_CMeter_Update00);
tolua_function(tolua_S,"HasActiveTransition",tolua_meter_CMeter_HasActiveTransition00);
tolua_function(tolua_S,"HasDynamicVariables",tolua_meter_CMeter_HasDynamicVariables00);
tolua_function(tolua_S,"GetH",tolua_meter_CMeter_GetH00);
tolua_function(tolua_S,"GetW",tolua_meter_CMeter_GetW00);
tolua_function(tolua_S,"GetH",tolua_meter_CMeter_GetH00);
tolua_function(tolua_S,"GetX",tolua_meter_CMeter_GetX00);
tolua_function(tolua_S,"GetY",tolua_meter_CMeter_GetY00);
tolua_function(tolua_S,"SetX",tolua_meter_CMeter_SetX00);
tolua_function(tolua_S,"SetY",tolua_meter_CMeter_SetY00);
tolua_function(tolua_S,"SetW",tolua_meter_CMeter_SetW00);
tolua_function(tolua_S,"SetH",tolua_meter_CMeter_SetH00);
tolua_function(tolua_S,"SetX",tolua_meter_CMeter_SetX00);
tolua_function(tolua_S,"SetY",tolua_meter_CMeter_SetY00);
tolua_function(tolua_S,"GetToolTipText",tolua_meter_CMeter_GetToolTipText00);
tolua_function(tolua_S,"HasToolTip",tolua_meter_CMeter_HasToolTip00);
tolua_function(tolua_S,"SetToolTipHidden",tolua_meter_CMeter_SetToolTipHidden00);
tolua_function(tolua_S,"UpdateToolTip",tolua_meter_CMeter_UpdateToolTip00);
tolua_function(tolua_S,"HasMouseAction",tolua_meter_CMeter_HasMouseAction00);
@ -949,9 +883,7 @@ TOLUA_API int tolua_meter_open (lua_State* tolua_S)
tolua_function(tolua_S,"IsHidden",tolua_meter_CMeter_IsHidden00);
tolua_function(tolua_S,"GetTransformationMatrix",tolua_meter_CMeter_GetTransformationMatrix00);
tolua_function(tolua_S,"HitTest",tolua_meter_CMeter_HitTest00);
tolua_function(tolua_S,"SetMouseOver",tolua_meter_CMeter_SetMouseOver00);
tolua_function(tolua_S,"IsMouseOver",tolua_meter_CMeter_IsMouseOver00);
tolua_function(tolua_S,"SetName",tolua_meter_CMeter_SetName00);
tolua_function(tolua_S,"GetName",tolua_meter_CMeter_GetName00);
tolua_endmodule(tolua_S);
tolua_endmodule(tolua_S);
@ -965,5 +897,3 @@ TOLUA_API int tolua_meter_open (lua_State* tolua_S)
};
#endif

View File

@ -1,6 +1,6 @@
/*
** Lua binding: meter
** Generated automatically by tolua++-1.0.92 on 11/28/10 09:57:02.
** Generated automatically by tolua++-1.0.92 on 02/15/11 18:55:46.
*/
/* Exported function */

View File

@ -1,8 +1,10 @@
/*
** Lua binding: meter_image
** Generated automatically by tolua++-1.0.92 on 11/28/10 09:56:41.
** Generated automatically by tolua++-1.0.92 on 02/15/11 03:01:12.
*/
#include "../../StdAfx.h"
#ifndef __cplusplus
#include "stdlib.h"
#endif

View File

@ -1,6 +1,6 @@
/*
** Lua binding: meter_image
** Generated automatically by tolua++-1.0.92 on 11/28/10 09:56:41.
** Generated automatically by tolua++-1.0.92 on 02/15/11 03:01:12.
*/
/* Exported function */

View File

@ -1,6 +1,6 @@
/*
** Lua binding: meter_string
** Generated automatically by tolua++-1.0.92 on 11/23/10 03:16:44.
** Generated automatically by tolua++-1.0.92 on 02/15/11 03:01:13.
*/
#include "../../StdAfx.h"
@ -60,37 +60,6 @@ static int tolua_meter_string_CMeterString_GetX00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: Initialize of class CMeterString */
#ifndef TOLUA_DISABLE_tolua_meter_string_CMeterString_Initialize00
static int tolua_meter_string_CMeterString_Initialize00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeterString",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeterString* self = (CMeterString*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Initialize'", NULL);
#endif
{
self->Initialize();
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'Initialize'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: Update of class CMeterString */
#ifndef TOLUA_DISABLE_tolua_meter_string_CMeterString_Update00
static int tolua_meter_string_CMeterString_Update00(lua_State* tolua_S)
@ -157,7 +126,7 @@ static int tolua_meter_string_CMeterString_SetText00(lua_State* tolua_S)
#endif //#ifndef TOLUA_DISABLE
/* method: SetText of class CMeterString */
/* method: GetRect of class CMeterString */
#ifndef TOLUA_DISABLE_tolua_meter_string_CMeterString_GetRect00
static int tolua_meter_string_CMeterString_GetRect00(lua_State* tolua_S)
{
@ -216,7 +185,6 @@ TOLUA_API int tolua_meter_string_open (lua_State* tolua_S)
tolua_cclass(tolua_S,"CMeterString","CMeterString","CMeter",NULL);
tolua_beginmodule(tolua_S,"CMeterString");
tolua_function(tolua_S,"GetX",tolua_meter_string_CMeterString_GetX00);
tolua_function(tolua_S,"Initialize",tolua_meter_string_CMeterString_Initialize00);
tolua_function(tolua_S,"Update",tolua_meter_string_CMeterString_Update00);
tolua_function(tolua_S,"SetText",tolua_meter_string_CMeterString_SetText00);
tolua_function(tolua_S,"GetRect",tolua_meter_string_CMeterString_GetRect00);

View File

@ -1,6 +1,6 @@
/*
** Lua binding: meter_string
** Generated automatically by tolua++-1.0.92 on 11/23/10 03:16:44.
** Generated automatically by tolua++-1.0.92 on 02/15/11 03:01:13.
*/
/* Exported function */

View File

@ -1,6 +1,6 @@
/*
** Lua binding: meterwindow
** Generated automatically by tolua++-1.0.92 on 11/27/10 18:13:41.
** Generated automatically by tolua++-1.0.92 on 02/15/11 18:55:45.
*/
#include "../../StdAfx.h"
@ -17,7 +17,7 @@ TOLUA_API int tolua_meterwindow_open (lua_State* tolua_S);
#include "../../MeterWindow.h"
#include "../../Rainmeter.h"
//#include "../Litestep.h"
#include "../../Litestep.h"
#include "../LuaPush.h"
/* function to release collected object via destructor */
@ -42,51 +42,15 @@ static int tolua_collect_HWND (lua_State* tolua_S)
/* function to register type */
static void tolua_reg_types (lua_State* tolua_S)
{
tolua_usertype(tolua_S,"CMeasure");
tolua_usertype(tolua_S,"std::wstring");
tolua_usertype(tolua_S,"CGroup");
tolua_usertype(tolua_S,"CMeterWindow");
tolua_usertype(tolua_S,"CMeter");
tolua_usertype(tolua_S,"CMeasure");
tolua_usertype(tolua_S,"HWND");
tolua_usertype(tolua_S,"CRainmeter");
tolua_usertype(tolua_S,"CGroup");
tolua_usertype(tolua_S,"std::wstring");
tolua_usertype(tolua_S,"WCHAR");
}
/* method: RunBang of class CMeterWindow */
#ifndef TOLUA_DISABLE_tolua_meterwindow_CMeterWindow_RunBang00
static int tolua_meterwindow_CMeterWindow_RunBang00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeterWindow",0,&tolua_err) ||
!tolua_isnumber(tolua_S,2,0,&tolua_err) ||
!is_wchar(tolua_S,3,"const WCHAR",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,4,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeterWindow* self = (CMeterWindow*) tolua_tousertype(tolua_S,1,0);
BANGCOMMAND bang = ((BANGCOMMAND) (int) tolua_tonumber(tolua_S,2,0));
const WCHAR* arg = ((const WCHAR*) to_wchar(tolua_S,3,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RunBang'", NULL);
#endif
{
self->RunBang(bang,arg);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'RunBang'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: MoveMeter of class CMeterWindow */
#ifndef TOLUA_DISABLE_tolua_meterwindow_CMeterWindow_MoveMeter00
static int tolua_meterwindow_CMeterWindow_MoveMeter00(lua_State* tolua_S)
@ -229,6 +193,41 @@ static int tolua_meterwindow_CMeterWindow_ToggleMeter00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: UpdateMeter of class CMeterWindow */
#ifndef TOLUA_DISABLE_tolua_meterwindow_CMeterWindow_UpdateMeter00
static int tolua_meterwindow_CMeterWindow_UpdateMeter00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeterWindow",0,&tolua_err) ||
!is_wchar(tolua_S,2,"const WCHAR",0,&tolua_err) ||
!tolua_isboolean(tolua_S,3,1,&tolua_err) ||
!tolua_isnoobj(tolua_S,4,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeterWindow* self = (CMeterWindow*) tolua_tousertype(tolua_S,1,0);
const WCHAR* name = ((const WCHAR*) to_wchar(tolua_S,2,0));
bool group = ((bool) tolua_toboolean(tolua_S,3,false));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'UpdateMeter'", NULL);
#endif
{
self->UpdateMeter(name,group);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'UpdateMeter'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: DisableMeasure of class CMeterWindow */
#ifndef TOLUA_DISABLE_tolua_meterwindow_CMeterWindow_DisableMeasure00
static int tolua_meterwindow_CMeterWindow_DisableMeasure00(lua_State* tolua_S)
@ -334,15 +333,15 @@ static int tolua_meterwindow_CMeterWindow_ToggleMeasure00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: Refresh of class CMeterWindow */
#ifndef TOLUA_DISABLE_tolua_meterwindow_CMeterWindow_Refresh00
static int tolua_meterwindow_CMeterWindow_Refresh00(lua_State* tolua_S)
/* method: UpdateMeasure of class CMeterWindow */
#ifndef TOLUA_DISABLE_tolua_meterwindow_CMeterWindow_UpdateMeasure00
static int tolua_meterwindow_CMeterWindow_UpdateMeasure00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeterWindow",0,&tolua_err) ||
!tolua_isboolean(tolua_S,2,0,&tolua_err) ||
!is_wchar(tolua_S,2,"const WCHAR",0,&tolua_err) ||
!tolua_isboolean(tolua_S,3,1,&tolua_err) ||
!tolua_isnoobj(tolua_S,4,&tolua_err)
)
@ -351,19 +350,19 @@ static int tolua_meterwindow_CMeterWindow_Refresh00(lua_State* tolua_S)
#endif
{
CMeterWindow* self = (CMeterWindow*) tolua_tousertype(tolua_S,1,0);
bool init = ((bool) tolua_toboolean(tolua_S,2,0));
bool all = ((bool) tolua_toboolean(tolua_S,3,false));
const WCHAR* name = ((const WCHAR*) to_wchar(tolua_S,2,0));
bool group = ((bool) tolua_toboolean(tolua_S,3,false));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Refresh'", NULL);
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'UpdateMeasure'", NULL);
#endif
{
self->Refresh(init,all);
self->UpdateMeasure(name,group);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'Refresh'.",&tolua_err);
tolua_error(tolua_S,"#ferror in function 'UpdateMeasure'.",&tolua_err);
return 0;
#endif
}
@ -400,39 +399,6 @@ static int tolua_meterwindow_CMeterWindow_Redraw00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: SetMouseLeaveEvent of class CMeterWindow */
#ifndef TOLUA_DISABLE_tolua_meterwindow_CMeterWindow_SetMouseLeaveEvent00
static int tolua_meterwindow_CMeterWindow_SetMouseLeaveEvent00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeterWindow",0,&tolua_err) ||
!tolua_isboolean(tolua_S,2,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeterWindow* self = (CMeterWindow*) tolua_tousertype(tolua_S,1,0);
bool cancel = ((bool) tolua_toboolean(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetMouseLeaveEvent'", NULL);
#endif
{
self->SetMouseLeaveEvent(cancel);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'SetMouseLeaveEvent'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: MoveWindow of class CMeterWindow */
#ifndef TOLUA_DISABLE_tolua_meterwindow_CMeterWindow_MoveWindow00
static int tolua_meterwindow_CMeterWindow_MoveWindow00(lua_State* tolua_S)
@ -836,6 +802,134 @@ static int tolua_meterwindow_CMeterWindow_GetYFromBottom00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetW of class CMeterWindow */
#ifndef TOLUA_DISABLE_tolua_meterwindow_CMeterWindow_GetW00
static int tolua_meterwindow_CMeterWindow_GetW00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeterWindow",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeterWindow* self = (CMeterWindow*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetW'", NULL);
#endif
{
int tolua_ret = (int) self->GetW();
tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'GetW'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetH of class CMeterWindow */
#ifndef TOLUA_DISABLE_tolua_meterwindow_CMeterWindow_GetH00
static int tolua_meterwindow_CMeterWindow_GetH00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeterWindow",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeterWindow* self = (CMeterWindow*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetH'", NULL);
#endif
{
int tolua_ret = (int) self->GetH();
tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'GetH'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetX of class CMeterWindow */
#ifndef TOLUA_DISABLE_tolua_meterwindow_CMeterWindow_GetX00
static int tolua_meterwindow_CMeterWindow_GetX00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeterWindow",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeterWindow* self = (CMeterWindow*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetX'", NULL);
#endif
{
int tolua_ret = (int) self->GetX();
tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'GetX'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetY of class CMeterWindow */
#ifndef TOLUA_DISABLE_tolua_meterwindow_CMeterWindow_GetY00
static int tolua_meterwindow_CMeterWindow_GetY00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeterWindow",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CMeterWindow* self = (CMeterWindow*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetY'", NULL);
#endif
{
int tolua_ret = (int) self->GetY();
tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'GetY'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetXScreenDefined of class CMeterWindow */
#ifndef TOLUA_DISABLE_tolua_meterwindow_CMeterWindow_GetXScreenDefined00
static int tolua_meterwindow_CMeterWindow_GetXScreenDefined00(lua_State* tolua_S)
@ -1324,7 +1418,7 @@ static int tolua_meterwindow_CMeterWindow_MakePathAbsolute00(lua_State* tolua_S)
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeterWindow",0,&tolua_err) ||
(tolua_isvaluenil(tolua_S,2,&tolua_err) || !is_wstring(tolua_S,2,"std::wstring",0,&tolua_err)) ||
(tolua_isvaluenil(tolua_S,2,&tolua_err) || !is_wstring(tolua_S,2,"const std::wstring",0,&tolua_err)) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
@ -1332,7 +1426,7 @@ static int tolua_meterwindow_CMeterWindow_MakePathAbsolute00(lua_State* tolua_S)
#endif
{
CMeterWindow* self = (CMeterWindow*) tolua_tousertype(tolua_S,1,0);
std::wstring path = to_wstring(tolua_S,2,0);
const std::wstring path = ((const std::wstring) to_wstring(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MakePathAbsolute'", NULL);
#endif
@ -1342,9 +1436,7 @@ static int tolua_meterwindow_CMeterWindow_MakePathAbsolute00(lua_State* tolua_S)
#ifdef __cplusplus
push_wstring(tolua_S,(void*)&tolua_ret,"std::wstring");
#else
void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::wstring));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
push_wstring(tolua_S,(void*)&tolua_ret,"std::wstring");
#endif
}
}
@ -1366,7 +1458,7 @@ static int tolua_meterwindow_CMeterWindow_GetMeter00(lua_State* tolua_S)
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeterWindow",0,&tolua_err) ||
(tolua_isvaluenil(tolua_S,2,&tolua_err) || !is_wstring(tolua_S,2,"std::wstring",0,&tolua_err)) ||
(tolua_isvaluenil(tolua_S,2,&tolua_err) || !is_wstring(tolua_S,2,"const std::wstring",0,&tolua_err)) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
@ -1374,7 +1466,7 @@ static int tolua_meterwindow_CMeterWindow_GetMeter00(lua_State* tolua_S)
#endif
{
CMeterWindow* self = (CMeterWindow*) tolua_tousertype(tolua_S,1,0);
std::wstring meterName = to_wstring(tolua_S,2,0);
const std::wstring meterName = ((const std::wstring) to_wstring(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMeter'", NULL);
#endif
@ -1400,7 +1492,7 @@ static int tolua_meterwindow_CMeterWindow_GetMeasure00(lua_State* tolua_S)
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeterWindow",0,&tolua_err) ||
(tolua_isvaluenil(tolua_S,2,&tolua_err) || !is_wstring(tolua_S,2,"std::wstring",0,&tolua_err)) ||
(tolua_isvaluenil(tolua_S,2,&tolua_err) || !is_wstring(tolua_S,2,"const std::wstring",0,&tolua_err)) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
@ -1408,7 +1500,7 @@ static int tolua_meterwindow_CMeterWindow_GetMeasure00(lua_State* tolua_S)
#endif
{
CMeterWindow* self = (CMeterWindow*) tolua_tousertype(tolua_S,1,0);
std::wstring measureName = to_wstring(tolua_S,2,0);
const std::wstring measureName = ((const std::wstring) to_wstring(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMeasure'", NULL);
#endif
@ -1447,7 +1539,7 @@ static int tolua_meterwindow_CMeterWindow_ReplaceVariables00(lua_State* tolua_S)
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReplaceVariables'", NULL);
#endif
{
const char* tolua_ret = self->ReplaceVariables(p_str);
const char* tolua_ret = (const char*) self->ReplaceVariables(p_str);
tolua_pushstring(tolua_S,(const char*)tolua_ret);
}
}
@ -1502,93 +1594,27 @@ TOLUA_API int tolua_meterwindow_open (lua_State* tolua_S)
tolua_reg_types(tolua_S);
tolua_module(tolua_S,NULL,0);
tolua_beginmodule(tolua_S,NULL);
tolua_constant(tolua_S,"WM_DELAYED_EXECUTE",WM_DELAYED_EXECUTE);
tolua_constant(tolua_S,"WM_DELAYED_REFRESH",WM_DELAYED_REFRESH);
tolua_constant(tolua_S,"WM_DELAYED_MOVE",WM_DELAYED_MOVE);
tolua_constant(tolua_S,"MOUSE_LMB_DOWN",MOUSE_LMB_DOWN);
tolua_constant(tolua_S,"MOUSE_LMB_UP",MOUSE_LMB_UP);
tolua_constant(tolua_S,"MOUSE_LMB_DBLCLK",MOUSE_LMB_DBLCLK);
tolua_constant(tolua_S,"MOUSE_RMB_DOWN",MOUSE_RMB_DOWN);
tolua_constant(tolua_S,"MOUSE_RMB_UP",MOUSE_RMB_UP);
tolua_constant(tolua_S,"MOUSE_RMB_DBLCLK",MOUSE_RMB_DBLCLK);
tolua_constant(tolua_S,"MOUSE_MMB_DOWN",MOUSE_MMB_DOWN);
tolua_constant(tolua_S,"MOUSE_MMB_UP",MOUSE_MMB_UP);
tolua_constant(tolua_S,"MOUSE_MMB_DBLCLK",MOUSE_MMB_DBLCLK);
tolua_constant(tolua_S,"MOUSE_OVER",MOUSE_OVER);
tolua_constant(tolua_S,"MOUSE_LEAVE",MOUSE_LEAVE);
tolua_constant(tolua_S,"BUTTONPROC_DOWN",BUTTONPROC_DOWN);
tolua_constant(tolua_S,"BUTTONPROC_UP",BUTTONPROC_UP);
tolua_constant(tolua_S,"BUTTONPROC_MOVE",BUTTONPROC_MOVE);
tolua_constant(tolua_S,"ZPOSITION_ONDESKTOP",ZPOSITION_ONDESKTOP);
tolua_constant(tolua_S,"ZPOSITION_ONBOTTOM",ZPOSITION_ONBOTTOM);
tolua_constant(tolua_S,"ZPOSITION_NORMAL",ZPOSITION_NORMAL);
tolua_constant(tolua_S,"ZPOSITION_ONTOP",ZPOSITION_ONTOP);
tolua_constant(tolua_S,"ZPOSITION_ONTOPMOST",ZPOSITION_ONTOPMOST);
tolua_constant(tolua_S,"BGMODE_IMAGE",BGMODE_IMAGE);
tolua_constant(tolua_S,"BGMODE_COPY",BGMODE_COPY);
tolua_constant(tolua_S,"BGMODE_SOLID",BGMODE_SOLID);
tolua_constant(tolua_S,"BGMODE_SCALED_IMAGE",BGMODE_SCALED_IMAGE);
tolua_constant(tolua_S,"HIDEMODE_NONE",HIDEMODE_NONE);
tolua_constant(tolua_S,"HIDEMODE_HIDE",HIDEMODE_HIDE);
tolua_constant(tolua_S,"HIDEMODE_FADEIN",HIDEMODE_FADEIN);
tolua_constant(tolua_S,"HIDEMODE_FADEOUT",HIDEMODE_FADEOUT);
tolua_constant(tolua_S,"BEVELTYPE_NONE",BEVELTYPE_NONE);
tolua_constant(tolua_S,"BEVELTYPE_UP",BEVELTYPE_UP);
tolua_constant(tolua_S,"BEVELTYPE_DOWN",BEVELTYPE_DOWN);
tolua_constant(tolua_S,"BANG_REFRESH",BANG_REFRESH);
tolua_constant(tolua_S,"BANG_REDRAW",BANG_REDRAW);
tolua_constant(tolua_S,"BANG_TOGGLEMETER",BANG_TOGGLEMETER);
tolua_constant(tolua_S,"BANG_SHOWMETER",BANG_SHOWMETER);
tolua_constant(tolua_S,"BANG_HIDEMETER",BANG_HIDEMETER);
tolua_constant(tolua_S,"BANG_MOVEMETER",BANG_MOVEMETER);
tolua_constant(tolua_S,"BANG_TOGGLEMEASURE",BANG_TOGGLEMEASURE);
tolua_constant(tolua_S,"BANG_ENABLEMEASURE",BANG_ENABLEMEASURE);
tolua_constant(tolua_S,"BANG_DISABLEMEASURE",BANG_DISABLEMEASURE);
tolua_constant(tolua_S,"BANG_SHOW",BANG_SHOW);
tolua_constant(tolua_S,"BANG_HIDE",BANG_HIDE);
tolua_constant(tolua_S,"BANG_TOGGLE",BANG_TOGGLE);
tolua_constant(tolua_S,"BANG_SHOWFADE",BANG_SHOWFADE);
tolua_constant(tolua_S,"BANG_HIDEFADE",BANG_HIDEFADE);
tolua_constant(tolua_S,"BANG_TOGGLEFADE",BANG_TOGGLEFADE);
tolua_constant(tolua_S,"BANG_MOVE",BANG_MOVE);
tolua_constant(tolua_S,"BANG_ZPOS",BANG_ZPOS);
tolua_constant(tolua_S,"BANG_SETTRANSPARENCY",BANG_SETTRANSPARENCY);
tolua_constant(tolua_S,"BANG_CLICKTHROUGH",BANG_CLICKTHROUGH);
tolua_constant(tolua_S,"BANG_DRAGGABLE",BANG_DRAGGABLE);
tolua_constant(tolua_S,"BANG_SNAPEDGES",BANG_SNAPEDGES);
tolua_constant(tolua_S,"BANG_KEEPONSCREEN",BANG_KEEPONSCREEN);
tolua_constant(tolua_S,"BANG_TOGGLEMETERGROUP",BANG_TOGGLEMETERGROUP);
tolua_constant(tolua_S,"BANG_SHOWMETERGROUP",BANG_SHOWMETERGROUP);
tolua_constant(tolua_S,"BANG_HIDEMETERGROUP",BANG_HIDEMETERGROUP);
tolua_constant(tolua_S,"BANG_TOGGLEMEASUREGROUP",BANG_TOGGLEMEASUREGROUP);
tolua_constant(tolua_S,"BANG_ENABLEMEASUREGROUP",BANG_ENABLEMEASUREGROUP);
tolua_constant(tolua_S,"BANG_DISABLEMEASUREGROUP",BANG_DISABLEMEASUREGROUP);
tolua_constant(tolua_S,"BANG_LSHOOK",BANG_LSHOOK);
tolua_constant(tolua_S,"BANG_PLUGIN",BANG_PLUGIN);
tolua_constant(tolua_S,"BANG_SETVARIABLE",BANG_SETVARIABLE);
tolua_cclass(tolua_S,"CRainmeter","CRainmeter","",NULL);
tolua_beginmodule(tolua_S,"CRainmeter");
tolua_endmodule(tolua_S);
tolua_cclass(tolua_S,"CMeasure","CMeasure","",NULL);
tolua_beginmodule(tolua_S,"CMeasure");
tolua_endmodule(tolua_S);
tolua_cclass(tolua_S,"CMeter","CMeter","",NULL);
tolua_beginmodule(tolua_S,"CMeter");
tolua_endmodule(tolua_S);
tolua_cclass(tolua_S,"CMeterWindow","CMeterWindow","CGroup",NULL);
tolua_beginmodule(tolua_S,"CMeterWindow");
tolua_function(tolua_S,"Bang", tolua_meterwindow_CMeterWindow_Bang00);
tolua_function(tolua_S,"RunBang",tolua_meterwindow_CMeterWindow_RunBang00);
tolua_function(tolua_S,"MoveMeter",tolua_meterwindow_CMeterWindow_MoveMeter00);
tolua_function(tolua_S,"HideMeter",tolua_meterwindow_CMeterWindow_HideMeter00);
tolua_function(tolua_S,"ShowMeter",tolua_meterwindow_CMeterWindow_ShowMeter00);
tolua_function(tolua_S,"ToggleMeter",tolua_meterwindow_CMeterWindow_ToggleMeter00);
tolua_function(tolua_S,"UpdateMeter",tolua_meterwindow_CMeterWindow_UpdateMeter00);
tolua_function(tolua_S,"DisableMeasure",tolua_meterwindow_CMeterWindow_DisableMeasure00);
tolua_function(tolua_S,"EnableMeasure",tolua_meterwindow_CMeterWindow_EnableMeasure00);
tolua_function(tolua_S,"ToggleMeasure",tolua_meterwindow_CMeterWindow_ToggleMeasure00);
tolua_function(tolua_S,"Refresh",tolua_meterwindow_CMeterWindow_Refresh00);
tolua_function(tolua_S,"UpdateMeasure",tolua_meterwindow_CMeterWindow_UpdateMeasure00);
tolua_function(tolua_S,"Redraw",tolua_meterwindow_CMeterWindow_Redraw00);
tolua_function(tolua_S,"SetMouseLeaveEvent",tolua_meterwindow_CMeterWindow_SetMouseLeaveEvent00);
tolua_function(tolua_S,"MoveWindow",tolua_meterwindow_CMeterWindow_MoveWindow00);
tolua_function(tolua_S,"ChangeZPos",tolua_meterwindow_CMeterWindow_ChangeZPos00);
tolua_function(tolua_S,"FadeWindow",tolua_meterwindow_CMeterWindow_FadeWindow00);
@ -1601,6 +1627,10 @@ TOLUA_API int tolua_meterwindow_open (lua_State* tolua_S)
tolua_function(tolua_S,"GetYPercentage",tolua_meterwindow_CMeterWindow_GetYPercentage00);
tolua_function(tolua_S,"GetXFromRight",tolua_meterwindow_CMeterWindow_GetXFromRight00);
tolua_function(tolua_S,"GetYFromBottom",tolua_meterwindow_CMeterWindow_GetYFromBottom00);
tolua_function(tolua_S,"GetW",tolua_meterwindow_CMeterWindow_GetW00);
tolua_function(tolua_S,"GetH",tolua_meterwindow_CMeterWindow_GetH00);
tolua_function(tolua_S,"GetX",tolua_meterwindow_CMeterWindow_GetX00);
tolua_function(tolua_S,"GetY",tolua_meterwindow_CMeterWindow_GetY00);
tolua_function(tolua_S,"GetXScreenDefined",tolua_meterwindow_CMeterWindow_GetXScreenDefined00);
tolua_function(tolua_S,"GetYScreenDefined",tolua_meterwindow_CMeterWindow_GetYScreenDefined00);
tolua_function(tolua_S,"GetXScreen",tolua_meterwindow_CMeterWindow_GetXScreen00);
@ -1620,6 +1650,7 @@ TOLUA_API int tolua_meterwindow_open (lua_State* tolua_S)
tolua_function(tolua_S,"GetMeter",tolua_meterwindow_CMeterWindow_GetMeter00);
tolua_function(tolua_S,"GetMeasure",tolua_meterwindow_CMeterWindow_GetMeasure00);
tolua_function(tolua_S,"ReplaceVariables",tolua_meterwindow_CMeterWindow_ReplaceVariables00);
tolua_function(tolua_S,"Bang", tolua_meterwindow_CMeterWindow_Bang00);
tolua_endmodule(tolua_S);
tolua_endmodule(tolua_S);
return 1;

View File

@ -1,6 +1,6 @@
/*
** Lua binding: meterwindow
** Generated automatically by tolua++-1.0.92 on 11/27/10 18:13:41.
** Generated automatically by tolua++-1.0.92 on 02/15/11 18:55:45.
*/
/* Exported function */

View File

@ -1,6 +1,6 @@
/*
** Lua binding: rainmeter
** Generated automatically by tolua++-1.0.92 on 11/23/10 01:56:47.
** Generated automatically by tolua++-1.0.92 on 02/15/11 21:07:15.
*/
#include "../../StdAfx.h"
@ -41,46 +41,11 @@ static int tolua_collect_BOOL (lua_State* tolua_S)
static void tolua_reg_types (lua_State* tolua_S)
{
tolua_usertype(tolua_S,"std::wstring");
tolua_usertype(tolua_S,"CMeterWindow");
tolua_usertype(tolua_S,"BOOL");
tolua_usertype(tolua_S,"CTrayWindow");
tolua_usertype(tolua_S,"CRainmeter");
tolua_usertype(tolua_S,"CMeterWindow");
tolua_usertype(tolua_S,"POINT");
tolua_usertype(tolua_S,"WCHAR");
}
/* method: GetTrayWindow of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_GetTrayWindow00
static int tolua_rainmeter_CRainmeter_GetTrayWindow00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CRainmeter",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CRainmeter* self = (CRainmeter*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTrayWindow'", NULL);
#endif
{
CTrayWindow* tolua_ret = (CTrayWindow*) self->GetTrayWindow();
tolua_pushusertype(tolua_S,(void*)tolua_ret,"CTrayWindow");
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'GetTrayWindow'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetMeterWindow of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_GetMeterWindow00
static int tolua_rainmeter_CRainmeter_GetMeterWindow00(lua_State* tolua_S)
@ -97,7 +62,7 @@ static int tolua_rainmeter_CRainmeter_GetMeterWindow00(lua_State* tolua_S)
#endif
{
CRainmeter* self = (CRainmeter*) tolua_tousertype(tolua_S,1,0);
const std::wstring config = to_wstring(tolua_S,2,0);
const std::wstring config = ((const std::wstring) to_wstring(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMeterWindow'", NULL);
#endif
@ -275,6 +240,38 @@ static int tolua_rainmeter_CRainmeter_GetPluginPath00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetAddonPath of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_GetAddonPath00
static int tolua_rainmeter_CRainmeter_GetAddonPath00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CRainmeter",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CRainmeter* self = (CRainmeter*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetAddonPath'", NULL);
#endif
{
const std::wstring& tolua_ret = (const std::wstring&) self->GetAddonPath();
push_wstring(tolua_S,(void*)&tolua_ret,"const std::wstring");
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'GetAddonPath'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetSettingsPath of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_GetSettingsPath00
static int tolua_rainmeter_CRainmeter_GetSettingsPath00(lua_State* tolua_S)
@ -297,13 +294,9 @@ static int tolua_rainmeter_CRainmeter_GetSettingsPath00(lua_State* tolua_S)
std::wstring tolua_ret = (std::wstring) self->GetSettingsPath();
{
#ifdef __cplusplus
void* tolua_obj = Mtolua_new((std::wstring)(tolua_ret));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
push_wstring(tolua_S,(void*)&tolua_ret,"std::wstring");
#else
void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::wstring));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
push_wstring(tolua_S,(void*)&tolua_ret,"std::wstring");
#endif
}
}
@ -441,37 +434,6 @@ static int tolua_rainmeter_CRainmeter_GetDebug00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: ReloadSettings of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_ReloadSettings00
static int tolua_rainmeter_CRainmeter_ReloadSettings00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CRainmeter",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CRainmeter* self = (CRainmeter*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReloadSettings'", NULL);
#endif
{
self->ReloadSettings();
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'ReloadSettings'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: SaveSettings of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_SaveSettings00
static int tolua_rainmeter_CRainmeter_SaveSettings00(lua_State* tolua_S)
@ -503,37 +465,6 @@ static int tolua_rainmeter_CRainmeter_SaveSettings00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: ReadStats of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_ReadStats00
static int tolua_rainmeter_CRainmeter_ReadStats00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CRainmeter",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CRainmeter* self = (CRainmeter*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReadStats'", NULL);
#endif
{
self->ReadStats();
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'ReadStats'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: WriteStats of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_WriteStats00
static int tolua_rainmeter_CRainmeter_WriteStats00(lua_State* tolua_S)
@ -723,6 +654,103 @@ static int tolua_rainmeter_CRainmeter_DeleteLogFile00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetDisableRDP of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_GetDisableRDP00
static int tolua_rainmeter_CRainmeter_GetDisableRDP00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CRainmeter",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CRainmeter* self = (CRainmeter*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetDisableRDP'", NULL);
#endif
{
bool tolua_ret = (bool) self->GetDisableRDP();
tolua_pushboolean(tolua_S,(bool)tolua_ret);
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'GetDisableRDP'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetDisableDragging of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_GetDisableDragging00
static int tolua_rainmeter_CRainmeter_GetDisableDragging00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CRainmeter",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CRainmeter* self = (CRainmeter*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetDisableDragging'", NULL);
#endif
{
bool tolua_ret = (bool) self->GetDisableDragging();
tolua_pushboolean(tolua_S,(bool)tolua_ret);
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'GetDisableDragging'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: SetDisableDragging of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_SetDisableDragging00
static int tolua_rainmeter_CRainmeter_SetDisableDragging00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CRainmeter",0,&tolua_err) ||
!tolua_isboolean(tolua_S,2,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CRainmeter* self = (CRainmeter*) tolua_tousertype(tolua_S,1,0);
bool dragging = ((bool) tolua_toboolean(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetDisableDragging'", NULL);
#endif
{
self->SetDisableDragging(dragging);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'SetDisableDragging'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: SetDebug of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_SetDebug00
static int tolua_rainmeter_CRainmeter_SetDebug00(lua_State* tolua_S)
@ -842,18 +870,8 @@ static int tolua_rainmeter_CRainmeter_GetTrayExecuteL00(lua_State* tolua_S)
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTrayExecuteL'", NULL);
#endif
{
std::wstring tolua_ret = (std::wstring) self->GetTrayExecuteL();
{
#ifdef __cplusplus
void* tolua_obj = Mtolua_new((std::wstring)(tolua_ret));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::wstring));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
}
const std::wstring& tolua_ret = (const std::wstring&) self->GetTrayExecuteL();
push_wstring(tolua_S,(void*)&tolua_ret,"const std::wstring");
}
}
return 1;
@ -884,18 +902,8 @@ static int tolua_rainmeter_CRainmeter_GetTrayExecuteR00(lua_State* tolua_S)
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTrayExecuteR'", NULL);
#endif
{
std::wstring tolua_ret = (std::wstring) self->GetTrayExecuteR();
{
#ifdef __cplusplus
void* tolua_obj = Mtolua_new((std::wstring)(tolua_ret));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::wstring));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
}
const std::wstring& tolua_ret = (const std::wstring&) self->GetTrayExecuteR();
push_wstring(tolua_S,(void*)&tolua_ret,"const std::wstring");
}
}
return 1;
@ -926,18 +934,8 @@ static int tolua_rainmeter_CRainmeter_GetTrayExecuteM00(lua_State* tolua_S)
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTrayExecuteM'", NULL);
#endif
{
std::wstring tolua_ret = (std::wstring) self->GetTrayExecuteM();
{
#ifdef __cplusplus
void* tolua_obj = Mtolua_new((std::wstring)(tolua_ret));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::wstring));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
}
const std::wstring& tolua_ret = (const std::wstring&) self->GetTrayExecuteM();
push_wstring(tolua_S,(void*)&tolua_ret,"const std::wstring");
}
}
return 1;
@ -968,18 +966,8 @@ static int tolua_rainmeter_CRainmeter_GetTrayExecuteDR00(lua_State* tolua_S)
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTrayExecuteDR'", NULL);
#endif
{
std::wstring tolua_ret = (std::wstring) self->GetTrayExecuteDR();
{
#ifdef __cplusplus
void* tolua_obj = Mtolua_new((std::wstring)(tolua_ret));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::wstring));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
}
const std::wstring& tolua_ret = (const std::wstring&) self->GetTrayExecuteDR();
push_wstring(tolua_S,(void*)&tolua_ret,"const std::wstring");
}
}
return 1;
@ -1010,18 +998,8 @@ static int tolua_rainmeter_CRainmeter_GetTrayExecuteDL00(lua_State* tolua_S)
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTrayExecuteDL'", NULL);
#endif
{
std::wstring tolua_ret = (std::wstring) self->GetTrayExecuteDL();
{
#ifdef __cplusplus
void* tolua_obj = Mtolua_new((std::wstring)(tolua_ret));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::wstring));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
}
const std::wstring& tolua_ret = (const std::wstring&) self->GetTrayExecuteDL();
push_wstring(tolua_S,(void*)&tolua_ret,"const std::wstring");
}
}
return 1;
@ -1052,18 +1030,8 @@ static int tolua_rainmeter_CRainmeter_GetTrayExecuteDM00(lua_State* tolua_S)
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTrayExecuteDM'", NULL);
#endif
{
std::wstring tolua_ret = (std::wstring) self->GetTrayExecuteDM();
{
#ifdef __cplusplus
void* tolua_obj = Mtolua_new((std::wstring)(tolua_ret));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::wstring));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
}
const std::wstring& tolua_ret = (const std::wstring&) self->GetTrayExecuteDM();
push_wstring(tolua_S,(void*)&tolua_ret,"const std::wstring");
}
}
return 1;
@ -1075,197 +1043,6 @@ static int tolua_rainmeter_CRainmeter_GetTrayExecuteDM00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: ExecuteBang of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_ExecuteBang00
static int tolua_rainmeter_CRainmeter_ExecuteBang00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CRainmeter",0,&tolua_err) ||
(tolua_isvaluenil(tolua_S,2,&tolua_err) || !is_wstring(tolua_S,2,"const std::wstring",0,&tolua_err)) ||
(tolua_isvaluenil(tolua_S,3,&tolua_err) || !is_wstring(tolua_S,3,"const std::wstring",0,&tolua_err)) ||
!tolua_isusertype(tolua_S,4,"CMeterWindow",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,5,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CRainmeter* self = (CRainmeter*) tolua_tousertype(tolua_S,1,0);
const std::wstring* bang = &to_wstring(tolua_S,2,0);
const std::wstring* arg = &to_wstring(tolua_S,3,0);
CMeterWindow* meterWindow = ((CMeterWindow*) tolua_tousertype(tolua_S,4,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ExecuteBang'", NULL);
#endif
{
BOOL tolua_ret = (BOOL) self->ExecuteBang(*bang,*arg,meterWindow);
{
#ifdef __cplusplus
void* tolua_obj = Mtolua_new((BOOL)(tolua_ret));
tolua_pushusertype(tolua_S,tolua_obj,"BOOL");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(BOOL));
tolua_pushusertype(tolua_S,tolua_obj,"BOOL");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
}
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'ExecuteBang'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: ParseCommand of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_ParseCommand00
static int tolua_rainmeter_CRainmeter_ParseCommand00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CRainmeter",0,&tolua_err) ||
!is_wchar(tolua_S,2,"const WCHAR",0,&tolua_err) ||
!tolua_isusertype(tolua_S,3,"CMeterWindow",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,4,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CRainmeter* self = (CRainmeter*) tolua_tousertype(tolua_S,1,0);
const WCHAR* command = ((const WCHAR*) to_wchar(tolua_S,2,0));
CMeterWindow* meterWindow = ((CMeterWindow*) tolua_tousertype(tolua_S,3,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ParseCommand'", NULL);
#endif
{
std::wstring tolua_ret = (std::wstring) self->ParseCommand(command,meterWindow);
{
#ifdef __cplusplus
void* tolua_obj = Mtolua_new((std::wstring)(tolua_ret));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::wstring));
push_wstring(tolua_S,tolua_obj,"std::wstring");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
}
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'ParseCommand'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: ExecuteCommand of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_ExecuteCommand00
static int tolua_rainmeter_CRainmeter_ExecuteCommand00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CRainmeter",0,&tolua_err) ||
!is_wchar(tolua_S,2,"const WCHAR",0,&tolua_err) ||
!tolua_isusertype(tolua_S,3,"CMeterWindow",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,4,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CRainmeter* self = (CRainmeter*) tolua_tousertype(tolua_S,1,0);
const WCHAR* command = ((const WCHAR*) to_wchar(tolua_S,2,0));
CMeterWindow* meterWindow = ((CMeterWindow*) tolua_tousertype(tolua_S,3,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ExecuteCommand'", NULL);
#endif
{
self->ExecuteCommand(command,meterWindow);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'ExecuteCommand'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: RefreshAll of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_RefreshAll00
static int tolua_rainmeter_CRainmeter_RefreshAll00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CRainmeter",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CRainmeter* self = (CRainmeter*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RefreshAll'", NULL);
#endif
{
self->RefreshAll();
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'RefreshAll'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: ClearDeleteLaterList of class CRainmeter */
#ifndef TOLUA_DISABLE_tolua_rainmeter_CRainmeter_ClearDeleteLaterList00
static int tolua_rainmeter_CRainmeter_ClearDeleteLaterList00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CRainmeter",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
CRainmeter* self = (CRainmeter*) tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ClearDeleteLaterList'", NULL);
#endif
{
self->ClearDeleteLaterList();
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'ClearDeleteLaterList'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* Open function */
TOLUA_API int tolua_rainmeter_open (lua_State* tolua_S)
{
@ -1276,27 +1053,28 @@ TOLUA_API int tolua_rainmeter_open (lua_State* tolua_S)
tolua_constant(tolua_S,"MAX_LINE_LENGTH",MAX_LINE_LENGTH);
tolua_cclass(tolua_S,"CRainmeter","CRainmeter","",NULL);
tolua_beginmodule(tolua_S,"CRainmeter");
tolua_function(tolua_S,"GetTrayWindow",tolua_rainmeter_CRainmeter_GetTrayWindow00);
tolua_function(tolua_S,"GetMeterWindow",tolua_rainmeter_CRainmeter_GetMeterWindow00);
tolua_function(tolua_S,"GetPath",tolua_rainmeter_CRainmeter_GetPath00);
tolua_function(tolua_S,"GetIniFile",tolua_rainmeter_CRainmeter_GetIniFile00);
tolua_function(tolua_S,"GetLogFile",tolua_rainmeter_CRainmeter_GetLogFile00);
tolua_function(tolua_S,"GetSkinPath",tolua_rainmeter_CRainmeter_GetSkinPath00);
tolua_function(tolua_S,"GetPluginPath",tolua_rainmeter_CRainmeter_GetPluginPath00);
tolua_function(tolua_S,"GetAddonPath",tolua_rainmeter_CRainmeter_GetAddonPath00);
tolua_function(tolua_S,"GetSettingsPath",tolua_rainmeter_CRainmeter_GetSettingsPath00);
tolua_function(tolua_S,"GetConfigEditor",tolua_rainmeter_CRainmeter_GetConfigEditor00);
tolua_function(tolua_S,"GetLogViewer",tolua_rainmeter_CRainmeter_GetLogViewer00);
tolua_function(tolua_S,"GetStatsDate",tolua_rainmeter_CRainmeter_GetStatsDate00);
tolua_function(tolua_S,"GetDebug",tolua_rainmeter_CRainmeter_GetDebug00);
tolua_function(tolua_S,"ReloadSettings",tolua_rainmeter_CRainmeter_ReloadSettings00);
tolua_function(tolua_S,"SaveSettings",tolua_rainmeter_CRainmeter_SaveSettings00);
tolua_function(tolua_S,"ReadStats",tolua_rainmeter_CRainmeter_ReadStats00);
tolua_function(tolua_S,"WriteStats",tolua_rainmeter_CRainmeter_WriteStats00);
tolua_function(tolua_S,"ResetStats",tolua_rainmeter_CRainmeter_ResetStats00);
tolua_function(tolua_S,"GetLogging",tolua_rainmeter_CRainmeter_GetLogging00);
tolua_function(tolua_S,"StartLogging",tolua_rainmeter_CRainmeter_StartLogging00);
tolua_function(tolua_S,"StopLogging",tolua_rainmeter_CRainmeter_StopLogging00);
tolua_function(tolua_S,"DeleteLogFile",tolua_rainmeter_CRainmeter_DeleteLogFile00);
tolua_function(tolua_S,"GetDisableRDP",tolua_rainmeter_CRainmeter_GetDisableRDP00);
tolua_function(tolua_S,"GetDisableDragging",tolua_rainmeter_CRainmeter_GetDisableDragging00);
tolua_function(tolua_S,"SetDisableDragging",tolua_rainmeter_CRainmeter_SetDisableDragging00);
tolua_function(tolua_S,"SetDebug",tolua_rainmeter_CRainmeter_SetDebug00);
tolua_function(tolua_S,"IsMenuActive",tolua_rainmeter_CRainmeter_IsMenuActive00);
tolua_function(tolua_S,"ShowContextMenu",tolua_rainmeter_CRainmeter_ShowContextMenu00);
@ -1306,11 +1084,6 @@ TOLUA_API int tolua_rainmeter_open (lua_State* tolua_S)
tolua_function(tolua_S,"GetTrayExecuteDR",tolua_rainmeter_CRainmeter_GetTrayExecuteDR00);
tolua_function(tolua_S,"GetTrayExecuteDL",tolua_rainmeter_CRainmeter_GetTrayExecuteDL00);
tolua_function(tolua_S,"GetTrayExecuteDM",tolua_rainmeter_CRainmeter_GetTrayExecuteDM00);
tolua_function(tolua_S,"ExecuteBang",tolua_rainmeter_CRainmeter_ExecuteBang00);
tolua_function(tolua_S,"ParseCommand",tolua_rainmeter_CRainmeter_ParseCommand00);
tolua_function(tolua_S,"ExecuteCommand",tolua_rainmeter_CRainmeter_ExecuteCommand00);
tolua_function(tolua_S,"RefreshAll",tolua_rainmeter_CRainmeter_RefreshAll00);
tolua_function(tolua_S,"ClearDeleteLaterList",tolua_rainmeter_CRainmeter_ClearDeleteLaterList00);
tolua_endmodule(tolua_S);
tolua_endmodule(tolua_S);
return 1;

View File

@ -1,6 +1,6 @@
/*
** Lua binding: rainmeter
** Generated automatically by tolua++-1.0.92 on 11/23/10 01:56:47.
** Generated automatically by tolua++-1.0.92 on 02/15/11 21:07:15.
*/
/* Exported function */

View File

@ -1,5 +1,5 @@
/*
** Lua binding: group
** Lua binding: rainmeter_ext
** Generated automatically by tolua++-1.0.92 on 11/22/10 21:20:13.
*/
@ -11,10 +11,12 @@
#include "string.h"
#include "tolua++.h"
#include "../LuaManager.h"
/* Exported function */
TOLUA_API int luaopen_rainmeter_ext (lua_State* tolua_S);
#include "../LuaManager.h"
#include "../../MeterBar.h"
#include "../../MeterBitmap.h"
#include "../../MeterButton.h"
@ -99,7 +101,7 @@ static int staticLuaLog(lua_State* tolua_S)
/* list of functions in the module */
static const luaL_reg rainmeter_ext_funcs[] =
{
{ "LuaLog", staticLuaLog},
{ "LuaLog", staticLuaLog },
{ "MeterBar", AsMeterBar },
{ "MeterBitmap", AsMeterBitmap },
{ "MeterButton", AsMeterButton },

View File

@ -1,5 +1,5 @@
/*
** Lua binding: group
** Lua binding: rainmeter_ext
** Generated automatically by tolua++-1.0.92 on 11/22/10 21:20:13.
*/

View File

@ -1,11 +1,11 @@
$#include "../MeterImage.h"
$#include "LuaPush.h"
$#include "../../MeterImage.h"
$#include "../LuaPush.h"
class CMeterImage : public CMeter
{
public:
void SetImage(const WCHAR* imageName);
const WCHAR* GetImage();
};