mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
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
This commit is contained in:
parent
9a9edbda2e
commit
c7f9293e9c
@ -38,11 +38,7 @@ extern "C"
|
|||||||
|
|
||||||
EXPORT_PLUGIN BOOL LSLog(int nLevel, LPCTSTR pszModule, LPCTSTR pszMessage);
|
EXPORT_PLUGIN BOOL LSLog(int nLevel, LPCTSTR pszModule, LPCTSTR pszMessage);
|
||||||
EXPORT_PLUGIN LPCTSTR ReadConfigString(LPCTSTR section, LPCTSTR key, LPCTSTR defValue);
|
EXPORT_PLUGIN LPCTSTR ReadConfigString(LPCTSTR section, LPCTSTR key, LPCTSTR defValue);
|
||||||
|
EXPORT_PLUGIN LPCTSTR PluginBridge(LPCTSTR sCommand, LPCTSTR sData);
|
||||||
// Added by Peter Souza IV / psouza4 / 2010.12.13
|
|
||||||
//
|
|
||||||
// Read comments in Rainmeter.cpp for details.
|
|
||||||
EXPORT_PLUGIN LPCTSTR PluginBridge(LPCTSTR sCommand, LPCTSTR sData);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -721,7 +721,7 @@
|
|||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../StdAfx.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../StdAfx.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lua\glue\lua_group.cpp">
|
<ClCompile Include="lua\glue\LuaGroup.cpp">
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../StdAfx.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../StdAfx.h</PrecompiledHeaderFile>
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
|
||||||
@ -729,7 +729,7 @@
|
|||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../StdAfx.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../StdAfx.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lua\glue\lua_measure.cpp">
|
<ClCompile Include="lua\glue\LuaMeasure.cpp">
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../StdAfx.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../StdAfx.h</PrecompiledHeaderFile>
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
|
||||||
@ -737,7 +737,7 @@
|
|||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../StdAfx.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../StdAfx.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lua\glue\lua_meter.cpp">
|
<ClCompile Include="lua\glue\LuaMeter.cpp">
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../StdAfx.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../StdAfx.h</PrecompiledHeaderFile>
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
|
||||||
@ -745,7 +745,7 @@
|
|||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../StdAfx.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../StdAfx.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lua\glue\lua_meterstring.cpp">
|
<ClCompile Include="lua\glue\LuaMeterString.cpp">
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../StdAfx.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../StdAfx.h</PrecompiledHeaderFile>
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
|
||||||
@ -753,7 +753,7 @@
|
|||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../StdAfx.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../StdAfx.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lua\glue\lua_meterwindow.cpp">
|
<ClCompile Include="lua\glue\LuaMeterWindow.cpp">
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../StdAfx.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../StdAfx.h</PrecompiledHeaderFile>
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
|
||||||
@ -761,7 +761,7 @@
|
|||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../StdAfx.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../StdAfx.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lua\glue\lua_rainmeter.cpp">
|
<ClCompile Include="lua\glue\LuaRainmeter.cpp">
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../StdAfx.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../StdAfx.h</PrecompiledHeaderFile>
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
|
||||||
@ -769,7 +769,7 @@
|
|||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../StdAfx.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../StdAfx.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lua\glue\lua_rainmeter_ext.cpp">
|
<ClCompile Include="lua\glue\LuaGlobal.cpp">
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../StdAfx.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../StdAfx.h</PrecompiledHeaderFile>
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
|
||||||
@ -872,13 +872,6 @@
|
|||||||
<ClInclude Include="lua\LuaManager.h" />
|
<ClInclude Include="lua\LuaManager.h" />
|
||||||
<ClInclude Include="lua\LuaPush.h" />
|
<ClInclude Include="lua\LuaPush.h" />
|
||||||
<ClInclude Include="lua\LuaScript.h" />
|
<ClInclude Include="lua\LuaScript.h" />
|
||||||
<ClInclude Include="lua\glue\lua_group.h" />
|
|
||||||
<ClInclude Include="lua\glue\lua_measure.h" />
|
|
||||||
<ClInclude Include="lua\glue\lua_meter.h" />
|
|
||||||
<ClInclude Include="lua\glue\lua_meterstring.h" />
|
|
||||||
<ClInclude Include="lua\glue\lua_meterwindow.h" />
|
|
||||||
<ClInclude Include="lua\glue\lua_rainmeter.h" />
|
|
||||||
<ClInclude Include="lua\glue\lua_rainmeter_ext.h" />
|
|
||||||
<ClInclude Include="lua\include\lua.hpp" />
|
<ClInclude Include="lua\include\lua.hpp" />
|
||||||
<ClInclude Include="lua\lua\luaconf.h" />
|
<ClInclude Include="lua\lua\luaconf.h" />
|
||||||
<ClInclude Include="lua\include\tolua++.h" />
|
<ClInclude Include="lua\include\tolua++.h" />
|
||||||
|
@ -168,25 +168,25 @@
|
|||||||
<ClCompile Include="lua\LuaScript.cpp">
|
<ClCompile Include="lua\LuaScript.cpp">
|
||||||
<Filter>Lua</Filter>
|
<Filter>Lua</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lua\glue\lua_group.cpp">
|
<ClCompile Include="lua\glue\LuaGroup.cpp">
|
||||||
<Filter>Lua\glue</Filter>
|
<Filter>Lua\glue</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lua\glue\lua_measure.cpp">
|
<ClCompile Include="lua\glue\LuaMeasure.cpp">
|
||||||
<Filter>Lua\glue</Filter>
|
<Filter>Lua\glue</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lua\glue\lua_meter.cpp">
|
<ClCompile Include="lua\glue\LuaMeter.cpp">
|
||||||
<Filter>Lua\glue</Filter>
|
<Filter>Lua\glue</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lua\glue\lua_meterstring.cpp">
|
<ClCompile Include="lua\glue\LuaMeterString.cpp">
|
||||||
<Filter>Lua\glue</Filter>
|
<Filter>Lua\glue</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lua\glue\lua_meterwindow.cpp">
|
<ClCompile Include="lua\glue\LuaMeterWindow.cpp">
|
||||||
<Filter>Lua\glue</Filter>
|
<Filter>Lua\glue</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lua\glue\lua_rainmeter.cpp">
|
<ClCompile Include="lua\glue\LuaRainmeter.cpp">
|
||||||
<Filter>Lua\glue</Filter>
|
<Filter>Lua\glue</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lua\glue\lua_rainmeter_ext.cpp">
|
<ClCompile Include="lua\glue\LuaGlobal.cpp">
|
||||||
<Filter>Lua\glue</Filter>
|
<Filter>Lua\glue</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="lua\tolua++\tolua_event.c">
|
<ClCompile Include="lua\tolua++\tolua_event.c">
|
||||||
@ -451,27 +451,6 @@
|
|||||||
<ClInclude Include="lua\LuaScript.h">
|
<ClInclude Include="lua\LuaScript.h">
|
||||||
<Filter>Lua</Filter>
|
<Filter>Lua</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="lua\glue\lua_group.h">
|
|
||||||
<Filter>Lua\glue</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="lua\glue\lua_measure.h">
|
|
||||||
<Filter>Lua\glue</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="lua\glue\lua_meter.h">
|
|
||||||
<Filter>Lua\glue</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="lua\glue\lua_meterstring.h">
|
|
||||||
<Filter>Lua\glue</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="lua\glue\lua_meterwindow.h">
|
|
||||||
<Filter>Lua\glue</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="lua\glue\lua_rainmeter.h">
|
|
||||||
<Filter>Lua\glue</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="lua\glue\lua_rainmeter_ext.h">
|
|
||||||
<Filter>Lua\glue</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="lua\include\lua.hpp">
|
<ClInclude Include="lua\include\lua.hpp">
|
||||||
<Filter>Lua\Lua Headers</Filter>
|
<Filter>Lua\Lua Headers</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
@ -1,39 +1,53 @@
|
|||||||
|
/*
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "../StdAfx.h"
|
#include "../StdAfx.h"
|
||||||
#include "LuaManager.h"
|
#include "LuaManager.h"
|
||||||
#include "../Rainmeter.h"
|
#include "../Rainmeter.h"
|
||||||
|
|
||||||
#include "lua_measure.h"
|
|
||||||
#include "lua_meter.h"
|
|
||||||
#include "lua_group.h"
|
|
||||||
#include "lua_meterwindow.h"
|
|
||||||
#include "lua_rainmeter.h"
|
|
||||||
#include "lua_meterstring.h"
|
|
||||||
#include "lua_meterimage.h"
|
|
||||||
|
|
||||||
#include "lua_rainmeter_ext.h"
|
|
||||||
|
|
||||||
int LuaManager::c_RefCount = 0;
|
int LuaManager::c_RefCount = 0;
|
||||||
lua_State* LuaManager::c_pState = 0;
|
lua_State* LuaManager::c_pState = 0;
|
||||||
|
|
||||||
void LuaManager::Init()
|
void LuaManager::Init()
|
||||||
{
|
{
|
||||||
if (c_pState == 0)
|
if (c_pState == NULL)
|
||||||
{
|
{
|
||||||
// initialize Lua
|
// Initialize Lua
|
||||||
c_pState = lua_open();
|
c_pState = lua_open();
|
||||||
|
|
||||||
//load Lua base libraries
|
// Load Lua base libraries
|
||||||
luaL_openlibs(c_pState);
|
luaL_openlibs(c_pState);
|
||||||
|
|
||||||
tolua_measure_open(c_pState);
|
// Initialize tolua
|
||||||
tolua_group_open(c_pState);
|
tolua_open(c_pState);
|
||||||
tolua_meter_open(c_pState);
|
|
||||||
tolua_meterwindow_open(c_pState);
|
|
||||||
tolua_rainmeter_open(c_pState);
|
|
||||||
tolua_meter_string_open(c_pState);
|
|
||||||
//tolua_meter_image_open(c_pState);
|
|
||||||
|
|
||||||
luaopen_rainmeter_ext(c_pState);
|
// Register custom types and functions
|
||||||
|
RegisterTypes(c_pState);
|
||||||
|
|
||||||
|
tolua_module(c_pState, NULL, 0);
|
||||||
|
tolua_beginmodule(c_pState, NULL);
|
||||||
|
RegisterGlobal(c_pState);
|
||||||
|
RegisterMeasure(c_pState);
|
||||||
|
RegisterGroup(c_pState);
|
||||||
|
RegisterMeasure(c_pState);
|
||||||
|
RegisterMeter(c_pState);
|
||||||
|
RegisterMeterWindow(c_pState);
|
||||||
|
RegisterRainmeter(c_pState);
|
||||||
|
RegisterMeterString(c_pState);
|
||||||
|
tolua_endmodule(c_pState);
|
||||||
}
|
}
|
||||||
|
|
||||||
++c_RefCount;
|
++c_RefCount;
|
||||||
@ -46,14 +60,18 @@ void LuaManager::CleanUp()
|
|||||||
--c_RefCount;
|
--c_RefCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c_RefCount == 0 && c_pState != 0)
|
if (c_RefCount == 0 && c_pState != NULL)
|
||||||
{
|
{
|
||||||
lua_close(c_pState);
|
lua_close(c_pState);
|
||||||
c_pState = 0;
|
c_pState = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LuaManager::ReportErrors(lua_State * L)
|
void LuaManager::RegisterTypes(lua_State* L)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void LuaManager::ReportErrors(lua_State* L)
|
||||||
{
|
{
|
||||||
LuaLog(LOG_ERROR, "Script: %s", lua_tostring(L, -1));
|
LuaLog(LOG_ERROR, "Script: %s", lua_tostring(L, -1));
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
|
@ -1,28 +1,52 @@
|
|||||||
#ifndef LUA_MANAGER_H
|
/*
|
||||||
#define LUA_MANAGER_H
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __LUAMANAGER_H__
|
||||||
|
#define __LUAMANAGER_H__
|
||||||
|
|
||||||
#include "lua.hpp"
|
#include "lua.hpp"
|
||||||
#include "tolua++.h"
|
#include "tolua++.h"
|
||||||
|
#include "LuaPush.h"
|
||||||
|
|
||||||
class LuaManager
|
class LuaManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static void Init();
|
static void Init();
|
||||||
|
|
||||||
static void CleanUp();
|
static void CleanUp();
|
||||||
|
|
||||||
static lua_State* GetState() { return c_pState; }
|
static lua_State* GetState() { return c_pState; }
|
||||||
|
|
||||||
static void ReportErrors(lua_State * L);
|
|
||||||
|
|
||||||
|
static void ReportErrors(lua_State * L);
|
||||||
static void LuaLog(int nLevel, const char* format, ... );
|
static void LuaLog(int nLevel, const char* format, ... );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
static int c_RefCount;
|
static int c_RefCount;
|
||||||
|
|
||||||
static lua_State* c_pState;
|
static lua_State* c_pState;
|
||||||
|
|
||||||
|
private:
|
||||||
|
static void RegisterTypes(lua_State* L);
|
||||||
|
|
||||||
|
static void RegisterGlobal(lua_State* L);
|
||||||
|
static void RegisterRainmeter(lua_State* L);
|
||||||
|
static void RegisterGroup(lua_State* L);
|
||||||
|
static void RegisterMeasure(lua_State* L);
|
||||||
|
static void RegisterMeter(lua_State* L);
|
||||||
|
static void RegisterMeterWindow(lua_State* L);
|
||||||
|
static void RegisterMeterString(lua_State* L);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,15 +3,15 @@
|
|||||||
|
|
||||||
#include "../Litestep.h"
|
#include "../Litestep.h"
|
||||||
|
|
||||||
void push_wstring(lua_State* L, void* value, const char* type)
|
void push_wstring(lua_State* L, const std::wstring& value)
|
||||||
{
|
{
|
||||||
push_wchar(L, (void*)((const std::wstring*)value)->c_str(), type);
|
push_wchar(L, value.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void push_wchar(lua_State* L, void* value, const char* type)
|
void push_wchar(lua_State* L, const WCHAR* value)
|
||||||
{
|
{
|
||||||
std::string str2 = ConvertToAscii((const WCHAR*)value);
|
std::string str = ConvertToAscii(value);
|
||||||
lua_pushstring(L,str2.c_str());
|
lua_pushstring(L, str.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::wstring to_wstring(lua_State* L, int arg, void* type)
|
std::wstring to_wstring(lua_State* L, int arg, void* type)
|
||||||
@ -19,14 +19,13 @@ std::wstring to_wstring(lua_State* L, int arg, void* type)
|
|||||||
return ConvertToWide(lua_tostring(L,arg));
|
return ConvertToWide(lua_tostring(L,arg));
|
||||||
}
|
}
|
||||||
|
|
||||||
const wchar_t* to_wchar (lua_State* L, int arg, void* type)
|
const WCHAR* to_wchar(lua_State* L, int arg, void* type)
|
||||||
{
|
{
|
||||||
// We have a static wstring here so we can keep a copy of the string
|
// We have a static wstring here so we can keep a copy of the string
|
||||||
// passed in alive while its being passed around.
|
// passed in alive while its being passed around.
|
||||||
// This isn't exactly safe, but we shouldn't really have to worry as
|
// This isn't exactly safe, but we shouldn't really have to worry as
|
||||||
// Rainmeter isn't threaded.
|
// Rainmeter isn't threaded.
|
||||||
static std::wstring str;
|
static std::wstring str;
|
||||||
|
|
||||||
str = ConvertToWide(lua_tostring(L,arg));
|
str = ConvertToWide(lua_tostring(L,arg));
|
||||||
|
|
||||||
return str.c_str();
|
return str.c_str();
|
||||||
@ -48,4 +47,4 @@ int is_wchar(lua_State* L, int lo, const char* type, int def, tolua_Error* err)
|
|||||||
err->array = 0;
|
err->array = 0;
|
||||||
err->type = type;
|
err->type = type;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
|
#ifndef __LUAPUSH_H__
|
||||||
#ifndef LUA_PUSH_H
|
#define __LUAPUSH_H__
|
||||||
#define LUA_PUSH_H
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "string"
|
#include <string>
|
||||||
|
|
||||||
#include "lua.hpp"
|
#include "lua.hpp"
|
||||||
#include "tolua++.h"
|
#include "tolua++.h"
|
||||||
|
|
||||||
std::wstring to_wstring (lua_State* L, int arg, void* type);
|
std::wstring to_wstring(lua_State* L, int arg, void* type);
|
||||||
void push_wstring (lua_State* L, void* value, const char* type);
|
void push_wstring(lua_State* L, const std::wstring& value);
|
||||||
int is_wstring (lua_State* L, int lo, const char* type, int def, tolua_Error* err);
|
int is_wstring(lua_State* L, int lo, const char* type, int def, tolua_Error* err);
|
||||||
|
|
||||||
void push_wchar (lua_State* L, void* value, const char* type);
|
void push_wchar(lua_State* L, const WCHAR* value);
|
||||||
const wchar_t* to_wchar (lua_State* L, int arg, void* type);
|
const WCHAR* to_wchar(lua_State* L, int arg, void* type);
|
||||||
int is_wchar (lua_State* L, int lo, const char* type, int def, tolua_Error* err);
|
int is_wchar(lua_State* L, int lo, const char* type, int def, tolua_Error* err);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
24
Library/lua/glue/LuaGlobal.cpp
Normal file
24
Library/lua/glue/LuaGlobal.cpp
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#include "../../StdAfx.h"
|
||||||
|
#include "../LuaManager.h"
|
||||||
|
#include "../../Litestep.h"
|
||||||
|
|
||||||
|
static int Global_Log(lua_State* L)
|
||||||
|
{
|
||||||
|
const char* str = tolua_tostring(L, 1, 0);
|
||||||
|
LuaManager::LuaLog(LOG_NOTICE, str);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const luaL_reg TO_funcs[] =
|
||||||
|
{
|
||||||
|
{ "LuaLog", Global_Log }, { NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
void LuaManager::RegisterGlobal(lua_State* L)
|
||||||
|
{
|
||||||
|
lua_register(L, "print", Global_Log);
|
||||||
|
luaL_register(L, "TO", TO_funcs); // For backwards compatibility
|
||||||
|
}
|
||||||
|
|
||||||
|
|
23
Library/lua/glue/LuaGroup.cpp
Normal file
23
Library/lua/glue/LuaGroup.cpp
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#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);
|
||||||
|
}
|
142
Library/lua/glue/LuaMeasure.cpp
Normal file
142
Library/lua/glue/LuaMeasure.cpp
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
#include "../../StdAfx.h"
|
||||||
|
#include "../LuaManager.h"
|
||||||
|
#include "../../Measure.h"
|
||||||
|
|
||||||
|
static int Measure_GetName(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeasure* self = (CMeasure*)tolua_tousertype(L, 1, 0);
|
||||||
|
const WCHAR* val = (const WCHAR*)self->GetName();
|
||||||
|
push_wchar(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Measure_GetANSIName(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeasure* self = (CMeasure*)tolua_tousertype(L, 1, 0);
|
||||||
|
const char* val = (const char*)self->GetANSIName();
|
||||||
|
tolua_pushstring(L, (const char*)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Measure_Disable(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeasure* self = (CMeasure*)tolua_tousertype(L, 1, 0);
|
||||||
|
self->Disable();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Measure_Enable(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeasure* self = (CMeasure*)tolua_tousertype(L, 1, 0);
|
||||||
|
self->Enable();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Measure_IsDisabled(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeasure* self = (CMeasure*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->IsDisabled();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Measure_HasDynamicVariables(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeasure* self = (CMeasure*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->HasDynamicVariables();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Measure_GetValue(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeasure* self = (CMeasure*)tolua_tousertype(L, 1, 0);
|
||||||
|
double val = (double)self->GetValue();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Measure_GetRelativeValue(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeasure* self = (CMeasure*)tolua_tousertype(L, 1, 0);
|
||||||
|
double val = (double)self->GetRelativeValue();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Measure_GetValueRange(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeasure* self = (CMeasure*)tolua_tousertype(L, 1, 0);
|
||||||
|
double val = (double)self->GetValueRange();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Measure_GetMinValue(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeasure* self = (CMeasure*)tolua_tousertype(L, 1, 0);
|
||||||
|
double val = (double)self->GetMinValue();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Measure_GetMaxValue(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeasure* self = (CMeasure*)tolua_tousertype(L, 1, 0);
|
||||||
|
double val = (double)self->GetMaxValue();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Measure_GetStringValue(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeasure* self = (CMeasure*)tolua_tousertype(L, 1, 0);
|
||||||
|
AUTOSCALE autoScale = ((AUTOSCALE)(int)tolua_tonumber(L, 2, AUTOSCALE_OFF));
|
||||||
|
double scale = (double)tolua_tonumber(L, 3, 1.0);
|
||||||
|
int decimals = (int)tolua_tonumber(L, 4, 0);
|
||||||
|
bool percentual = (bool)tolua_toboolean(L, 5, false);
|
||||||
|
|
||||||
|
const WCHAR* val = self->GetStringValue(autoScale, scale, decimals, percentual);
|
||||||
|
push_wchar(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LuaManager::RegisterMeasure(lua_State* L)
|
||||||
|
{
|
||||||
|
tolua_constant(L, "AUTOSCALE_1024", AUTOSCALE_1024);
|
||||||
|
tolua_constant(L, "AUTOSCALE_1000", AUTOSCALE_1000);
|
||||||
|
tolua_constant(L, "AUTOSCALE_1024K", AUTOSCALE_1024K);
|
||||||
|
tolua_constant(L, "AUTOSCALE_1000K", AUTOSCALE_1000K);
|
||||||
|
tolua_constant(L, "AUTOSCALE_OFF", AUTOSCALE_OFF);
|
||||||
|
tolua_constant(L, "AUTOSCALE_ON", AUTOSCALE_ON);
|
||||||
|
|
||||||
|
tolua_usertype(L, "CMeasure");
|
||||||
|
tolua_cclass(L, "CMeasure", "CMeasure", "CGroup", NULL);
|
||||||
|
|
||||||
|
tolua_beginmodule(L, "CMeasure");
|
||||||
|
tolua_function(L, "GetName", Measure_GetName);
|
||||||
|
tolua_function(L, "GetANSIName", Measure_GetANSIName);
|
||||||
|
tolua_function(L, "Disable", Measure_Disable);
|
||||||
|
tolua_function(L, "Enable", Measure_Enable);
|
||||||
|
tolua_function(L, "IsDisabled", Measure_IsDisabled);
|
||||||
|
tolua_function(L, "HasDynamicVariables", Measure_HasDynamicVariables);
|
||||||
|
tolua_function(L, "GetValue", Measure_GetValue);
|
||||||
|
tolua_function(L, "GetRelativeValue", Measure_GetRelativeValue);
|
||||||
|
tolua_function(L, "GetValueRange", Measure_GetValueRange);
|
||||||
|
tolua_function(L, "GetMinValue", Measure_GetMinValue);
|
||||||
|
tolua_function(L, "GetMaxValue", Measure_GetMaxValue);
|
||||||
|
tolua_function(L, "GetStringValue", Measure_GetStringValue);
|
||||||
|
tolua_endmodule(L);
|
||||||
|
}
|
254
Library/lua/glue/LuaMeter.cpp
Normal file
254
Library/lua/glue/LuaMeter.cpp
Normal file
@ -0,0 +1,254 @@
|
|||||||
|
#include "../../StdAfx.h"
|
||||||
|
#include "../LuaManager.h"
|
||||||
|
#include "../../Meter.h"
|
||||||
|
|
||||||
|
static int Meter_Update(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->Update();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_HasActiveTransition(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->HasActiveTransition();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_HasDynamicVariables(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->HasDynamicVariables();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_GetW(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
int val = (int)self->GetW();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_GetH(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
int val = (int)self->GetH();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_GetX(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool abs = ((bool)tolua_toboolean(L, 2, false));
|
||||||
|
int val = (int)self->GetX(abs);
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_GetY(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool abs = ((bool)tolua_toboolean(L, 2, false));
|
||||||
|
int val = (int)self->GetY(abs);
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_SetW(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
int w = (int)tolua_tonumber(L, 2, 0);
|
||||||
|
self->SetW(w);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_SetH(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
int h = (int)tolua_tonumber(L, 2, 0);
|
||||||
|
self->SetH(h);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_SetX(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
int x = (int)tolua_tonumber(L, 2, 0);
|
||||||
|
self->SetX(x);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_SetY(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
int y = (int)tolua_tonumber(L, 2, 0);
|
||||||
|
self->SetY(y);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_GetToolTipText(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
const std::wstring& val = self->GetToolTipText();
|
||||||
|
push_wchar(L, val.c_str());
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_HasToolTip(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->HasToolTip();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_SetToolTipHidden(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool b = (bool)tolua_toboolean(L, 2, 0);
|
||||||
|
self->SetToolTipHidden(b);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_UpdateToolTip(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
self->UpdateToolTip();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_HasMouseAction(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->HasMouseAction();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_HasMouseActionCursor(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->HasMouseActionCursor();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_SetMouseActionCursor(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool b = (bool)tolua_toboolean(L, 2, 0);
|
||||||
|
self->SetMouseActionCursor(b);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_Hide(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
self->Hide();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_Show(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
self->Show();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_IsHidden(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->IsHidden();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_HitTest(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
int x = (int)tolua_tonumber(L, 2, 0);
|
||||||
|
int y = (int)tolua_tonumber(L, 3, 0);
|
||||||
|
|
||||||
|
bool val = self->HitTest(x, y);
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_IsMouseOver(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->IsMouseOver();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Meter_GetName(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeter* self = (CMeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
const WCHAR* val = (const WCHAR*)self->GetName();
|
||||||
|
push_wchar(L, val);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LuaManager::RegisterMeter(lua_State* L)
|
||||||
|
{
|
||||||
|
tolua_usertype(L, "CMeter");
|
||||||
|
tolua_cclass(L, "CMeter", "CMeter", "CGroup", NULL);
|
||||||
|
|
||||||
|
tolua_beginmodule(L, "CMeter");
|
||||||
|
tolua_function(L, "Update", Meter_Update);
|
||||||
|
tolua_function(L, "HasActiveTransition", Meter_HasActiveTransition);
|
||||||
|
tolua_function(L, "HasDynamicVariables", Meter_HasDynamicVariables);
|
||||||
|
tolua_function(L, "GetW", Meter_GetW);
|
||||||
|
tolua_function(L, "GetH", Meter_GetH);
|
||||||
|
tolua_function(L, "GetX", Meter_GetX);
|
||||||
|
tolua_function(L, "GetY", Meter_GetY);
|
||||||
|
tolua_function(L, "SetW", Meter_SetW);
|
||||||
|
tolua_function(L, "SetH", Meter_SetH);
|
||||||
|
tolua_function(L, "SetX", Meter_SetX);
|
||||||
|
tolua_function(L, "SetY", Meter_SetY);
|
||||||
|
tolua_function(L, "GetToolTipText", Meter_GetToolTipText);
|
||||||
|
tolua_function(L, "HasToolTip", Meter_HasToolTip);
|
||||||
|
tolua_function(L, "SetToolTipHidden", Meter_SetToolTipHidden);
|
||||||
|
tolua_function(L, "UpdateToolTip", Meter_UpdateToolTip);
|
||||||
|
tolua_function(L, "HasMouseAction", Meter_HasMouseAction);
|
||||||
|
tolua_function(L, "HasMouseActionCursor", Meter_HasMouseActionCursor);
|
||||||
|
tolua_function(L, "SetMouseActionCursor", Meter_SetMouseActionCursor);
|
||||||
|
tolua_function(L, "Hide", Meter_Hide);
|
||||||
|
tolua_function(L, "Show", Meter_Show);
|
||||||
|
tolua_function(L, "IsHidden", Meter_IsHidden);
|
||||||
|
tolua_function(L, "HitTest", Meter_HitTest);
|
||||||
|
tolua_function(L, "IsMouseOver", Meter_IsMouseOver);
|
||||||
|
tolua_function(L, "GetName", Meter_GetName);
|
||||||
|
tolua_endmodule(L);
|
||||||
|
}
|
43
Library/lua/glue/LuaMeterString.cpp
Normal file
43
Library/lua/glue/LuaMeterString.cpp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#include "../../StdAfx.h"
|
||||||
|
#include "../LuaManager.h"
|
||||||
|
#include "../../MeterString.h"
|
||||||
|
|
||||||
|
static int MeterString_GetX(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterString* self = (CMeterString*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool abs = (bool)tolua_toboolean(L, 2, false);
|
||||||
|
int val = self->GetX(abs);
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterString_Update(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterString* self = (CMeterString*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->Update();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterString_SetText(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterString* self = (CMeterString*)tolua_tousertype(L, 1, 0);
|
||||||
|
const WCHAR* text = to_wchar(L, 2, 0);
|
||||||
|
self->SetText(text);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LuaManager::RegisterMeterString(lua_State* L)
|
||||||
|
{
|
||||||
|
tolua_usertype(L, "CMeterString");
|
||||||
|
tolua_cclass(L, "CMeterString", "CMeterString", "CMeter", NULL);
|
||||||
|
|
||||||
|
tolua_beginmodule(L, "CMeterString");
|
||||||
|
tolua_function(L, "GetX", MeterString_GetX);
|
||||||
|
tolua_function(L, "Update", MeterString_Update);
|
||||||
|
tolua_function(L, "SetText", MeterString_SetText);
|
||||||
|
tolua_endmodule(L);
|
||||||
|
}
|
503
Library/lua/glue/LuaMeterWindow.cpp
Normal file
503
Library/lua/glue/LuaMeterWindow.cpp
Normal file
@ -0,0 +1,503 @@
|
|||||||
|
#include "../../StdAfx.h"
|
||||||
|
#include "../LuaManager.h"
|
||||||
|
#include "../../Rainmeter.h"
|
||||||
|
#include "../../MeterWindow.h"
|
||||||
|
#include "../../MeterString.h"
|
||||||
|
|
||||||
|
static int MeterWindow_MoveMeter(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
int x = (int)tolua_tonumber(L, 2, 0);
|
||||||
|
int y = (int)tolua_tonumber(L, 3, 0);
|
||||||
|
const WCHAR* name = ((const WCHAR*)to_wchar(L, 4, 0));
|
||||||
|
self->MoveMeter(x, y, name);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_HideMeter(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
const WCHAR* name = ((const WCHAR*)to_wchar(L, 2, 0));
|
||||||
|
bool group = ((bool)tolua_toboolean(L, 3, false));
|
||||||
|
self->HideMeter(name, group);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_ShowMeter(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
const WCHAR* name = ((const WCHAR*)to_wchar(L, 2, 0));
|
||||||
|
bool group = ((bool)tolua_toboolean(L, 3, false));
|
||||||
|
self->ShowMeter(name, group);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_ToggleMeter(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
const WCHAR* name = ((const WCHAR*)to_wchar(L, 2, 0));
|
||||||
|
bool group = ((bool)tolua_toboolean(L, 3, false));
|
||||||
|
self->ToggleMeter(name, group);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_UpdateMeter(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
const WCHAR* name = ((const WCHAR*)to_wchar(L, 2, 0));
|
||||||
|
bool group = ((bool)tolua_toboolean(L, 3, false));
|
||||||
|
self->UpdateMeter(name, group);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_DisableMeasure(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
const WCHAR* name = ((const WCHAR*)to_wchar(L, 2, 0));
|
||||||
|
bool group = ((bool)tolua_toboolean(L, 3, false));
|
||||||
|
self->DisableMeasure(name, group);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_EnableMeasure(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
const WCHAR* name = ((const WCHAR*)to_wchar(L, 2, 0));
|
||||||
|
bool group = ((bool)tolua_toboolean(L, 3, false));
|
||||||
|
self->EnableMeasure(name, group);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_ToggleMeasure(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
const WCHAR* name = ((const WCHAR*)to_wchar(L, 2, 0));
|
||||||
|
bool group = ((bool)tolua_toboolean(L, 3, false));
|
||||||
|
self->ToggleMeasure(name, group);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_UpdateMeasure(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
const WCHAR* name = ((const WCHAR*)to_wchar(L, 2, 0));
|
||||||
|
bool group = ((bool)tolua_toboolean(L, 3, false));
|
||||||
|
|
||||||
|
self->UpdateMeasure(name, group);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_Redraw(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
self->Redraw();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_MoveWindow(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
int x = (int)tolua_tonumber(L, 2, 0);
|
||||||
|
int y = (int)tolua_tonumber(L, 3, 0);
|
||||||
|
|
||||||
|
self->MoveWindow(x, y);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_ChangeZPos(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
ZPOSITION zPos = ((ZPOSITION) (int)tolua_tonumber(L, 2, 0));
|
||||||
|
bool all = ((bool)tolua_toboolean(L, 3, false));
|
||||||
|
self->ChangeZPos(zPos, all);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_FadeWindow(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
int from = (int)tolua_tonumber(L, 2, 0);
|
||||||
|
int to = (int)tolua_tonumber(L, 3, 0);
|
||||||
|
self->FadeWindow(from, to);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetSkinName(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
const std::wstring& val = self->GetSkinName();
|
||||||
|
push_wstring(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetSkinIniFile(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
const std::wstring& val = self->GetSkinIniFile();
|
||||||
|
push_wchar(L, val.c_str());
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetWindowZPosition(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
ZPOSITION val = (ZPOSITION)self->GetWindowZPosition();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetXPercentage(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->GetXPercentage();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetYPercentage(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->GetYPercentage();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetXFromRight(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->GetXFromRight();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetYFromBottom(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->GetYFromBottom();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetW(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
int val = (int)self->GetW();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetH(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
int val = (int)self->GetH();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetX(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
int val = (int)self->GetX();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetY(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
int val = (int)self->GetY();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetXScreenDefined(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->GetXScreenDefined();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetYScreenDefined(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->GetYScreenDefined();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetXScreen(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
int val = (int)self->GetXScreen();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetYScreen(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
int val = (int)self->GetYScreen();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetNativeTransparency(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->GetNativeTransparency();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetClickThrough(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->GetClickThrough();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetKeepOnScreen(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->GetKeepOnScreen();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetAutoSelectScreen(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->GetAutoSelectScreen();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetWindowDraggable(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->GetWindowDraggable();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetSavePosition(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->GetSavePosition();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetSnapEdges(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->GetSnapEdges();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetWindowHide(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
HIDEMODE val = (HIDEMODE)self->GetWindowHide();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetAlphaValue(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
int val = (int)self->GetAlphaValue();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetUpdateCounter(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
int val = (int)self->GetUpdateCounter();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetTransitionUpdate(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
int val = (int)self->GetTransitionUpdate();
|
||||||
|
tolua_pushnumber(L, (lua_Number)val);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_MakePathAbsolute(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
const std::wstring path = to_wstring(L, 2, 0);
|
||||||
|
|
||||||
|
std::wstring val = self->MakePathAbsolute(path);
|
||||||
|
push_wstring(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetMeter(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
const std::wstring meterName = to_wstring(L, 2, 0);
|
||||||
|
|
||||||
|
CMeter* meter = self->GetMeter(meterName);
|
||||||
|
if (!meter)
|
||||||
|
{
|
||||||
|
std::wstring error = L"Script: No such meter as ";
|
||||||
|
error += meterName;
|
||||||
|
error += L".";
|
||||||
|
Log(LOG_ERROR, error.c_str());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CMeterString* stringMeter = dynamic_cast<CMeterString*>(meter))
|
||||||
|
{
|
||||||
|
tolua_pushusertype(L, stringMeter, "CMeterString");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tolua_pushusertype(L, meter, "CMeter");
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_GetMeasure(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
const std::wstring measureName = to_wstring(L, 2, 0);
|
||||||
|
|
||||||
|
CMeasure* val = self->GetMeasure(measureName);
|
||||||
|
tolua_pushusertype(L, (void*)val, "CMeasure");
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_ReplaceVariables(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
const char* arg = (const char*)tolua_tostring(L, 2, 0);
|
||||||
|
const char* val = (const char*)self->ReplaceVariables(arg);
|
||||||
|
tolua_pushstring(L, (const char*)val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int MeterWindow_Bang(lua_State* L)
|
||||||
|
{
|
||||||
|
CMeterWindow* self = (CMeterWindow*)tolua_tousertype(L, 1, 0);
|
||||||
|
const char* p_str = (const char*)tolua_tostring(L, 2, 0);
|
||||||
|
|
||||||
|
p_str = self->ReplaceVariables(p_str);
|
||||||
|
std::wstring bang = ConvertToWide(p_str);
|
||||||
|
self->GetMainObject()->ExecuteCommand(bang.c_str(), self);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LuaManager::RegisterMeterWindow(lua_State* L)
|
||||||
|
{
|
||||||
|
tolua_constant(L, "ZPOSITION_ONDESKTOP", ZPOSITION_ONDESKTOP);
|
||||||
|
tolua_constant(L, "ZPOSITION_ONBOTTOM", ZPOSITION_ONBOTTOM);
|
||||||
|
tolua_constant(L, "ZPOSITION_NORMAL", ZPOSITION_NORMAL);
|
||||||
|
tolua_constant(L, "ZPOSITION_ONTOP", ZPOSITION_ONTOP);
|
||||||
|
tolua_constant(L, "ZPOSITION_ONTOPMOST", ZPOSITION_ONTOPMOST);
|
||||||
|
tolua_constant(L, "HIDEMODE_NONE", HIDEMODE_NONE);
|
||||||
|
tolua_constant(L, "HIDEMODE_HIDE", HIDEMODE_HIDE);
|
||||||
|
tolua_constant(L, "HIDEMODE_FADEIN", HIDEMODE_FADEIN);
|
||||||
|
tolua_constant(L, "HIDEMODE_FADEOUT", HIDEMODE_FADEOUT);
|
||||||
|
|
||||||
|
tolua_usertype(L, "CMeterWindow");
|
||||||
|
tolua_cclass(L, "CMeterWindow", "CMeterWindow", "CGroup", NULL);
|
||||||
|
|
||||||
|
tolua_beginmodule(L, "CMeterWindow");
|
||||||
|
tolua_function(L, "MoveMeter", MeterWindow_MoveMeter);
|
||||||
|
tolua_function(L, "HideMeter", MeterWindow_HideMeter);
|
||||||
|
tolua_function(L, "ShowMeter", MeterWindow_ShowMeter);
|
||||||
|
tolua_function(L, "ToggleMeter", MeterWindow_ToggleMeter);
|
||||||
|
tolua_function(L, "UpdateMeter", MeterWindow_UpdateMeter);
|
||||||
|
tolua_function(L, "DisableMeasure", MeterWindow_DisableMeasure);
|
||||||
|
tolua_function(L, "EnableMeasure", MeterWindow_EnableMeasure);
|
||||||
|
tolua_function(L, "ToggleMeasure", MeterWindow_ToggleMeasure);
|
||||||
|
tolua_function(L, "UpdateMeasure", MeterWindow_UpdateMeasure);
|
||||||
|
tolua_function(L, "Redraw", MeterWindow_Redraw);
|
||||||
|
tolua_function(L, "MoveWindow", MeterWindow_MoveWindow);
|
||||||
|
tolua_function(L, "ChangeZPos", MeterWindow_ChangeZPos);
|
||||||
|
tolua_function(L, "FadeWindow", MeterWindow_FadeWindow);
|
||||||
|
tolua_function(L, "GetSkinName", MeterWindow_GetSkinName);
|
||||||
|
tolua_function(L, "GetSkinIniFile", MeterWindow_GetSkinIniFile);
|
||||||
|
tolua_function(L, "GetWindowZPosition", MeterWindow_GetWindowZPosition);
|
||||||
|
tolua_function(L, "GetXPercentage", MeterWindow_GetXPercentage);
|
||||||
|
tolua_function(L, "GetYPercentage", MeterWindow_GetYPercentage);
|
||||||
|
tolua_function(L, "GetXFromRight", MeterWindow_GetXFromRight);
|
||||||
|
tolua_function(L, "GetYFromBottom", MeterWindow_GetYFromBottom);
|
||||||
|
tolua_function(L, "GetW", MeterWindow_GetW);
|
||||||
|
tolua_function(L, "GetH", MeterWindow_GetH);
|
||||||
|
tolua_function(L, "GetX", MeterWindow_GetX);
|
||||||
|
tolua_function(L, "GetY", MeterWindow_GetY);
|
||||||
|
tolua_function(L, "GetXScreenDefined", MeterWindow_GetXScreenDefined);
|
||||||
|
tolua_function(L, "GetYScreenDefined", MeterWindow_GetYScreenDefined);
|
||||||
|
tolua_function(L, "GetXScreen", MeterWindow_GetXScreen);
|
||||||
|
tolua_function(L, "GetYScreen", MeterWindow_GetYScreen);
|
||||||
|
tolua_function(L, "GetNativeTransparency", MeterWindow_GetNativeTransparency);
|
||||||
|
tolua_function(L, "GetClickThrough", MeterWindow_GetClickThrough);
|
||||||
|
tolua_function(L, "GetKeepOnScreen", MeterWindow_GetKeepOnScreen);
|
||||||
|
tolua_function(L, "GetAutoSelectScreen", MeterWindow_GetAutoSelectScreen);
|
||||||
|
tolua_function(L, "GetWindowDraggable", MeterWindow_GetWindowDraggable);
|
||||||
|
tolua_function(L, "GetSavePosition", MeterWindow_GetSavePosition);
|
||||||
|
tolua_function(L, "GetSnapEdges", MeterWindow_GetSnapEdges);
|
||||||
|
tolua_function(L, "GetWindowHide", MeterWindow_GetWindowHide);
|
||||||
|
tolua_function(L, "GetAlphaValue", MeterWindow_GetAlphaValue);
|
||||||
|
tolua_function(L, "GetUpdateCounter", MeterWindow_GetUpdateCounter);
|
||||||
|
tolua_function(L, "GetTransitionUpdate", MeterWindow_GetTransitionUpdate);
|
||||||
|
tolua_function(L, "MakePathAbsolute", MeterWindow_MakePathAbsolute);
|
||||||
|
tolua_function(L, "GetMeter", MeterWindow_GetMeter);
|
||||||
|
tolua_function(L, "GetMeasure", MeterWindow_GetMeasure);
|
||||||
|
tolua_function(L, "ReplaceVariables", MeterWindow_ReplaceVariables);
|
||||||
|
tolua_function(L, "Bang", MeterWindow_Bang);
|
||||||
|
tolua_endmodule(L);
|
||||||
|
}
|
61
Library/lua/glue/LuaRainmeter.cpp
Normal file
61
Library/lua/glue/LuaRainmeter.cpp
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
#include "../../StdAfx.h"
|
||||||
|
#include "../LuaManager.h"
|
||||||
|
#include "../../Rainmeter.h"
|
||||||
|
|
||||||
|
static int Rainmeter_GetConfigEditor(lua_State* L)
|
||||||
|
{
|
||||||
|
CRainmeter* self = (CRainmeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
const std::wstring& val = self->GetConfigEditor();
|
||||||
|
push_wstring(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Rainmeter_GetLogViewer(lua_State* L)
|
||||||
|
{
|
||||||
|
CRainmeter* self = (CRainmeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
const std::wstring& val = self->GetLogViewer();
|
||||||
|
push_wstring(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Rainmeter_GetStatsDate(lua_State* L)
|
||||||
|
{
|
||||||
|
CRainmeter* self = (CRainmeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
const std::wstring& val = self->GetStatsDate();
|
||||||
|
push_wstring(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Rainmeter_GetDebug(lua_State* L)
|
||||||
|
{
|
||||||
|
bool val = CRainmeter::GetDebug();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int Rainmeter_IsMenuActive(lua_State* L)
|
||||||
|
{
|
||||||
|
CRainmeter* self = (CRainmeter*)tolua_tousertype(L, 1, 0);
|
||||||
|
bool val = self->IsMenuActive();
|
||||||
|
tolua_pushboolean(L, val);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LuaManager::RegisterRainmeter(lua_State* L)
|
||||||
|
{
|
||||||
|
tolua_usertype(L, "CRainmeter");
|
||||||
|
tolua_cclass(L, "CRainmeter", "CRainmeter", "", NULL);
|
||||||
|
|
||||||
|
tolua_beginmodule(L, "CRainmeter");
|
||||||
|
tolua_function(L, "GetConfigEditor", Rainmeter_GetConfigEditor);
|
||||||
|
tolua_function(L, "GetLogViewer", Rainmeter_GetLogViewer);
|
||||||
|
tolua_function(L, "GetStatsDate", Rainmeter_GetStatsDate);
|
||||||
|
tolua_function(L, "GetDebug", Rainmeter_GetDebug);
|
||||||
|
tolua_function(L, "IsMenuActive", Rainmeter_IsMenuActive);
|
||||||
|
tolua_endmodule(L);
|
||||||
|
}
|
@ -1,83 +0,0 @@
|
|||||||
/*
|
|
||||||
** Lua binding: group
|
|
||||||
** Generated automatically by tolua++-1.0.92 on 02/15/11 03:01:14.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "../../StdAfx.h"
|
|
||||||
|
|
||||||
#ifndef __cplusplus
|
|
||||||
#include "stdlib.h"
|
|
||||||
#endif
|
|
||||||
#include "string.h"
|
|
||||||
|
|
||||||
#include "tolua++.h"
|
|
||||||
|
|
||||||
/* Exported function */
|
|
||||||
TOLUA_API int tolua_group_open (lua_State* tolua_S);
|
|
||||||
|
|
||||||
#include "../../Group.h"
|
|
||||||
#include "../LuaPush.h"
|
|
||||||
|
|
||||||
/* function to register type */
|
|
||||||
static void tolua_reg_types (lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
tolua_usertype(tolua_S,"CGroup");
|
|
||||||
tolua_usertype(tolua_S,"std::wstring");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* method: BelongsToGroup of class CGroup */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_group_CGroup_BelongsToGroup00
|
|
||||||
static int tolua_group_CGroup_BelongsToGroup00(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_Error tolua_err;
|
|
||||||
if (
|
|
||||||
!tolua_isusertype(tolua_S,1,"CGroup",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;
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
CGroup* self = (CGroup*) tolua_tousertype(tolua_S,1,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);
|
|
||||||
tolua_pushboolean(tolua_S,(bool)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'BelongsToGroup'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* Open function */
|
|
||||||
TOLUA_API int tolua_group_open (lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
tolua_open(tolua_S);
|
|
||||||
tolua_reg_types(tolua_S);
|
|
||||||
tolua_module(tolua_S,NULL,0);
|
|
||||||
tolua_beginmodule(tolua_S,NULL);
|
|
||||||
tolua_cclass(tolua_S,"CGroup","CGroup","",NULL);
|
|
||||||
tolua_beginmodule(tolua_S,"CGroup");
|
|
||||||
tolua_function(tolua_S,"BelongsToGroup",tolua_group_CGroup_BelongsToGroup00);
|
|
||||||
tolua_endmodule(tolua_S);
|
|
||||||
tolua_endmodule(tolua_S);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
|
|
||||||
TOLUA_API int luaopen_group (lua_State* tolua_S) {
|
|
||||||
return tolua_group_open(tolua_S);
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
/*
|
|
||||||
** Lua binding: group
|
|
||||||
** Generated automatically by tolua++-1.0.92 on 02/15/11 03:01:14.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Exported function */
|
|
||||||
TOLUA_API int tolua_group_open (lua_State* tolua_S);
|
|
||||||
|
|
@ -1,457 +0,0 @@
|
|||||||
/*
|
|
||||||
** Lua binding: measure
|
|
||||||
** Generated automatically by tolua++-1.0.92 on 02/15/11 18:55:46.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "../../StdAfx.h"
|
|
||||||
|
|
||||||
#ifndef __cplusplus
|
|
||||||
#include "stdlib.h"
|
|
||||||
#endif
|
|
||||||
#include "string.h"
|
|
||||||
|
|
||||||
#include "tolua++.h"
|
|
||||||
|
|
||||||
/* Exported function */
|
|
||||||
TOLUA_API int tolua_measure_open (lua_State* tolua_S);
|
|
||||||
|
|
||||||
#include "../../Measure.h"
|
|
||||||
#include "../LuaPush.h"
|
|
||||||
|
|
||||||
/* function to register type */
|
|
||||||
static void tolua_reg_types (lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
tolua_usertype(tolua_S,"CGroup");
|
|
||||||
tolua_usertype(tolua_S,"CMeasure");
|
|
||||||
tolua_usertype(tolua_S,"WCHAR");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 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: GetANSIName of class CMeasure */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_measure_CMeasure_GetANSIName00
|
|
||||||
static int tolua_measure_CMeasure_GetANSIName00(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 'GetANSIName'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
const char* tolua_ret = (const char*) self->GetANSIName();
|
|
||||||
tolua_pushstring(tolua_S,(const char*)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'GetANSIName'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: Disable of class CMeasure */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_measure_CMeasure_Disable00
|
|
||||||
static int tolua_measure_CMeasure_Disable00(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 'Disable'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
self->Disable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'Disable'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: Enable of class CMeasure */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_measure_CMeasure_Enable00
|
|
||||||
static int tolua_measure_CMeasure_Enable00(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 'Enable'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
self->Enable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'Enable'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: IsDisabled of class CMeasure */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_measure_CMeasure_IsDisabled00
|
|
||||||
static int tolua_measure_CMeasure_IsDisabled00(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 'IsDisabled'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
bool tolua_ret = (bool) self->IsDisabled();
|
|
||||||
tolua_pushboolean(tolua_S,(bool)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'IsDisabled'.",&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)
|
|
||||||
{
|
|
||||||
#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 'HasDynamicVariables'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
bool tolua_ret = (bool) self->HasDynamicVariables();
|
|
||||||
tolua_pushboolean(tolua_S,(bool)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'HasDynamicVariables'.",&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)
|
|
||||||
{
|
|
||||||
#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 'GetValue'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
double tolua_ret = (double) self->GetValue();
|
|
||||||
tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'GetValue'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: GetRelativeValue of class CMeasure */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_measure_CMeasure_GetRelativeValue00
|
|
||||||
static int tolua_measure_CMeasure_GetRelativeValue00(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 'GetRelativeValue'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
double tolua_ret = (double) self->GetRelativeValue();
|
|
||||||
tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'GetRelativeValue'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: GetValueRange of class CMeasure */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_measure_CMeasure_GetValueRange00
|
|
||||||
static int tolua_measure_CMeasure_GetValueRange00(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 'GetValueRange'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
double tolua_ret = (double) self->GetValueRange();
|
|
||||||
tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'GetValueRange'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: GetMinValue of class CMeasure */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_measure_CMeasure_GetMinValue00
|
|
||||||
static int tolua_measure_CMeasure_GetMinValue00(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 'GetMinValue'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
double tolua_ret = (double) self->GetMinValue();
|
|
||||||
tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'GetMinValue'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: GetMaxValue of class CMeasure */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_measure_CMeasure_GetMaxValue00
|
|
||||||
static int tolua_measure_CMeasure_GetMaxValue00(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 'GetMaxValue'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
double tolua_ret = (double) self->GetMaxValue();
|
|
||||||
tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'GetMaxValue'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: GetStringValue of class CMeasure */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_measure_CMeasure_GetStringValue00
|
|
||||||
static int tolua_measure_CMeasure_GetStringValue00(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_Error tolua_err;
|
|
||||||
if (
|
|
||||||
!tolua_isusertype(tolua_S,1,"CMeasure",0,&tolua_err) ||
|
|
||||||
!tolua_isnumber(tolua_S,2,1,&tolua_err) ||
|
|
||||||
!tolua_isnumber(tolua_S,3,1,&tolua_err) ||
|
|
||||||
!tolua_isnumber(tolua_S,4,1,&tolua_err) ||
|
|
||||||
!tolua_isboolean(tolua_S,5,1,&tolua_err) ||
|
|
||||||
!tolua_isnoobj(tolua_S,6,&tolua_err)
|
|
||||||
)
|
|
||||||
goto tolua_lerror;
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
CMeasure* self = (CMeasure*) tolua_tousertype(tolua_S,1,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));
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetStringValue'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
const WCHAR* tolua_ret = (const WCHAR*) self->GetStringValue(autoScale,scale,decimals,percentual);
|
|
||||||
push_wchar(tolua_S,(void*)tolua_ret,"const WCHAR");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'GetStringValue'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* Open function */
|
|
||||||
TOLUA_API int tolua_measure_open (lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
tolua_open(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,"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,"HasDynamicVariables",tolua_measure_CMeasure_HasDynamicVariables00);
|
|
||||||
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);
|
|
||||||
tolua_function(tolua_S,"GetMinValue",tolua_measure_CMeasure_GetMinValue00);
|
|
||||||
tolua_function(tolua_S,"GetMaxValue",tolua_measure_CMeasure_GetMaxValue00);
|
|
||||||
tolua_function(tolua_S,"GetStringValue",tolua_measure_CMeasure_GetStringValue00);
|
|
||||||
tolua_endmodule(tolua_S);
|
|
||||||
tolua_endmodule(tolua_S);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
|
|
||||||
TOLUA_API int luaopen_measure (lua_State* tolua_S) {
|
|
||||||
return tolua_measure_open(tolua_S);
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
/*
|
|
||||||
** Lua binding: measure
|
|
||||||
** Generated automatically by tolua++-1.0.92 on 02/15/11 18:55:46.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Exported function */
|
|
||||||
TOLUA_API int tolua_measure_open (lua_State* tolua_S);
|
|
||||||
|
|
@ -1,899 +0,0 @@
|
|||||||
/*
|
|
||||||
** Lua binding: meter
|
|
||||||
** Generated automatically by tolua++-1.0.92 on 02/15/11 18:55:46.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "../../StdAfx.h"
|
|
||||||
|
|
||||||
#ifndef __cplusplus
|
|
||||||
#include "stdlib.h"
|
|
||||||
#endif
|
|
||||||
#include "string.h"
|
|
||||||
|
|
||||||
#include "tolua++.h"
|
|
||||||
|
|
||||||
/* Exported function */
|
|
||||||
TOLUA_API int tolua_meter_open (lua_State* tolua_S);
|
|
||||||
|
|
||||||
#include "../../Meter.h"
|
|
||||||
#include "../LuaPush.h"
|
|
||||||
|
|
||||||
/* function to release collected object via destructor */
|
|
||||||
#ifdef __cplusplus
|
|
||||||
|
|
||||||
static int tolua_collect_std__wstring (lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
std::wstring* self = (std::wstring*) tolua_tousertype(tolua_S,1,0);
|
|
||||||
Mtolua_delete(self);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* function to register type */
|
|
||||||
static void tolua_reg_types (lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
tolua_usertype(tolua_S,"std::wstring");
|
|
||||||
tolua_usertype(tolua_S,"CMeter");
|
|
||||||
tolua_usertype(tolua_S,"Gdiplus::Matrix");
|
|
||||||
tolua_usertype(tolua_S,"CGroup");
|
|
||||||
tolua_usertype(tolua_S,"WCHAR");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* method: Update of class CMeter */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_Update00
|
|
||||||
static int tolua_meter_CMeter_Update00(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 'Update'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
bool tolua_ret = (bool) self->Update();
|
|
||||||
tolua_pushboolean(tolua_S,(bool)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'Update'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: HasActiveTransition of class CMeter */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_HasActiveTransition00
|
|
||||||
static int tolua_meter_CMeter_HasActiveTransition00(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 'HasActiveTransition'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
bool tolua_ret = (bool) self->HasActiveTransition();
|
|
||||||
tolua_pushboolean(tolua_S,(bool)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'HasActiveTransition'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: HasDynamicVariables of class CMeter */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_HasDynamicVariables00
|
|
||||||
static int tolua_meter_CMeter_HasDynamicVariables00(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 'HasDynamicVariables'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
bool tolua_ret = (bool) self->HasDynamicVariables();
|
|
||||||
tolua_pushboolean(tolua_S,(bool)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'HasDynamicVariables'.",&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)
|
|
||||||
{
|
|
||||||
#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 '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 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)
|
|
||||||
{
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_Error tolua_err;
|
|
||||||
if (
|
|
||||||
!tolua_isusertype(tolua_S,1,"CMeter",0,&tolua_err) ||
|
|
||||||
!tolua_isboolean(tolua_S,2,1,&tolua_err) ||
|
|
||||||
!tolua_isnoobj(tolua_S,3,&tolua_err)
|
|
||||||
)
|
|
||||||
goto tolua_lerror;
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
CMeter* self = (CMeter*) tolua_tousertype(tolua_S,1,0);
|
|
||||||
bool abs = ((bool) tolua_toboolean(tolua_S,2,false));
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetX'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
int tolua_ret = (int) self->GetX(abs);
|
|
||||||
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 CMeter */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_GetY00
|
|
||||||
static int tolua_meter_CMeter_GetY00(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,1,&tolua_err) ||
|
|
||||||
!tolua_isnoobj(tolua_S,3,&tolua_err)
|
|
||||||
)
|
|
||||||
goto tolua_lerror;
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
CMeter* self = (CMeter*) tolua_tousertype(tolua_S,1,0);
|
|
||||||
bool abs = ((bool) tolua_toboolean(tolua_S,2,false));
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetY'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
int tolua_ret = (int) self->GetY(abs);
|
|
||||||
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: 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)
|
|
||||||
{
|
|
||||||
#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 x = ((int) tolua_tonumber(tolua_S,2,0));
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetX'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
self->SetX(x);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'SetX'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: SetY of class CMeter */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_SetY00
|
|
||||||
static int tolua_meter_CMeter_SetY00(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 y = ((int) tolua_tonumber(tolua_S,2,0));
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetY'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
self->SetY(y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'SetY'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: GetToolTipText of class CMeter */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_GetToolTipText00
|
|
||||||
static int tolua_meter_CMeter_GetToolTipText00(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 'GetToolTipText'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
const std::wstring& tolua_ret = (const std::wstring&) self->GetToolTipText();
|
|
||||||
push_wstring(tolua_S,(void*)&tolua_ret,"const std::wstring");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'GetToolTipText'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#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)
|
|
||||||
{
|
|
||||||
#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 b = ((bool) tolua_toboolean(tolua_S,2,0));
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetToolTipHidden'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
self->SetToolTipHidden(b);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'SetToolTipHidden'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: UpdateToolTip of class CMeter */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_UpdateToolTip00
|
|
||||||
static int tolua_meter_CMeter_UpdateToolTip00(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 'UpdateToolTip'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
self->UpdateToolTip();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'UpdateToolTip'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: HasMouseAction of class CMeter */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_HasMouseAction00
|
|
||||||
static int tolua_meter_CMeter_HasMouseAction00(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 'HasMouseAction'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
bool tolua_ret = (bool) self->HasMouseAction();
|
|
||||||
tolua_pushboolean(tolua_S,(bool)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'HasMouseAction'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: HasMouseActionCursor of class CMeter */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_HasMouseActionCursor00
|
|
||||||
static int tolua_meter_CMeter_HasMouseActionCursor00(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 'HasMouseActionCursor'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
bool tolua_ret = (bool) self->HasMouseActionCursor();
|
|
||||||
tolua_pushboolean(tolua_S,(bool)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'HasMouseActionCursor'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: SetMouseActionCursor of class CMeter */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_SetMouseActionCursor00
|
|
||||||
static int tolua_meter_CMeter_SetMouseActionCursor00(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 b = ((bool) tolua_toboolean(tolua_S,2,0));
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetMouseActionCursor'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
self->SetMouseActionCursor(b);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'SetMouseActionCursor'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: Hide of class CMeter */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_Hide00
|
|
||||||
static int tolua_meter_CMeter_Hide00(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 'Hide'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
self->Hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'Hide'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: Show of class CMeter */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_Show00
|
|
||||||
static int tolua_meter_CMeter_Show00(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 'Show'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
self->Show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'Show'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: IsHidden of class CMeter */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_IsHidden00
|
|
||||||
static int tolua_meter_CMeter_IsHidden00(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 'IsHidden'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
bool tolua_ret = (bool) self->IsHidden();
|
|
||||||
tolua_pushboolean(tolua_S,(bool)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'IsHidden'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: GetTransformationMatrix of class CMeter */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_GetTransformationMatrix00
|
|
||||||
static int tolua_meter_CMeter_GetTransformationMatrix00(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 'GetTransformationMatrix'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
const Gdiplus::Matrix& tolua_ret = (const Gdiplus::Matrix&) self->GetTransformationMatrix();
|
|
||||||
tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const Gdiplus::Matrix");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'GetTransformationMatrix'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: HitTest of class CMeter */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_CMeter_HitTest00
|
|
||||||
static int tolua_meter_CMeter_HitTest00(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_isnumber(tolua_S,3,0,&tolua_err) ||
|
|
||||||
!tolua_isnoobj(tolua_S,4,&tolua_err)
|
|
||||||
)
|
|
||||||
goto tolua_lerror;
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
CMeter* self = (CMeter*) tolua_tousertype(tolua_S,1,0);
|
|
||||||
int x = ((int) tolua_tonumber(tolua_S,2,0));
|
|
||||||
int y = ((int) tolua_tonumber(tolua_S,3,0));
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HitTest'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
bool tolua_ret = (bool) self->HitTest(x,y);
|
|
||||||
tolua_pushboolean(tolua_S,(bool)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'HitTest'.",&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)
|
|
||||||
{
|
|
||||||
#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 'IsMouseOver'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
bool tolua_ret = (bool) self->IsMouseOver();
|
|
||||||
tolua_pushboolean(tolua_S,(bool)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'IsMouseOver'.",&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)
|
|
||||||
{
|
|
||||||
#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 '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
|
|
||||||
|
|
||||||
/* Open function */
|
|
||||||
TOLUA_API int tolua_meter_open (lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
tolua_open(tolua_S);
|
|
||||||
tolua_reg_types(tolua_S);
|
|
||||||
tolua_module(tolua_S,NULL,0);
|
|
||||||
tolua_beginmodule(tolua_S,NULL);
|
|
||||||
tolua_cclass(tolua_S,"CMeter","CMeter","CGroup",NULL);
|
|
||||||
tolua_beginmodule(tolua_S,"CMeter");
|
|
||||||
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,"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,"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);
|
|
||||||
tolua_function(tolua_S,"HasMouseActionCursor",tolua_meter_CMeter_HasMouseActionCursor00);
|
|
||||||
tolua_function(tolua_S,"SetMouseActionCursor",tolua_meter_CMeter_SetMouseActionCursor00);
|
|
||||||
tolua_function(tolua_S,"Hide",tolua_meter_CMeter_Hide00);
|
|
||||||
tolua_function(tolua_S,"Show",tolua_meter_CMeter_Show00);
|
|
||||||
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,"IsMouseOver",tolua_meter_CMeter_IsMouseOver00);
|
|
||||||
tolua_function(tolua_S,"GetName",tolua_meter_CMeter_GetName00);
|
|
||||||
tolua_endmodule(tolua_S);
|
|
||||||
tolua_endmodule(tolua_S);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
|
|
||||||
TOLUA_API int luaopen_meter (lua_State* tolua_S) {
|
|
||||||
return tolua_meter_open(tolua_S);
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
/*
|
|
||||||
** Lua binding: meter
|
|
||||||
** Generated automatically by tolua++-1.0.92 on 02/15/11 18:55:46.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Exported function */
|
|
||||||
TOLUA_API int tolua_meter_open (lua_State* tolua_S);
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
/*
|
|
||||||
** Lua binding: meter_image
|
|
||||||
** Generated automatically by tolua++-1.0.92 on 02/15/11 03:01:12.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Exported function */
|
|
||||||
TOLUA_API int tolua_meter_image_open (lua_State* tolua_S);
|
|
||||||
|
|
@ -1,202 +0,0 @@
|
|||||||
/*
|
|
||||||
** Lua binding: meter_string
|
|
||||||
** Generated automatically by tolua++-1.0.92 on 02/15/11 03:01:13.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "../../StdAfx.h"
|
|
||||||
|
|
||||||
#ifndef __cplusplus
|
|
||||||
#include "stdlib.h"
|
|
||||||
#endif
|
|
||||||
#include "string.h"
|
|
||||||
|
|
||||||
#include "tolua++.h"
|
|
||||||
|
|
||||||
/* Exported function */
|
|
||||||
TOLUA_API int tolua_meter_string_open (lua_State* tolua_S);
|
|
||||||
|
|
||||||
#include "../../MeterString.h"
|
|
||||||
#include "../LuaPush.h"
|
|
||||||
|
|
||||||
/* function to register type */
|
|
||||||
static void tolua_reg_types (lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
tolua_usertype(tolua_S,"CMeterString");
|
|
||||||
tolua_usertype(tolua_S,"WCHAR");
|
|
||||||
tolua_usertype(tolua_S,"CMeter");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* method: GetX of class CMeterString */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_string_CMeterString_GetX00
|
|
||||||
static int tolua_meter_string_CMeterString_GetX00(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_Error tolua_err;
|
|
||||||
if (
|
|
||||||
!tolua_isusertype(tolua_S,1,"CMeterString",0,&tolua_err) ||
|
|
||||||
!tolua_isboolean(tolua_S,2,1,&tolua_err) ||
|
|
||||||
!tolua_isnoobj(tolua_S,3,&tolua_err)
|
|
||||||
)
|
|
||||||
goto tolua_lerror;
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
CMeterString* self = (CMeterString*) tolua_tousertype(tolua_S,1,0);
|
|
||||||
bool abs = ((bool) tolua_toboolean(tolua_S,2,false));
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetX'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
int tolua_ret = (int) self->GetX(abs);
|
|
||||||
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: Update of class CMeterString */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_string_CMeterString_Update00
|
|
||||||
static int tolua_meter_string_CMeterString_Update00(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 'Update'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
bool tolua_ret = (bool) self->Update();
|
|
||||||
tolua_pushboolean(tolua_S,(bool)tolua_ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'Update'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
/* method: SetText of class CMeterString */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_string_CMeterString_SetText00
|
|
||||||
static int tolua_meter_string_CMeterString_SetText00(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_Error tolua_err;
|
|
||||||
if (
|
|
||||||
!tolua_isusertype(tolua_S,1,"CMeterString",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
|
|
||||||
{
|
|
||||||
CMeterString* self = (CMeterString*) tolua_tousertype(tolua_S,1,0);
|
|
||||||
const WCHAR* text = ((const WCHAR*) to_wchar(tolua_S,2,0));
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetText'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
self->SetText(text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'SetText'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
|
|
||||||
/* method: GetRect of class CMeterString */
|
|
||||||
#ifndef TOLUA_DISABLE_tolua_meter_string_CMeterString_GetRect00
|
|
||||||
static int tolua_meter_string_CMeterString_GetRect00(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 'GetRect'", NULL);
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
Gdiplus::RectF rect = self->GetRect();
|
|
||||||
|
|
||||||
lua_newtable(tolua_S);
|
|
||||||
lua_pushstring(tolua_S, "x");
|
|
||||||
lua_pushnumber(tolua_S, rect.X);
|
|
||||||
lua_settable(tolua_S, -3);
|
|
||||||
|
|
||||||
lua_pushstring(tolua_S, "y");
|
|
||||||
lua_pushnumber(tolua_S, rect.Y);
|
|
||||||
lua_settable(tolua_S, -3);
|
|
||||||
|
|
||||||
lua_pushstring(tolua_S, "width");
|
|
||||||
lua_pushnumber(tolua_S, rect.Width);
|
|
||||||
lua_settable(tolua_S, -3);
|
|
||||||
|
|
||||||
lua_pushstring(tolua_S, "height");
|
|
||||||
lua_pushnumber(tolua_S, rect.Height);
|
|
||||||
lua_settable(tolua_S, -3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
#ifndef TOLUA_RELEASE
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'GetRect'.",&tolua_err);
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
|
||||||
|
|
||||||
|
|
||||||
/* Open function */
|
|
||||||
TOLUA_API int tolua_meter_string_open (lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
tolua_open(tolua_S);
|
|
||||||
tolua_reg_types(tolua_S);
|
|
||||||
tolua_module(tolua_S,NULL,0);
|
|
||||||
tolua_beginmodule(tolua_S,NULL);
|
|
||||||
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,"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);
|
|
||||||
tolua_endmodule(tolua_S);
|
|
||||||
tolua_endmodule(tolua_S);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
|
|
||||||
TOLUA_API int luaopen_meter_string (lua_State* tolua_S) {
|
|
||||||
return tolua_meter_string_open(tolua_S);
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
/*
|
|
||||||
** Lua binding: meter_string
|
|
||||||
** Generated automatically by tolua++-1.0.92 on 02/15/11 03:01:13.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Exported function */
|
|
||||||
TOLUA_API int tolua_meter_string_open (lua_State* tolua_S);
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,8 +0,0 @@
|
|||||||
/*
|
|
||||||
** Lua binding: meterwindow
|
|
||||||
** Generated automatically by tolua++-1.0.92 on 02/15/11 18:55:45.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Exported function */
|
|
||||||
TOLUA_API int tolua_meterwindow_open (lua_State* tolua_S);
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,8 +0,0 @@
|
|||||||
/*
|
|
||||||
** Lua binding: rainmeter
|
|
||||||
** Generated automatically by tolua++-1.0.92 on 02/15/11 21:07:15.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Exported function */
|
|
||||||
TOLUA_API int tolua_rainmeter_open (lua_State* tolua_S);
|
|
||||||
|
|
@ -1,124 +0,0 @@
|
|||||||
/*
|
|
||||||
** Lua binding: rainmeter_ext
|
|
||||||
** Generated automatically by tolua++-1.0.92 on 11/22/10 21:20:13.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "../../StdAfx.h"
|
|
||||||
|
|
||||||
#ifndef __cplusplus
|
|
||||||
#include "stdlib.h"
|
|
||||||
#endif
|
|
||||||
#include "string.h"
|
|
||||||
|
|
||||||
#include "tolua++.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"
|
|
||||||
#include "../../MeterHistogram.h"
|
|
||||||
#include "../../MeterImage.h"
|
|
||||||
#include "../../MeterLine.h"
|
|
||||||
#include "../../MeterRotator.h"
|
|
||||||
#include "../../MeterRoundline.h"
|
|
||||||
#include "../../MeterString.h"
|
|
||||||
|
|
||||||
static int AsMeterBar(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
CMeterBar* meter = (CMeterBar*) tolua_tousertype(tolua_S,1,0);
|
|
||||||
tolua_pushusertype(tolua_S,(void*) meter, "CMeterBar");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int AsMeterBitmap(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
CMeterBitmap* meter = (CMeterBitmap*) tolua_tousertype(tolua_S,1,0);
|
|
||||||
tolua_pushusertype(tolua_S,(void*) meter, "CMeterBitmap");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int AsMeterButton(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
CMeterButton* meter = (CMeterButton*) tolua_tousertype(tolua_S,1,0);
|
|
||||||
tolua_pushusertype(tolua_S,(void*) meter, "CMeterButton");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int AsMeterHistogram(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
CMeterHistogram* meter = (CMeterHistogram*) tolua_tousertype(tolua_S,1,0);
|
|
||||||
tolua_pushusertype(tolua_S,(void*) meter, "CMeterHistogram");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int AsMeterImage(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
CMeterImage* meter = (CMeterImage*) tolua_tousertype(tolua_S,1,0);
|
|
||||||
tolua_pushusertype(tolua_S,(void*) meter, "CMeterImage");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int AsMeterLine(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
CMeterLine* meter = (CMeterLine*) tolua_tousertype(tolua_S,1,0);
|
|
||||||
tolua_pushusertype(tolua_S,(void*) meter, "CMeterLine");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int AsMeterRotator(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
CMeterRotator* meter = (CMeterRotator*) tolua_tousertype(tolua_S,1,0);
|
|
||||||
tolua_pushusertype(tolua_S,(void*) meter, "CMeterRotator");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int AsMeterRoundline(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
CMeterRoundLine* meter = (CMeterRoundLine*) tolua_tousertype(tolua_S,1,0);
|
|
||||||
tolua_pushusertype(tolua_S,(void*) meter, "CMeterRoundLine");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int AsMeterString(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
CMeterString* meterString = (CMeterString*) tolua_tousertype(tolua_S,1,0);
|
|
||||||
tolua_pushusertype(tolua_S,(void*) meterString, "CMeterString");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int staticLuaLog(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
const char* str = tolua_tostring(tolua_S,1,0);
|
|
||||||
LuaManager::LuaLog(LOG_NOTICE, str);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* list of functions in the module */
|
|
||||||
static const luaL_reg rainmeter_ext_funcs[] =
|
|
||||||
{
|
|
||||||
{ "LuaLog", staticLuaLog },
|
|
||||||
{ "MeterBar", AsMeterBar },
|
|
||||||
{ "MeterBitmap", AsMeterBitmap },
|
|
||||||
{ "MeterButton", AsMeterButton },
|
|
||||||
{ "MeterHistogram", AsMeterHistogram },
|
|
||||||
{ "MeterImage", AsMeterImage },
|
|
||||||
{ "MeterLine", AsMeterLine },
|
|
||||||
{ "MeterRotator", AsMeterRotator },
|
|
||||||
{ "MeterRoundline", AsMeterRoundline },
|
|
||||||
{ "MeterString", AsMeterString },
|
|
||||||
{ NULL, NULL }
|
|
||||||
};
|
|
||||||
|
|
||||||
TOLUA_API int luaopen_rainmeter_ext (lua_State* L)
|
|
||||||
{
|
|
||||||
lua_register(L, "print", staticLuaLog);
|
|
||||||
luaL_register(L,"TO", rainmeter_ext_funcs);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
/*
|
|
||||||
** Lua binding: rainmeter_ext
|
|
||||||
** Generated automatically by tolua++-1.0.92 on 11/22/10 21:20:13.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Exported function */
|
|
||||||
TOLUA_API int luaopen_rainmeter_ext (lua_State* tolua_S);
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user