rainmeter-studio/Library/lua/glue/LuaGroup.cpp
Birunthan Mohanathas c7f9293e9c Script:
- GetMeter dynamically detects STRING meters now (no need to use tolua.cast any longer)
- Removed unneeded (and undocumented) functions to exposed to Lua
- Refactored tolua++ generated code
2011-07-05 13:41:05 +00:00

24 lines
597 B
C++

#include "../../StdAfx.h"
#include "../LuaManager.h"
#include "../../Group.h"
static int Group_BelongsToGroup(lua_State* L)
{
CGroup* self = (CGroup*)tolua_tousertype(L, 1, 0);
const std::wstring group = (const std::wstring)to_wstring(L, 2, 0);
bool val = self->BelongsToGroup(group);
tolua_pushboolean(L, val);
return 1;
}
void LuaManager::RegisterGroup(lua_State* L)
{
tolua_usertype(L, "CGroup");
tolua_cclass(L, "CGroup", "CGroup", "", NULL);
tolua_beginmodule(L, "CGroup");
tolua_function(L, "BelongsToGroup", Group_BelongsToGroup);
tolua_endmodule(L);
}