2011-08-28 15:17:58 +02:00
|
|
|
/*
|
2013-01-08 19:21:54 +01:00
|
|
|
* Copyright (c) 2010-2013 OTClient <https://github.com/edubart/otclient>
|
2011-08-28 15:17:58 +02:00
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
* THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
2012-07-14 03:10:24 +02:00
|
|
|
#include <framework/core/application.h>
|
|
|
|
#include <framework/luaengine/luainterface.h>
|
2011-08-15 16:06:15 +02:00
|
|
|
#include <framework/core/eventdispatcher.h>
|
2011-12-01 23:25:32 +01:00
|
|
|
#include <framework/core/configmanager.h>
|
2011-11-03 20:07:07 +01:00
|
|
|
#include <framework/otml/otml.h>
|
2012-02-06 02:44:47 +01:00
|
|
|
#include <framework/core/modulemanager.h>
|
|
|
|
#include <framework/core/module.h>
|
2012-06-04 14:38:15 +02:00
|
|
|
#include <framework/util/crypt.h>
|
2012-06-19 10:46:49 +02:00
|
|
|
#include <framework/core/resourcemanager.h>
|
2012-07-14 23:30:00 +02:00
|
|
|
#include <framework/graphics/texturemanager.h>
|
2012-08-07 03:11:42 +02:00
|
|
|
#include <framework/stdext/net.h>
|
2013-01-09 20:29:58 +01:00
|
|
|
#include <framework/platform/platform.h>
|
2011-08-14 04:09:11 +02:00
|
|
|
|
2013-01-16 19:46:42 +01:00
|
|
|
#ifdef FW_SOUND
|
|
|
|
#include <framework/sound/soundmanager.h>
|
|
|
|
#include <framework/sound/soundsource.h>
|
|
|
|
#include <framework/sound/soundchannel.h>
|
|
|
|
#include <framework/sound/combinedsoundsource.h>
|
|
|
|
#include <framework/sound/streamsoundsource.h>
|
|
|
|
#endif
|
|
|
|
|
2012-07-18 01:49:21 +02:00
|
|
|
#ifdef FW_GRAPHICS
|
|
|
|
#include <framework/graphics/graphics.h>
|
|
|
|
#include <framework/platform/platformwindow.h>
|
|
|
|
#include <framework/graphics/particlemanager.h>
|
|
|
|
#include <framework/graphics/fontmanager.h>
|
|
|
|
#include <framework/ui/ui.h>
|
2012-08-10 21:26:39 +02:00
|
|
|
#include <framework/input/mouse.h>
|
2012-07-18 01:49:21 +02:00
|
|
|
#endif
|
|
|
|
|
2012-07-30 21:40:03 +02:00
|
|
|
#ifdef FW_NET
|
|
|
|
#include <framework/net/server.h>
|
2012-08-22 10:51:31 +02:00
|
|
|
#include <framework/net/protocol.h>
|
|
|
|
#include <framework/net/protocolhttp.h>
|
2012-07-30 21:40:03 +02:00
|
|
|
#endif
|
|
|
|
|
2012-08-02 13:36:21 +02:00
|
|
|
#ifdef FW_SQL
|
|
|
|
#include <framework/sql/mysql.h>
|
|
|
|
#endif
|
|
|
|
|
2011-12-03 22:41:37 +01:00
|
|
|
void Application::registerLuaFunctions()
|
2011-08-14 04:09:11 +02:00
|
|
|
{
|
2012-01-06 09:48:59 +01:00
|
|
|
// conversion globals
|
2012-05-28 15:06:26 +02:00
|
|
|
g_lua.bindGlobalFunction("torect", [](const std::string& v) { return stdext::from_string<Rect>(v); });
|
|
|
|
g_lua.bindGlobalFunction("topoint", [](const std::string& v) { return stdext::from_string<Point>(v); });
|
|
|
|
g_lua.bindGlobalFunction("tocolor", [](const std::string& v) { return stdext::from_string<Color>(v); });
|
|
|
|
g_lua.bindGlobalFunction("tosize", [](const std::string& v) { return stdext::from_string<Size>(v); });
|
|
|
|
g_lua.bindGlobalFunction("recttostring", [](const Rect& v) { return stdext::to_string(v); });
|
|
|
|
g_lua.bindGlobalFunction("pointtostring", [](const Point& v) { return stdext::to_string(v); });
|
|
|
|
g_lua.bindGlobalFunction("colortostring", [](const Color& v) { return stdext::to_string(v); });
|
|
|
|
g_lua.bindGlobalFunction("sizetostring", [](const Size& v) { return stdext::to_string(v); });
|
2012-06-05 21:16:57 +02:00
|
|
|
g_lua.bindGlobalFunction("iptostring", [](int v) { return stdext::ip_to_string(v); });
|
2012-08-07 19:05:55 +02:00
|
|
|
g_lua.bindGlobalFunction("stringtoip", [](const std::string& v) { return stdext::string_to_ip(v); });
|
2012-08-08 04:18:36 +02:00
|
|
|
g_lua.bindGlobalFunction("listSubnetAddresses", [](uint32 a, uint8 b) { return stdext::listSubnetAddresses(a, b); });
|
2012-09-14 23:38:21 +02:00
|
|
|
g_lua.bindGlobalFunction("ucwords", [](std::string s) { return stdext::ucwords(s); });
|
2012-01-06 04:29:26 +01:00
|
|
|
|
2013-01-09 20:29:58 +01:00
|
|
|
// Platform
|
|
|
|
g_lua.registerSingletonClass("g_platform");
|
|
|
|
g_lua.bindSingletonFunction("g_platform", "spawnProcess", &Platform::spawnProcess, &g_platform);
|
|
|
|
g_lua.bindSingletonFunction("g_platform", "getProcessId", &Platform::getProcessId, &g_platform);
|
2013-02-22 20:53:28 +01:00
|
|
|
g_lua.bindSingletonFunction("g_platform", "isProcessRunning", &Platform::isProcessRunning, &g_platform);
|
2013-01-09 20:29:58 +01:00
|
|
|
g_lua.bindSingletonFunction("g_platform", "copyFile", &Platform::copyFile, &g_platform);
|
2013-02-22 20:53:28 +01:00
|
|
|
g_lua.bindSingletonFunction("g_platform", "fileExists", &Platform::fileExists, &g_platform);
|
2013-02-24 21:26:19 +01:00
|
|
|
g_lua.bindSingletonFunction("g_platform", "removeFile", &Platform::removeFile, &g_platform);
|
2013-02-22 20:53:28 +01:00
|
|
|
g_lua.bindSingletonFunction("g_platform", "killProcess", &Platform::killProcess, &g_platform);
|
2013-01-09 20:29:58 +01:00
|
|
|
g_lua.bindSingletonFunction("g_platform", "getTempPath", &Platform::getTempPath, &g_platform);
|
|
|
|
g_lua.bindSingletonFunction("g_platform", "openUrl", &Platform::openUrl, &g_platform);
|
|
|
|
g_lua.bindSingletonFunction("g_platform", "getCPUName", &Platform::getCPUName, &g_platform);
|
|
|
|
g_lua.bindSingletonFunction("g_platform", "getTotalSystemMemory", &Platform::getTotalSystemMemory, &g_platform);
|
|
|
|
g_lua.bindSingletonFunction("g_platform", "getOSName", &Platform::getOSName, &g_platform);
|
|
|
|
|
2012-07-14 03:10:24 +02:00
|
|
|
// Application
|
|
|
|
g_lua.registerSingletonClass("g_app");
|
|
|
|
g_lua.bindSingletonFunction("g_app", "setName", &Application::setName, static_cast<Application*>(&g_app));
|
|
|
|
g_lua.bindSingletonFunction("g_app", "setCompactName", &Application::setCompactName, static_cast<Application*>(&g_app));
|
|
|
|
g_lua.bindSingletonFunction("g_app", "setVersion", &Application::setVersion, static_cast<Application*>(&g_app));
|
|
|
|
g_lua.bindSingletonFunction("g_app", "isRunning", &Application::isRunning, static_cast<Application*>(&g_app));
|
|
|
|
g_lua.bindSingletonFunction("g_app", "isStopping", &Application::isStopping, static_cast<Application*>(&g_app));
|
|
|
|
g_lua.bindSingletonFunction("g_app", "getName", &Application::getName, static_cast<Application*>(&g_app));
|
|
|
|
g_lua.bindSingletonFunction("g_app", "getCompactName", &Application::getCompactName, static_cast<Application*>(&g_app));
|
|
|
|
g_lua.bindSingletonFunction("g_app", "getVersion", &Application::getVersion, static_cast<Application*>(&g_app));
|
|
|
|
g_lua.bindSingletonFunction("g_app", "getBuildCompiler", &Application::getBuildCompiler, static_cast<Application*>(&g_app));
|
|
|
|
g_lua.bindSingletonFunction("g_app", "getBuildDate", &Application::getBuildDate, static_cast<Application*>(&g_app));
|
|
|
|
g_lua.bindSingletonFunction("g_app", "getBuildRevision", &Application::getBuildRevision, static_cast<Application*>(&g_app));
|
|
|
|
g_lua.bindSingletonFunction("g_app", "getBuildCommit", &Application::getBuildCommit, static_cast<Application*>(&g_app));
|
|
|
|
g_lua.bindSingletonFunction("g_app", "getBuildType", &Application::getBuildType, static_cast<Application*>(&g_app));
|
2012-07-14 19:17:03 +02:00
|
|
|
g_lua.bindSingletonFunction("g_app", "getBuildArch", &Application::getBuildArch, static_cast<Application*>(&g_app));
|
2012-07-18 01:49:21 +02:00
|
|
|
g_lua.bindSingletonFunction("g_app", "getOs", &Application::getOs, static_cast<Application*>(&g_app));
|
2013-01-09 20:29:58 +01:00
|
|
|
g_lua.bindSingletonFunction("g_app", "getStartupOptions", &Application::getStartupOptions, static_cast<Application*>(&g_app));
|
2012-07-14 03:10:24 +02:00
|
|
|
g_lua.bindSingletonFunction("g_app", "exit", &Application::exit, static_cast<Application*>(&g_app));
|
|
|
|
|
|
|
|
// Crypt
|
2012-06-17 17:21:46 +02:00
|
|
|
g_lua.registerSingletonClass("g_crypt");
|
2012-08-23 03:50:03 +02:00
|
|
|
g_lua.bindSingletonFunction("g_crypt", "genUUID", &Crypt::genUUID, &g_crypt);
|
2013-01-26 17:38:48 +01:00
|
|
|
g_lua.bindSingletonFunction("g_crypt", "setMachineUUID", &Crypt::setMachineUUID, &g_crypt);
|
|
|
|
g_lua.bindSingletonFunction("g_crypt", "getMachineUUID", &Crypt::getMachineUUID, &g_crypt);
|
2012-08-04 15:54:35 +02:00
|
|
|
g_lua.bindSingletonFunction("g_crypt", "encrypt", &Crypt::encrypt, &g_crypt);
|
|
|
|
g_lua.bindSingletonFunction("g_crypt", "decrypt", &Crypt::decrypt, &g_crypt);
|
|
|
|
g_lua.bindSingletonFunction("g_crypt", "sha1Encode", &Crypt::sha1Encode, &g_crypt);
|
|
|
|
g_lua.bindSingletonFunction("g_crypt", "md5Encode", &Crypt::md5Encode, &g_crypt);
|
2013-01-28 23:52:03 +01:00
|
|
|
g_lua.bindSingletonFunction("g_crypt", "rsaGenerateKey", &Crypt::rsaGenerateKey, &g_crypt);
|
2012-08-04 15:54:35 +02:00
|
|
|
g_lua.bindSingletonFunction("g_crypt", "rsaSetPublicKey", &Crypt::rsaSetPublicKey, &g_crypt);
|
|
|
|
g_lua.bindSingletonFunction("g_crypt", "rsaSetPrivateKey", &Crypt::rsaSetPrivateKey, &g_crypt);
|
|
|
|
g_lua.bindSingletonFunction("g_crypt", "rsaCheckKey", &Crypt::rsaCheckKey, &g_crypt);
|
2013-01-28 23:52:03 +01:00
|
|
|
g_lua.bindSingletonFunction("g_crypt", "rsaGetSize", &Crypt::rsaGetSize, &g_crypt);
|
2012-06-04 14:38:15 +02:00
|
|
|
|
2012-07-14 03:10:24 +02:00
|
|
|
// Clock
|
2012-06-17 17:21:46 +02:00
|
|
|
g_lua.registerSingletonClass("g_clock");
|
|
|
|
g_lua.bindSingletonFunction("g_clock", "micros", &Clock::micros, &g_clock);
|
|
|
|
g_lua.bindSingletonFunction("g_clock", "millis", &Clock::millis, &g_clock);
|
|
|
|
g_lua.bindSingletonFunction("g_clock", "seconds", &Clock::seconds, &g_clock);
|
2012-06-08 22:58:24 +02:00
|
|
|
|
2012-07-14 03:10:24 +02:00
|
|
|
// ConfigManager
|
|
|
|
g_lua.registerSingletonClass("g_configs");
|
|
|
|
g_lua.bindSingletonFunction("g_configs", "load", &ConfigManager::load, &g_configs);
|
|
|
|
g_lua.bindSingletonFunction("g_configs", "save", &ConfigManager::save, &g_configs);
|
|
|
|
g_lua.bindSingletonFunction("g_configs", "set", &ConfigManager::set, &g_configs);
|
|
|
|
g_lua.bindSingletonFunction("g_configs", "setList", &ConfigManager::setList, &g_configs);
|
|
|
|
g_lua.bindSingletonFunction("g_configs", "get", &ConfigManager::get, &g_configs);
|
|
|
|
g_lua.bindSingletonFunction("g_configs", "getList", &ConfigManager::getList, &g_configs);
|
|
|
|
g_lua.bindSingletonFunction("g_configs", "exists", &ConfigManager::exists, &g_configs);
|
|
|
|
g_lua.bindSingletonFunction("g_configs", "remove", &ConfigManager::remove, &g_configs);
|
|
|
|
g_lua.bindSingletonFunction("g_configs", "setNode", &ConfigManager::setNode, &g_configs);
|
|
|
|
g_lua.bindSingletonFunction("g_configs", "mergeNode", &ConfigManager::mergeNode, &g_configs);
|
|
|
|
g_lua.bindSingletonFunction("g_configs", "getNode", &ConfigManager::getNode, &g_configs);
|
|
|
|
|
|
|
|
// Logger
|
|
|
|
g_lua.registerSingletonClass("g_logger");
|
|
|
|
g_lua.bindSingletonFunction("g_logger", "log", &Logger::log, &g_logger);
|
|
|
|
g_lua.bindSingletonFunction("g_logger", "fireOldMessages", &Logger::fireOldMessages, &g_logger);
|
|
|
|
g_lua.bindSingletonFunction("g_logger", "setLogFile", &Logger::setLogFile, &g_logger);
|
|
|
|
g_lua.bindSingletonFunction("g_logger", "setOnLog", &Logger::setOnLog, &g_logger);
|
|
|
|
g_lua.bindSingletonFunction("g_logger", "debug", &Logger::debug, &g_logger);
|
|
|
|
g_lua.bindSingletonFunction("g_logger", "info", &Logger::info, &g_logger);
|
|
|
|
g_lua.bindSingletonFunction("g_logger", "warning", &Logger::warning, &g_logger);
|
|
|
|
g_lua.bindSingletonFunction("g_logger", "error", &Logger::error, &g_logger);
|
|
|
|
g_lua.bindSingletonFunction("g_logger", "fatal", &Logger::fatal, &g_logger);
|
|
|
|
|
|
|
|
// ModuleManager
|
|
|
|
g_lua.registerSingletonClass("g_modules");
|
|
|
|
g_lua.bindSingletonFunction("g_modules", "discoverModules", &ModuleManager::discoverModules, &g_modules);
|
|
|
|
g_lua.bindSingletonFunction("g_modules", "autoLoadModules", &ModuleManager::autoLoadModules, &g_modules);
|
|
|
|
g_lua.bindSingletonFunction("g_modules", "discoverModule", &ModuleManager::discoverModule, &g_modules);
|
|
|
|
g_lua.bindSingletonFunction("g_modules", "ensureModuleLoaded", &ModuleManager::ensureModuleLoaded, &g_modules);
|
|
|
|
g_lua.bindSingletonFunction("g_modules", "unloadModules", &ModuleManager::unloadModules, &g_modules);
|
|
|
|
g_lua.bindSingletonFunction("g_modules", "reloadModules", &ModuleManager::reloadModules, &g_modules);
|
|
|
|
g_lua.bindSingletonFunction("g_modules", "getModule", &ModuleManager::getModule, &g_modules);
|
|
|
|
g_lua.bindSingletonFunction("g_modules", "getModules", &ModuleManager::getModules, &g_modules);
|
|
|
|
|
|
|
|
// EventDispatcher
|
|
|
|
g_lua.registerSingletonClass("g_dispatcher");
|
|
|
|
g_lua.bindSingletonFunction("g_dispatcher", "addEvent", &EventDispatcher::addEvent, &g_dispatcher);
|
|
|
|
g_lua.bindSingletonFunction("g_dispatcher", "scheduleEvent", &EventDispatcher::scheduleEvent, &g_dispatcher);
|
|
|
|
g_lua.bindSingletonFunction("g_dispatcher", "cycleEvent", &EventDispatcher::cycleEvent, &g_dispatcher);
|
|
|
|
|
|
|
|
// ResourceManager
|
|
|
|
g_lua.registerSingletonClass("g_resources");
|
2012-07-16 21:35:14 +02:00
|
|
|
g_lua.bindSingletonFunction("g_resources", "addSearchPath", &ResourceManager::addSearchPath, &g_resources);
|
|
|
|
g_lua.bindSingletonFunction("g_resources", "setupUserWriteDir", &ResourceManager::setupUserWriteDir, &g_resources);
|
|
|
|
g_lua.bindSingletonFunction("g_resources", "setWriteDir", &ResourceManager::setWriteDir, &g_resources);
|
|
|
|
g_lua.bindSingletonFunction("g_resources", "searchAndAddPackages", &ResourceManager::searchAndAddPackages, &g_resources);
|
|
|
|
g_lua.bindSingletonFunction("g_resources", "removeSearchPath", &ResourceManager::removeSearchPath, &g_resources);
|
2012-07-14 03:10:24 +02:00
|
|
|
g_lua.bindSingletonFunction("g_resources", "fileExists", &ResourceManager::fileExists, &g_resources);
|
2012-09-14 23:38:21 +02:00
|
|
|
g_lua.bindSingletonFunction("g_resources", "directoryExists", &ResourceManager::directoryExists, &g_resources);
|
2012-07-14 03:10:24 +02:00
|
|
|
g_lua.bindSingletonFunction("g_resources", "getRealDir", &ResourceManager::getRealDir, &g_resources);
|
|
|
|
g_lua.bindSingletonFunction("g_resources", "getWorkDir", &ResourceManager::getWorkDir, &g_resources);
|
2012-07-16 21:35:14 +02:00
|
|
|
g_lua.bindSingletonFunction("g_resources", "getSearchPaths", &ResourceManager::getSearchPaths, &g_resources);
|
2012-08-05 15:56:15 +02:00
|
|
|
g_lua.bindSingletonFunction("g_resources", "listDirectoryFiles", &ResourceManager::listDirectoryFiles, &g_resources);
|
2013-01-09 20:29:58 +01:00
|
|
|
g_lua.bindSingletonFunction("g_resources", "readFileContents", &ResourceManager::readFileContents, &g_resources);
|
2013-01-28 02:23:53 +01:00
|
|
|
g_lua.bindSingletonFunction("g_resources", "guessFilePath", &ResourceManager::guessFilePath, &g_resources);
|
|
|
|
g_lua.bindSingletonFunction("g_resources", "isFileType", &ResourceManager::isFileType, &g_resources);
|
2012-07-14 03:10:24 +02:00
|
|
|
|
|
|
|
// Module
|
|
|
|
g_lua.registerClass<Module>();
|
|
|
|
g_lua.bindClassMemberFunction<Module>("load", &Module::load);
|
|
|
|
g_lua.bindClassMemberFunction<Module>("unload", &Module::unload);
|
|
|
|
g_lua.bindClassMemberFunction<Module>("reload", &Module::reload);
|
|
|
|
g_lua.bindClassMemberFunction<Module>("canReload", &Module::canReload);
|
|
|
|
g_lua.bindClassMemberFunction<Module>("canUnload", &Module::canUnload);
|
|
|
|
g_lua.bindClassMemberFunction<Module>("isLoaded", &Module::isLoaded);
|
|
|
|
g_lua.bindClassMemberFunction<Module>("isReloadble", &Module::isReloadable);
|
2012-07-24 02:22:38 +02:00
|
|
|
g_lua.bindClassMemberFunction<Module>("isSandboxed", &Module::isSandboxed);
|
2012-07-14 03:10:24 +02:00
|
|
|
g_lua.bindClassMemberFunction<Module>("getDescription", &Module::getDescription);
|
|
|
|
g_lua.bindClassMemberFunction<Module>("getName", &Module::getName);
|
|
|
|
g_lua.bindClassMemberFunction<Module>("getAuthor", &Module::getAuthor);
|
|
|
|
g_lua.bindClassMemberFunction<Module>("getWebsite", &Module::getWebsite);
|
|
|
|
g_lua.bindClassMemberFunction<Module>("getVersion", &Module::getVersion);
|
2012-07-24 02:22:38 +02:00
|
|
|
g_lua.bindClassMemberFunction<Module>("getSandbox", &Module::getSandbox);
|
2012-07-14 03:10:24 +02:00
|
|
|
g_lua.bindClassMemberFunction<Module>("isAutoLoad", &Module::isAutoLoad);
|
|
|
|
g_lua.bindClassMemberFunction<Module>("getAutoLoadPriority", &Module::getAutoLoadPriority);
|
|
|
|
|
2012-01-19 05:12:53 +01:00
|
|
|
// Event
|
|
|
|
g_lua.registerClass<Event>();
|
2012-02-06 20:19:47 +01:00
|
|
|
g_lua.bindClassMemberFunction<Event>("cancel", &Event::cancel);
|
|
|
|
g_lua.bindClassMemberFunction<Event>("execute", &Event::execute);
|
2012-01-19 05:12:53 +01:00
|
|
|
g_lua.bindClassMemberFunction<Event>("isCanceled", &Event::isCanceled);
|
|
|
|
g_lua.bindClassMemberFunction<Event>("isExecuted", &Event::isExecuted);
|
|
|
|
|
|
|
|
// ScheduledEvent
|
|
|
|
g_lua.registerClass<ScheduledEvent, Event>();
|
2012-06-06 22:14:53 +02:00
|
|
|
g_lua.bindClassMemberFunction<ScheduledEvent>("nextCycle", &ScheduledEvent::nextCycle);
|
2012-02-06 20:19:47 +01:00
|
|
|
g_lua.bindClassMemberFunction<ScheduledEvent>("ticks", &ScheduledEvent::ticks);
|
2013-01-17 15:23:01 +01:00
|
|
|
g_lua.bindClassMemberFunction<ScheduledEvent>("remainingTicks", &ScheduledEvent::remainingTicks);
|
2012-06-06 22:14:53 +02:00
|
|
|
g_lua.bindClassMemberFunction<ScheduledEvent>("delay", &ScheduledEvent::delay);
|
|
|
|
g_lua.bindClassMemberFunction<ScheduledEvent>("cyclesExecuted", &ScheduledEvent::cyclesExecuted);
|
|
|
|
g_lua.bindClassMemberFunction<ScheduledEvent>("maxCycles", &ScheduledEvent::maxCycles);
|
2012-01-19 05:12:53 +01:00
|
|
|
|
2012-07-14 03:10:24 +02:00
|
|
|
#ifdef FW_GRAPHICS
|
|
|
|
// GraphicalApplication
|
|
|
|
g_lua.bindSingletonFunction("g_app", "setForegroundPaneMaxFps", &GraphicalApplication::setForegroundPaneMaxFps, &g_app);
|
|
|
|
g_lua.bindSingletonFunction("g_app", "setBackgroundPaneMaxFps", &GraphicalApplication::setBackgroundPaneMaxFps, &g_app);
|
|
|
|
g_lua.bindSingletonFunction("g_app", "isOnInputEvent", &GraphicalApplication::isOnInputEvent, &g_app);
|
|
|
|
g_lua.bindSingletonFunction("g_app", "getForegroundPaneFps", &GraphicalApplication::getForegroundPaneFps, &g_app);
|
|
|
|
g_lua.bindSingletonFunction("g_app", "getBackgroundPaneFps", &GraphicalApplication::getBackgroundPaneFps, &g_app);
|
|
|
|
g_lua.bindSingletonFunction("g_app", "getForegroundPaneMaxFps", &GraphicalApplication::getForegroundPaneMaxFps, &g_app);
|
|
|
|
g_lua.bindSingletonFunction("g_app", "getBackgroundPaneMaxFps", &GraphicalApplication::getBackgroundPaneMaxFps, &g_app);
|
|
|
|
|
|
|
|
// PlatformWindow
|
|
|
|
g_lua.registerSingletonClass("g_window");
|
|
|
|
g_lua.bindSingletonFunction("g_window", "move", &PlatformWindow::move, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "resize", &PlatformWindow::resize, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "show", &PlatformWindow::show, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "hide", &PlatformWindow::hide, &g_window);
|
2013-01-09 20:29:58 +01:00
|
|
|
g_lua.bindSingletonFunction("g_window", "poll", &PlatformWindow::poll, &g_window);
|
2012-07-14 03:10:24 +02:00
|
|
|
g_lua.bindSingletonFunction("g_window", "maximize", &PlatformWindow::maximize, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "restoreMouseCursor", &PlatformWindow::restoreMouseCursor, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "showMouse", &PlatformWindow::showMouse, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "hideMouse", &PlatformWindow::hideMouse, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "setTitle", &PlatformWindow::setTitle, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "setMouseCursor", &PlatformWindow::setMouseCursor, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "setMinimumSize", &PlatformWindow::setMinimumSize, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "setFullscreen", &PlatformWindow::setFullscreen, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "setVerticalSync", &PlatformWindow::setVerticalSync, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "setIcon", &PlatformWindow::setIcon, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "setClipboardText", &PlatformWindow::setClipboardText, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "getDisplaySize", &PlatformWindow::getDisplaySize, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "getClipboardText", &PlatformWindow::getClipboardText, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "getPlatformType", &PlatformWindow::getPlatformType, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "getDisplayWidth", &PlatformWindow::getDisplayWidth, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "getDisplayHeight", &PlatformWindow::getDisplayHeight, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "getUnmaximizedSize", &PlatformWindow::getUnmaximizedSize, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "getSize", &PlatformWindow::getSize, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "getWidth", &PlatformWindow::getWidth, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "getHeight", &PlatformWindow::getHeight, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "getUnmaximizedPos", &PlatformWindow::getUnmaximizedPos, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "getPosition", &PlatformWindow::getPosition, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "getX", &PlatformWindow::getX, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "getY", &PlatformWindow::getY, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "getMousePosition", &PlatformWindow::getMousePosition, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "getKeyboardModifiers", &PlatformWindow::getKeyboardModifiers, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "isKeyPressed", &PlatformWindow::isKeyPressed, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "isMouseButtonPressed", &PlatformWindow::isMouseButtonPressed, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "isVisible", &PlatformWindow::isVisible, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "isFullscreen", &PlatformWindow::isFullscreen, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "isMaximized", &PlatformWindow::isMaximized, &g_window);
|
|
|
|
g_lua.bindSingletonFunction("g_window", "hasFocus", &PlatformWindow::hasFocus, &g_window);
|
|
|
|
|
2012-08-10 21:26:39 +02:00
|
|
|
// Input
|
|
|
|
g_lua.registerSingletonClass("g_mouse");
|
2013-01-25 14:17:51 +01:00
|
|
|
g_lua.bindSingletonFunction("g_mouse", "loadCursors", &Mouse::loadCursors, &g_mouse);
|
|
|
|
g_lua.bindSingletonFunction("g_mouse", "addCursor", &Mouse::addCursor, &g_mouse);
|
2013-01-25 14:47:51 +01:00
|
|
|
g_lua.bindSingletonFunction("g_mouse", "pushCursor", &Mouse::pushCursor, &g_mouse);
|
|
|
|
g_lua.bindSingletonFunction("g_mouse", "popCursor", &Mouse::popCursor, &g_mouse);
|
2012-08-10 21:26:39 +02:00
|
|
|
g_lua.bindSingletonFunction("g_mouse", "isCursorChanged", &Mouse::isCursorChanged, &g_mouse);
|
|
|
|
g_lua.bindSingletonFunction("g_mouse", "isPressed", &Mouse::isPressed, &g_mouse);
|
|
|
|
|
2012-07-14 03:10:24 +02:00
|
|
|
// Graphics
|
|
|
|
g_lua.registerSingletonClass("g_graphics");
|
|
|
|
g_lua.bindSingletonFunction("g_graphics", "isPainterEngineAvailable", &Graphics::isPainterEngineAvailable, &g_graphics);
|
|
|
|
g_lua.bindSingletonFunction("g_graphics", "selectPainterEngine", &Graphics::selectPainterEngine, &g_graphics);
|
|
|
|
g_lua.bindSingletonFunction("g_graphics", "canCacheBackbuffer", &Graphics::canCacheBackbuffer, &g_graphics);
|
|
|
|
g_lua.bindSingletonFunction("g_graphics", "canUseShaders", &Graphics::canUseShaders, &g_graphics);
|
2013-01-09 20:29:58 +01:00
|
|
|
g_lua.bindSingletonFunction("g_graphics", "shouldUseShaders", &Graphics::shouldUseShaders, &g_graphics);
|
|
|
|
g_lua.bindSingletonFunction("g_graphics", "setShouldUseShaders", &Graphics::setShouldUseShaders, &g_graphics);
|
2012-07-14 03:10:24 +02:00
|
|
|
g_lua.bindSingletonFunction("g_graphics", "getPainterEngine", &Graphics::getPainterEngine, &g_graphics);
|
|
|
|
g_lua.bindSingletonFunction("g_graphics", "getViewportSize", &Graphics::getViewportSize, &g_graphics);
|
|
|
|
g_lua.bindSingletonFunction("g_graphics", "getVendor", &Graphics::getVendor, &g_graphics);
|
|
|
|
g_lua.bindSingletonFunction("g_graphics", "getRenderer", &Graphics::getRenderer, &g_graphics);
|
|
|
|
g_lua.bindSingletonFunction("g_graphics", "getVersion", &Graphics::getVersion, &g_graphics);
|
|
|
|
|
2012-07-14 23:30:00 +02:00
|
|
|
// Textures
|
|
|
|
g_lua.registerSingletonClass("g_textures");
|
2013-01-24 21:36:04 +01:00
|
|
|
g_lua.bindSingletonFunction("g_textures", "preload", &TextureManager::preload, &g_textures);
|
2012-07-14 23:30:00 +02:00
|
|
|
g_lua.bindSingletonFunction("g_textures", "clearTexturesCache", &TextureManager::clearTexturesCache, &g_textures);
|
|
|
|
|
2012-07-14 03:10:24 +02:00
|
|
|
// UI
|
|
|
|
g_lua.registerSingletonClass("g_ui");
|
|
|
|
g_lua.bindSingletonFunction("g_ui", "clearStyles", &UIManager::clearStyles, &g_ui);
|
|
|
|
g_lua.bindSingletonFunction("g_ui", "importStyle", &UIManager::importStyle, &g_ui);
|
|
|
|
g_lua.bindSingletonFunction("g_ui", "getStyle", &UIManager::getStyle, &g_ui);
|
|
|
|
g_lua.bindSingletonFunction("g_ui", "getStyleClass", &UIManager::getStyleClass, &g_ui);
|
|
|
|
g_lua.bindSingletonFunction("g_ui", "loadUI", &UIManager::loadUI, &g_ui);
|
|
|
|
g_lua.bindSingletonFunction("g_ui", "displayUI", &UIManager::displayUI, &g_ui);
|
|
|
|
g_lua.bindSingletonFunction("g_ui", "createWidget", &UIManager::createWidget, &g_ui);
|
|
|
|
g_lua.bindSingletonFunction("g_ui", "createWidgetFromOTML", &UIManager::createWidgetFromOTML, &g_ui);
|
|
|
|
g_lua.bindSingletonFunction("g_ui", "getRootWidget", &UIManager::getRootWidget, &g_ui);
|
|
|
|
g_lua.bindSingletonFunction("g_ui", "getDraggingWidget", &UIManager::getDraggingWidget, &g_ui);
|
|
|
|
g_lua.bindSingletonFunction("g_ui", "getPressedWidget", &UIManager::getPressedWidget, &g_ui);
|
|
|
|
g_lua.bindSingletonFunction("g_ui", "setDebugBoxesDrawing", &UIManager::setDebugBoxesDrawing, &g_ui);
|
|
|
|
g_lua.bindSingletonFunction("g_ui", "isDrawingDebugBoxes", &UIManager::setDebugBoxesDrawing, &g_ui);
|
2013-01-30 21:23:26 +01:00
|
|
|
g_lua.bindSingletonFunction("g_ui", "isMouseGrabbed", &UIManager::isMouseGrabbed, &g_ui);
|
|
|
|
g_lua.bindSingletonFunction("g_ui", "isKeyboardGrabbed", &UIManager::isKeyboardGrabbed, &g_ui);
|
2012-07-14 03:10:24 +02:00
|
|
|
|
|
|
|
// FontManager
|
|
|
|
g_lua.registerSingletonClass("g_fonts");
|
|
|
|
g_lua.bindSingletonFunction("g_fonts", "clearFonts", &FontManager::clearFonts, &g_fonts);
|
|
|
|
g_lua.bindSingletonFunction("g_fonts", "importFont", &FontManager::importFont, &g_fonts);
|
|
|
|
g_lua.bindSingletonFunction("g_fonts", "fontExists", &FontManager::fontExists, &g_fonts);
|
|
|
|
g_lua.bindSingletonFunction("g_fonts", "setDefaultFont", &FontManager::setDefaultFont, &g_fonts);
|
|
|
|
|
|
|
|
// ParticleManager
|
|
|
|
g_lua.registerSingletonClass("g_particles");
|
|
|
|
g_lua.bindSingletonFunction("g_particles", "importParticle", &ParticleManager::importParticle, &g_particles);
|
|
|
|
g_lua.bindSingletonFunction("g_particles", "getEffectsTypes", &ParticleManager::getEffectsTypes, &g_particles);
|
|
|
|
|
2011-08-14 04:09:11 +02:00
|
|
|
// UIWidget
|
2012-05-03 01:20:25 +02:00
|
|
|
g_lua.registerClass<UIWidget>();
|
|
|
|
g_lua.bindClassStaticFunction<UIWidget>("create", []{ return UIWidgetPtr(new UIWidget); });
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("addChild", &UIWidget::addChild);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("insertChild", &UIWidget::insertChild);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("removeChild", &UIWidget::removeChild);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("focusChild", &UIWidget::focusChild);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("focusNextChild", &UIWidget::focusNextChild);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("focusPreviousChild", &UIWidget::focusPreviousChild);
|
2012-02-05 23:42:35 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("lowerChild", &UIWidget::lowerChild);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("raiseChild", &UIWidget::raiseChild);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("moveChildToIndex", &UIWidget::moveChildToIndex);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("lockChild", &UIWidget::lockChild);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("unlockChild", &UIWidget::unlockChild);
|
2012-04-30 18:40:12 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("mergeStyle", &UIWidget::mergeStyle);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("applyStyle", &UIWidget::applyStyle);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("addAnchor", &UIWidget::addAnchor);
|
2012-04-06 00:46:53 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("removeAnchor", &UIWidget::removeAnchor);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("fill", &UIWidget::fill);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("centerIn", &UIWidget::centerIn);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("breakAnchors", &UIWidget::breakAnchors);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("updateParentLayout", &UIWidget::updateParentLayout);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("updateLayout", &UIWidget::updateLayout);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("lock", &UIWidget::lock);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("unlock", &UIWidget::unlock);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("focus", &UIWidget::focus);
|
2012-02-05 23:42:35 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("lower", &UIWidget::lower);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("raise", &UIWidget::raise);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("grabMouse", &UIWidget::grabMouse);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("ungrabMouse", &UIWidget::ungrabMouse);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("grabKeyboard", &UIWidget::grabKeyboard);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("ungrabKeyboard", &UIWidget::ungrabKeyboard);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("bindRectToParent", &UIWidget::bindRectToParent);
|
2011-12-07 01:31:55 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("destroy", &UIWidget::destroy);
|
2012-02-06 02:44:47 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("destroyChildren", &UIWidget::destroyChildren);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setId", &UIWidget::setId);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setParent", &UIWidget::setParent);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setLayout", &UIWidget::setLayout);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setRect", &UIWidget::setRect);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setStyle", &UIWidget::setStyle);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setStyleFromNode", &UIWidget::setStyleFromNode);
|
2011-12-07 01:31:55 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setEnabled", &UIWidget::setEnabled);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setVisible", &UIWidget::setVisible);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setOn", &UIWidget::setOn);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setChecked", &UIWidget::setChecked);
|
2011-12-07 01:31:55 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setFocusable", &UIWidget::setFocusable);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setPhantom", &UIWidget::setPhantom);
|
2012-08-07 01:43:14 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setDraggable", &UIWidget::setDraggable);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setFixedSize", &UIWidget::setFixedSize);
|
2012-03-25 16:10:15 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setClipping", &UIWidget::setClipping);
|
2011-12-07 01:31:55 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setLastFocusReason", &UIWidget::setLastFocusReason);
|
2013-01-26 20:06:25 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setAutoFocusPolicy", &UIWidget::setAutoFocusPolicy);
|
2012-02-06 13:53:28 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setAutoRepeatDelay", &UIWidget::setAutoRepeatDelay);
|
2012-03-25 16:10:15 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setVirtualOffset", &UIWidget::setVirtualOffset);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isVisible", &UIWidget::isVisible);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isChildLocked", &UIWidget::isChildLocked);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("hasChild", &UIWidget::hasChild);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getChildIndex", &UIWidget::getChildIndex);
|
2012-03-28 02:33:35 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getMarginRect", &UIWidget::getMarginRect);
|
2012-06-02 02:38:26 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getPaddingRect", &UIWidget::getPaddingRect);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getChildrenRect", &UIWidget::getChildrenRect);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getAnchoredLayout", &UIWidget::getAnchoredLayout);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getRootParent", &UIWidget::getRootParent);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getChildAfter", &UIWidget::getChildAfter);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getChildBefore", &UIWidget::getChildBefore);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getChildById", &UIWidget::getChildById);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getChildByPos", &UIWidget::getChildByPos);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getChildByIndex", &UIWidget::getChildByIndex);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("recursiveGetChildById", &UIWidget::recursiveGetChildById);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("recursiveGetChildByPos", &UIWidget::recursiveGetChildByPos);
|
2012-07-26 08:10:28 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("recursiveGetChildren", &UIWidget::recursiveGetChildren);
|
2012-02-07 01:41:53 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("recursiveGetChildrenByPos", &UIWidget::recursiveGetChildrenByPos);
|
2012-06-11 16:10:03 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("recursiveGetChildrenByMarginPos", &UIWidget::recursiveGetChildrenByMarginPos);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("backwardsGetWidgetById", &UIWidget::backwardsGetWidgetById);
|
2011-12-07 01:31:55 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("resize", &UIWidget::resize);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("move", &UIWidget::move);
|
2013-01-19 17:44:07 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("rotate", &UIWidget::rotate);
|
2011-08-20 22:30:41 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("hide", &UIWidget::hide);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("show", &UIWidget::show);
|
2011-12-07 01:31:55 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("disable", &UIWidget::disable);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("enable", &UIWidget::enable);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isActive", &UIWidget::isActive);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isEnabled", &UIWidget::isEnabled);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isDisabled", &UIWidget::isDisabled);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isFocused", &UIWidget::isFocused);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isHovered", &UIWidget::isHovered);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isPressed", &UIWidget::isPressed);
|
2012-01-02 23:49:34 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isFirst", &UIWidget::isFirst);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isMiddle", &UIWidget::isMiddle);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isLast", &UIWidget::isLast);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isAlternate", &UIWidget::isAlternate);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isChecked", &UIWidget::isChecked);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isOn", &UIWidget::isOn);
|
2012-02-07 20:21:53 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isDragging", &UIWidget::isDragging);
|
2011-12-07 01:31:55 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isHidden", &UIWidget::isHidden);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isExplicitlyEnabled", &UIWidget::isExplicitlyEnabled);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isExplicitlyVisible", &UIWidget::isExplicitlyVisible);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isFocusable", &UIWidget::isFocusable);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isPhantom", &UIWidget::isPhantom);
|
2012-08-07 01:43:14 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isDraggable", &UIWidget::isDraggable);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isFixedSize", &UIWidget::isFixedSize);
|
2012-03-25 16:10:15 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isClipping", &UIWidget::isClipping);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isDestroyed", &UIWidget::isDestroyed);
|
2011-12-07 01:31:55 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("hasChildren", &UIWidget::hasChildren);
|
2012-06-11 16:10:03 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("containsMarginPoint", &UIWidget::containsMarginPoint);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("containsPaddingPoint", &UIWidget::containsPaddingPoint);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("containsPoint", &UIWidget::containsPoint);
|
2011-12-07 01:31:55 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getId", &UIWidget::getId);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getParent", &UIWidget::getParent);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getFocusedChild", &UIWidget::getFocusedChild);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getChildren", &UIWidget::getChildren);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getFirstChild", &UIWidget::getFirstChild);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getLastChild", &UIWidget::getLastChild);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getLayout", &UIWidget::getLayout);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getStyle", &UIWidget::getStyle);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getChildCount", &UIWidget::getChildCount);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getLastFocusReason", &UIWidget::getLastFocusReason);
|
2013-01-26 20:06:25 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getAutoFocusPolicy", &UIWidget::getAutoFocusPolicy);
|
2012-02-06 13:53:28 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getAutoRepeatDelay", &UIWidget::getAutoRepeatDelay);
|
2012-03-25 16:10:15 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getVirtualOffset", &UIWidget::getVirtualOffset);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getStyleName", &UIWidget::getStyleName);
|
2012-03-26 20:33:00 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getLastClickPosition", &UIWidget::getLastClickPosition);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setX", &UIWidget::setX);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setY", &UIWidget::setY);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setWidth", &UIWidget::setWidth);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setHeight", &UIWidget::setHeight);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setSize", &UIWidget::setSize);
|
2012-01-30 01:00:12 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setPosition", &UIWidget::setPosition);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setColor", &UIWidget::setColor);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBackgroundColor", &UIWidget::setBackgroundColor);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBackgroundOffsetX", &UIWidget::setBackgroundOffsetX);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBackgroundOffsetY", &UIWidget::setBackgroundOffsetY);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBackgroundOffset", &UIWidget::setBackgroundOffset);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBackgroundWidth", &UIWidget::setBackgroundWidth);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBackgroundHeight", &UIWidget::setBackgroundHeight);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBackgroundSize", &UIWidget::setBackgroundSize);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBackgroundRect", &UIWidget::setBackgroundRect);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setIcon", &UIWidget::setIcon);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setIconColor", &UIWidget::setIconColor);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setIconOffsetX", &UIWidget::setIconOffsetX);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setIconOffsetY", &UIWidget::setIconOffsetY);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setIconOffset", &UIWidget::setIconOffset);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setIconWidth", &UIWidget::setIconWidth);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setIconHeight", &UIWidget::setIconHeight);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setIconSize", &UIWidget::setIconSize);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setIconRect", &UIWidget::setIconRect);
|
2012-07-12 21:16:23 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setIconClip", &UIWidget::setIconClip);
|
2013-02-06 20:35:59 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setIconAlign", &UIWidget::setIconAlign);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBorderWidth", &UIWidget::setBorderWidth);
|
2012-02-07 01:41:53 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBorderWidthTop", &UIWidget::setBorderWidthTop);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBorderWidthRight", &UIWidget::setBorderWidthRight);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBorderWidthBottom", &UIWidget::setBorderWidthBottom);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBorderWidthLeft", &UIWidget::setBorderWidthLeft);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBorderColor", &UIWidget::setBorderColor);
|
2012-02-07 01:41:53 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBorderColorTop", &UIWidget::setBorderColorTop);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBorderColorRight", &UIWidget::setBorderColorRight);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBorderColorBottom", &UIWidget::setBorderColorBottom);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setBorderColorLeft", &UIWidget::setBorderColorLeft);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setMargin", &UIWidget::setMargin);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setMarginHorizontal", &UIWidget::setMarginHorizontal);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setMarginVertical", &UIWidget::setMarginVertical);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setMarginTop", &UIWidget::setMarginTop);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setMarginRight", &UIWidget::setMarginRight);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setMarginBottom", &UIWidget::setMarginBottom);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setMarginLeft", &UIWidget::setMarginLeft);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setPadding", &UIWidget::setPadding);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setPaddingHorizontal", &UIWidget::setPaddingHorizontal);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setPaddingVertical", &UIWidget::setPaddingVertical);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setPaddingTop", &UIWidget::setPaddingTop);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setPaddingRight", &UIWidget::setPaddingRight);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setPaddingBottom", &UIWidget::setPaddingBottom);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setPaddingLeft", &UIWidget::setPaddingLeft);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setOpacity", &UIWidget::setOpacity);
|
2013-01-19 17:44:07 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setRotation", &UIWidget::setRotation);
|
2011-12-07 01:31:55 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getX", &UIWidget::getX);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getY", &UIWidget::getY);
|
2012-01-30 01:00:12 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getPosition", &UIWidget::getPosition);
|
2011-12-07 01:31:55 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getWidth", &UIWidget::getWidth);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getHeight", &UIWidget::getHeight);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getSize", &UIWidget::getSize);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getRect", &UIWidget::getRect);
|
2012-01-09 19:45:28 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getColor", &UIWidget::getColor);
|
2011-12-07 01:31:55 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getBackgroundColor", &UIWidget::getBackgroundColor);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getBackgroundOffsetX", &UIWidget::getBackgroundOffsetX);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getBackgroundOffsetY", &UIWidget::getBackgroundOffsetY);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getBackgroundOffset", &UIWidget::getBackgroundOffset);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getBackgroundWidth", &UIWidget::getBackgroundWidth);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getBackgroundHeight", &UIWidget::getBackgroundHeight);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getBackgroundSize", &UIWidget::getBackgroundSize);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getBackgroundRect", &UIWidget::getBackgroundRect);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getIconColor", &UIWidget::getIconColor);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getIconOffsetX", &UIWidget::getIconOffsetX);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getIconOffsetY", &UIWidget::getIconOffsetY);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getIconOffset", &UIWidget::getIconOffset);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getIconWidth", &UIWidget::getIconWidth);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getIconHeight", &UIWidget::getIconHeight);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getIconSize", &UIWidget::getIconSize);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getIconRect", &UIWidget::getIconRect);
|
2012-07-12 21:16:23 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getIconClip", &UIWidget::getIconClip);
|
2013-02-06 20:35:59 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getIconAlign", &UIWidget::getIconAlign);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getBorderTopColor", &UIWidget::getBorderTopColor);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getBorderRightColor", &UIWidget::getBorderRightColor);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getBorderBottomColor", &UIWidget::getBorderBottomColor);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getBorderLeftColor", &UIWidget::getBorderLeftColor);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getBorderTopWidth", &UIWidget::getBorderTopWidth);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getBorderRightWidth", &UIWidget::getBorderRightWidth);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getBorderBottomWidth", &UIWidget::getBorderBottomWidth);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getBorderLeftWidth", &UIWidget::getBorderLeftWidth);
|
2011-12-07 01:31:55 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getMarginTop", &UIWidget::getMarginTop);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getMarginRight", &UIWidget::getMarginRight);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getMarginBottom", &UIWidget::getMarginBottom);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getMarginLeft", &UIWidget::getMarginLeft);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getPaddingTop", &UIWidget::getPaddingTop);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getPaddingRight", &UIWidget::getPaddingRight);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getPaddingBottom", &UIWidget::getPaddingBottom);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getPaddingLeft", &UIWidget::getPaddingLeft);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getOpacity", &UIWidget::getOpacity);
|
2013-01-19 17:44:07 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getRotation", &UIWidget::getRotation);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageSource", &UIWidget::setImageSource);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageClip", &UIWidget::setImageClip);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageOffsetX", &UIWidget::setImageOffsetX);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageOffsetY", &UIWidget::setImageOffsetY);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageOffset", &UIWidget::setImageOffset);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageWidth", &UIWidget::setImageWidth);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageHeight", &UIWidget::setImageHeight);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageSize", &UIWidget::setImageSize);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageRect", &UIWidget::setImageRect);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageColor", &UIWidget::setImageColor);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageFixedRatio", &UIWidget::setImageFixedRatio);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageRepeated", &UIWidget::setImageRepeated);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageSmooth", &UIWidget::setImageSmooth);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageBorderTop", &UIWidget::setImageBorderTop);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageBorderRight", &UIWidget::setImageBorderRight);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageBorderBottom", &UIWidget::setImageBorderBottom);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageBorderLeft", &UIWidget::setImageBorderLeft);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setImageBorder", &UIWidget::setImageBorder);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getImageClip", &UIWidget::getImageClip);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getImageOffsetX", &UIWidget::getImageOffsetX);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getImageOffsetY", &UIWidget::getImageOffsetY);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getImageOffset", &UIWidget::getImageOffset);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getImageWidth", &UIWidget::getImageWidth);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getImageHeight", &UIWidget::getImageHeight);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getImageSize", &UIWidget::getImageSize);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getImageRect", &UIWidget::getImageRect);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getImageColor", &UIWidget::getImageColor);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isImageFixedRatio", &UIWidget::isImageFixedRatio);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("isImageSmooth", &UIWidget::isImageSmooth);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getImageBorderTop", &UIWidget::getImageBorderTop);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getImageBorderRight", &UIWidget::getImageBorderRight);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getImageBorderBottom", &UIWidget::getImageBorderBottom);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getImageBorderLeft", &UIWidget::getImageBorderLeft);
|
2013-01-31 17:20:04 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getImageTextureWidth", &UIWidget::getImageTextureWidth);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getImageTextureHeight", &UIWidget::getImageTextureHeight);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("resizeToText", &UIWidget::resizeToText);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("clearText", &UIWidget::clearText);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setText", &UIWidget::setText);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setTextAlign", &UIWidget::setTextAlign);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setTextOffset", &UIWidget::setTextOffset);
|
2012-03-26 00:14:00 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setTextWrap", &UIWidget::setTextWrap);
|
2012-03-26 20:33:00 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setTextAutoResize", &UIWidget::setTextAutoResize);
|
2013-02-09 22:57:37 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setTextVerticalAutoResize", &UIWidget::setTextVerticalAutoResize);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setTextHorizontalAutoResize", &UIWidget::setTextHorizontalAutoResize);
|
2012-01-10 23:13:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("setFont", &UIWidget::setFont);
|
2012-01-04 11:26:58 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getText", &UIWidget::getText);
|
2012-03-26 20:33:00 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getDrawText", &UIWidget::getDrawText);
|
2012-01-04 11:26:58 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getTextAlign", &UIWidget::getTextAlign);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getTextOffset", &UIWidget::getTextOffset);
|
2012-03-26 00:14:00 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getTextWrap", &UIWidget::getTextWrap);
|
2012-01-04 11:26:58 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getFont", &UIWidget::getFont);
|
|
|
|
g_lua.bindClassMemberFunction<UIWidget>("getTextSize", &UIWidget::getTextSize);
|
2011-08-16 14:47:30 +02:00
|
|
|
|
2012-01-02 21:46:40 +01:00
|
|
|
// UILayout
|
|
|
|
g_lua.registerClass<UILayout>();
|
|
|
|
g_lua.bindClassMemberFunction<UILayout>("update", &UILayout::update);
|
2012-01-15 14:57:42 +01:00
|
|
|
g_lua.bindClassMemberFunction<UILayout>("updateLater", &UILayout::updateLater);
|
|
|
|
g_lua.bindClassMemberFunction<UILayout>("applyStyle", &UILayout::applyStyle);
|
2012-01-02 21:46:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UILayout>("addWidget", &UILayout::addWidget);
|
|
|
|
g_lua.bindClassMemberFunction<UILayout>("removeWidget", &UILayout::removeWidget);
|
2012-01-15 14:57:42 +01:00
|
|
|
g_lua.bindClassMemberFunction<UILayout>("disableUpdates", &UILayout::disableUpdates);
|
|
|
|
g_lua.bindClassMemberFunction<UILayout>("enableUpdates", &UILayout::enableUpdates);
|
|
|
|
g_lua.bindClassMemberFunction<UILayout>("setParent", &UILayout::setParent);
|
2012-01-02 21:46:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UILayout>("getParentWidget", &UILayout::getParentWidget);
|
2012-01-15 14:57:42 +01:00
|
|
|
g_lua.bindClassMemberFunction<UILayout>("isUpdateDisabled", &UILayout::isUpdateDisabled);
|
|
|
|
g_lua.bindClassMemberFunction<UILayout>("isUpdating", &UILayout::isUpdating);
|
2012-07-29 05:34:40 +02:00
|
|
|
g_lua.bindClassMemberFunction<UILayout>("isUIAnchorLayout", &UILayout::isUIAnchorLayout);
|
|
|
|
g_lua.bindClassMemberFunction<UILayout>("isUIBoxLayout", &UILayout::isUIBoxLayout);
|
|
|
|
g_lua.bindClassMemberFunction<UILayout>("isUIHorizontalLayout", &UILayout::isUIHorizontalLayout);
|
|
|
|
g_lua.bindClassMemberFunction<UILayout>("isUIVerticalLayout", &UILayout::isUIVerticalLayout);
|
|
|
|
g_lua.bindClassMemberFunction<UILayout>("isUIGridLayout", &UILayout::isUIGridLayout);
|
2012-01-15 14:57:42 +01:00
|
|
|
|
|
|
|
// UIBoxLayout
|
2012-05-09 14:24:35 +02:00
|
|
|
g_lua.registerClass<UIBoxLayout, UILayout>();
|
2012-01-15 14:57:42 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIBoxLayout>("setSpacing", &UIBoxLayout::setSpacing);
|
|
|
|
g_lua.bindClassMemberFunction<UIBoxLayout>("setFitChildren", &UIBoxLayout::setFitChildren);
|
2012-01-02 21:46:40 +01:00
|
|
|
|
|
|
|
// UIVerticalLayout
|
2012-01-15 22:19:52 +01:00
|
|
|
g_lua.registerClass<UIVerticalLayout, UIBoxLayout>();
|
2012-01-06 09:48:59 +01:00
|
|
|
g_lua.bindClassStaticFunction<UIVerticalLayout>("create", [](UIWidgetPtr parent){ return UIVerticalLayoutPtr(new UIVerticalLayout(parent)); } );
|
2012-01-15 14:57:42 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIVerticalLayout>("setAlignBottom", &UIVerticalLayout::setAlignBottom);
|
2012-08-09 05:51:13 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIVerticalLayout>("isAlignBottom", &UIVerticalLayout::isAlignBottom);
|
2012-01-15 14:57:42 +01:00
|
|
|
|
|
|
|
// UIHorizontalLayout
|
2012-01-15 22:19:52 +01:00
|
|
|
g_lua.registerClass<UIHorizontalLayout, UIBoxLayout>();
|
2012-01-15 14:57:42 +01:00
|
|
|
g_lua.bindClassStaticFunction<UIHorizontalLayout>("create", [](UIWidgetPtr parent){ return UIHorizontalLayoutPtr(new UIHorizontalLayout(parent)); } );
|
|
|
|
g_lua.bindClassMemberFunction<UIHorizontalLayout>("setAlignRight", &UIHorizontalLayout::setAlignRight);
|
2012-01-02 21:46:40 +01:00
|
|
|
|
2012-01-12 20:20:18 +01:00
|
|
|
// UIGridLayout
|
|
|
|
g_lua.registerClass<UIGridLayout, UILayout>();
|
|
|
|
g_lua.bindClassStaticFunction<UIGridLayout>("create", [](UIWidgetPtr parent){ return UIGridLayoutPtr(new UIGridLayout(parent)); });
|
|
|
|
g_lua.bindClassMemberFunction<UIGridLayout>("setCellSize", &UIGridLayout::setCellSize);
|
|
|
|
g_lua.bindClassMemberFunction<UIGridLayout>("setCellWidth", &UIGridLayout::setCellWidth);
|
|
|
|
g_lua.bindClassMemberFunction<UIGridLayout>("setCellHeight", &UIGridLayout::setCellHeight);
|
|
|
|
g_lua.bindClassMemberFunction<UIGridLayout>("setCellSpacing", &UIGridLayout::setCellSpacing);
|
2012-07-19 23:22:52 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIGridLayout>("setFlow", &UIGridLayout::setFlow);
|
2012-01-12 20:20:18 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIGridLayout>("setNumColumns", &UIGridLayout::setNumColumns);
|
|
|
|
g_lua.bindClassMemberFunction<UIGridLayout>("setNumLines", &UIGridLayout::setNumLines);
|
2012-08-18 07:04:01 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIGridLayout>("getNumColumns", &UIGridLayout::getNumColumns);
|
|
|
|
g_lua.bindClassMemberFunction<UIGridLayout>("getNumLines", &UIGridLayout::getNumLines);
|
|
|
|
g_lua.bindClassMemberFunction<UIGridLayout>("getCellSize", &UIGridLayout::getCellSize);
|
2013-01-09 20:29:58 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIGridLayout>("getCellSpacing", &UIGridLayout::getCellSpacing);
|
2012-07-29 05:34:40 +02:00
|
|
|
g_lua.bindClassMemberFunction<UIGridLayout>("isUIGridLayout", &UIGridLayout::isUIGridLayout);
|
2012-01-12 20:20:18 +01:00
|
|
|
|
2012-01-02 21:46:40 +01:00
|
|
|
// UIAnchorLayout
|
|
|
|
g_lua.registerClass<UIAnchorLayout, UILayout>();
|
2012-01-06 09:48:59 +01:00
|
|
|
g_lua.bindClassStaticFunction<UIAnchorLayout>("create", [](UIWidgetPtr parent){ return UIAnchorLayoutPtr(new UIAnchorLayout(parent)); } );
|
2012-01-02 21:46:40 +01:00
|
|
|
g_lua.bindClassMemberFunction<UIAnchorLayout>("removeAnchors", &UIAnchorLayout::removeAnchors);
|
|
|
|
g_lua.bindClassMemberFunction<UIAnchorLayout>("centerIn", &UIAnchorLayout::centerIn);
|
|
|
|
g_lua.bindClassMemberFunction<UIAnchorLayout>("fill", &UIAnchorLayout::fill);
|
|
|
|
|
2012-03-31 15:43:01 +02:00
|
|
|
// UITextEdit
|
|
|
|
g_lua.registerClass<UITextEdit, UIWidget>();
|
|
|
|
g_lua.bindClassStaticFunction<UITextEdit>("create", []{ return UITextEditPtr(new UITextEdit); } );
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("setCursorPos", &UITextEdit::setCursorPos);
|
2013-01-20 14:38:02 +01:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("setSelection", &UITextEdit::setSelection);
|
2013-01-16 17:20:17 +01:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("setCursorVisible", &UITextEdit::setCursorVisible);
|
2013-01-25 12:44:15 +01:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("setChangeCursorImage", &UITextEdit::setChangeCursorImage);
|
2012-03-31 15:43:01 +02:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("setTextHidden", &UITextEdit::setTextHidden);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("setValidCharacters", &UITextEdit::setValidCharacters);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("setShiftNavigation", &UITextEdit::setShiftNavigation);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("setMultiline", &UITextEdit::setMultiline);
|
2013-01-16 17:20:17 +01:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("setEditable", &UITextEdit::setEditable);
|
2013-01-20 14:38:02 +01:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("setSelectable", &UITextEdit::setSelectable);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("setSelectionColor", &UITextEdit::setSelectionColor);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("setSelectionBackgroundColor", &UITextEdit::setSelectionBackgroundColor);
|
2012-05-01 02:20:27 +02:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("setMaxLength", &UITextEdit::setMaxLength);
|
2013-01-16 17:20:17 +01:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("setTextVirtualOffset", &UITextEdit::setTextVirtualOffset);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("getTextVirtualOffset", &UITextEdit::getTextVirtualOffset);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("getTextVirtualSize", &UITextEdit::getTextVirtualSize);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("getTextTotalSize", &UITextEdit::getTextTotalSize);
|
2013-01-20 14:38:02 +01:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("moveCursorHorizontally", &UITextEdit::moveCursorHorizontally);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("moveCursorVertically", &UITextEdit::moveCursorVertically);
|
2012-03-31 15:43:01 +02:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("appendText", &UITextEdit::appendText);
|
2013-01-16 17:20:17 +01:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("wrapText", &UITextEdit::wrapText);
|
2012-03-31 15:43:01 +02:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("removeCharacter", &UITextEdit::removeCharacter);
|
2013-01-20 14:38:02 +01:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("blinkCursor", &UITextEdit::blinkCursor);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("del", &UITextEdit::del);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("paste", &UITextEdit::paste);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("copy", &UITextEdit::copy);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("cut", &UITextEdit::cut);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("selectAll", &UITextEdit::selectAll);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("clearSelection", &UITextEdit::clearSelection);
|
2012-03-31 15:43:01 +02:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("getDisplayedText", &UITextEdit::getDisplayedText);
|
2013-01-20 14:38:02 +01:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("getSelection", &UITextEdit::getSelection);
|
2012-03-31 15:43:01 +02:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("getTextPos", &UITextEdit::getTextPos);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("getCursorPos", &UITextEdit::getCursorPos);
|
2012-05-01 02:20:27 +02:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("getMaxLength", &UITextEdit::getMaxLength);
|
2013-01-20 14:38:02 +01:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("getSelectionStart", &UITextEdit::getSelectionStart);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("getSelectionEnd", &UITextEdit::getSelectionEnd);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("getSelectionColor", &UITextEdit::getSelectionColor);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("getSelectionBackgroundColor", &UITextEdit::getSelectionBackgroundColor);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("hasSelection", &UITextEdit::hasSelection);
|
2013-01-16 17:20:17 +01:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("isEditable", &UITextEdit::isEditable);
|
2013-01-20 14:38:02 +01:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("isSelectable", &UITextEdit::isSelectable);
|
2013-01-16 17:20:17 +01:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("isCursorVisible", &UITextEdit::isCursorVisible);
|
2013-01-25 12:44:15 +01:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("isChangingCursorImage", &UITextEdit::isChangingCursorImage);
|
2012-03-31 15:43:01 +02:00
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("isTextHidden", &UITextEdit::isTextHidden);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("isShiftNavigation", &UITextEdit::isShiftNavigation);
|
|
|
|
g_lua.bindClassMemberFunction<UITextEdit>("isMultiline", &UITextEdit::isMultiline);
|
2011-08-14 04:09:11 +02:00
|
|
|
|
2012-07-14 03:10:24 +02:00
|
|
|
g_lua.registerClass<ShaderProgram>();
|
|
|
|
g_lua.registerClass<PainterShaderProgram>();
|
|
|
|
g_lua.bindClassMemberFunction<PainterShaderProgram>("addMultiTexture", &PainterShaderProgram::addMultiTexture);
|
|
|
|
|
|
|
|
// ParticleEffect
|
|
|
|
g_lua.registerClass<ParticleEffectType>();
|
|
|
|
g_lua.bindClassStaticFunction<ParticleEffectType>("create", []{ return ParticleEffectTypePtr(new ParticleEffectType); });
|
|
|
|
g_lua.bindClassMemberFunction<ParticleEffectType>("getName", &ParticleEffectType::getName);
|
|
|
|
g_lua.bindClassMemberFunction<ParticleEffectType>("getDescription", &ParticleEffectType::getDescription);
|
|
|
|
|
|
|
|
// UIParticles
|
|
|
|
g_lua.registerClass<UIParticles, UIWidget>();
|
|
|
|
g_lua.bindClassStaticFunction<UIParticles>("create", []{ return UIParticlesPtr(new UIParticles); } );
|
|
|
|
g_lua.bindClassMemberFunction<UIParticles>("addEffect", &UIParticles::addEffect);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef FW_NET
|
2012-07-30 21:40:03 +02:00
|
|
|
// Server
|
|
|
|
g_lua.registerClass<Server>();
|
|
|
|
g_lua.bindClassStaticFunction<Server>("create", &Server::create);
|
2012-08-04 15:54:35 +02:00
|
|
|
g_lua.bindClassMemberFunction<Server>("close", &Server::close);
|
|
|
|
g_lua.bindClassMemberFunction<Server>("isOpen", &Server::isOpen);
|
2012-07-30 21:40:03 +02:00
|
|
|
g_lua.bindClassMemberFunction<Server>("acceptNext", &Server::acceptNext);
|
|
|
|
|
2012-07-30 22:12:38 +02:00
|
|
|
// Connection
|
|
|
|
g_lua.registerClass<Connection>();
|
2012-08-12 06:54:45 +02:00
|
|
|
g_lua.bindClassMemberFunction<Connection>("getIp", &Connection::getIp);
|
2012-07-30 22:12:38 +02:00
|
|
|
|
2012-02-05 23:42:35 +01:00
|
|
|
// Protocol
|
|
|
|
g_lua.registerClass<Protocol>();
|
2012-06-05 21:16:57 +02:00
|
|
|
g_lua.bindClassStaticFunction<Protocol>("create", []{ return ProtocolPtr(new Protocol); });
|
|
|
|
g_lua.bindClassMemberFunction<Protocol>("connect", &Protocol::connect);
|
2012-05-14 23:36:54 +02:00
|
|
|
g_lua.bindClassMemberFunction<Protocol>("disconnect", &Protocol::disconnect);
|
|
|
|
g_lua.bindClassMemberFunction<Protocol>("isConnected", &Protocol::isConnected);
|
|
|
|
g_lua.bindClassMemberFunction<Protocol>("isConnecting", &Protocol::isConnecting);
|
2012-07-30 21:40:03 +02:00
|
|
|
g_lua.bindClassMemberFunction<Protocol>("getConnection", &Protocol::getConnection);
|
|
|
|
g_lua.bindClassMemberFunction<Protocol>("setConnection", &Protocol::setConnection);
|
2012-07-20 07:45:11 +02:00
|
|
|
g_lua.bindClassMemberFunction<Protocol>("send", &Protocol::send);
|
2012-06-05 21:16:57 +02:00
|
|
|
g_lua.bindClassMemberFunction<Protocol>("recv", &Protocol::recv);
|
2012-08-02 02:24:54 +02:00
|
|
|
g_lua.bindClassMemberFunction<Protocol>("setXteaKey", &Protocol::setXteaKey);
|
2012-06-05 21:16:57 +02:00
|
|
|
g_lua.bindClassMemberFunction<Protocol>("getXteaKey", &Protocol::getXteaKey);
|
|
|
|
g_lua.bindClassMemberFunction<Protocol>("generateXteaKey", &Protocol::generateXteaKey);
|
|
|
|
g_lua.bindClassMemberFunction<Protocol>("enableXteaEncryption", &Protocol::enableXteaEncryption);
|
|
|
|
g_lua.bindClassMemberFunction<Protocol>("enableChecksum", &Protocol::enableChecksum);
|
2012-02-05 23:42:35 +01:00
|
|
|
|
2012-08-22 10:51:31 +02:00
|
|
|
// ProtocolHttp
|
|
|
|
g_lua.registerClass<ProtocolHttp>();
|
|
|
|
g_lua.bindClassStaticFunction<ProtocolHttp>("create", []{ return ProtocolHttpPtr(new ProtocolHttp); });
|
|
|
|
g_lua.bindClassMemberFunction<ProtocolHttp>("connect", &ProtocolHttp::connect);
|
|
|
|
g_lua.bindClassMemberFunction<ProtocolHttp>("disconnect", &ProtocolHttp::disconnect);
|
|
|
|
g_lua.bindClassMemberFunction<ProtocolHttp>("send", &ProtocolHttp::send);
|
|
|
|
g_lua.bindClassMemberFunction<ProtocolHttp>("recv", &ProtocolHttp::recv);
|
|
|
|
|
2012-05-14 23:36:54 +02:00
|
|
|
// InputMessage
|
|
|
|
g_lua.registerClass<InputMessage>();
|
|
|
|
g_lua.bindClassStaticFunction<InputMessage>("create", []{ return InputMessagePtr(new InputMessage); });
|
2012-05-15 01:13:48 +02:00
|
|
|
g_lua.bindClassMemberFunction<InputMessage>("setBuffer", &InputMessage::setBuffer);
|
2012-05-14 23:36:54 +02:00
|
|
|
g_lua.bindClassMemberFunction<InputMessage>("skipBytes", &InputMessage::skipBytes);
|
|
|
|
g_lua.bindClassMemberFunction<InputMessage>("getU8", &InputMessage::getU8);
|
|
|
|
g_lua.bindClassMemberFunction<InputMessage>("getU16", &InputMessage::getU16);
|
|
|
|
g_lua.bindClassMemberFunction<InputMessage>("getU32", &InputMessage::getU32);
|
|
|
|
g_lua.bindClassMemberFunction<InputMessage>("getU64", &InputMessage::getU64);
|
|
|
|
g_lua.bindClassMemberFunction<InputMessage>("getString", &InputMessage::getString);
|
2012-05-15 02:04:04 +02:00
|
|
|
g_lua.bindClassMemberFunction<InputMessage>("peekU8", &InputMessage::peekU8);
|
|
|
|
g_lua.bindClassMemberFunction<InputMessage>("peekU16", &InputMessage::peekU16);
|
|
|
|
g_lua.bindClassMemberFunction<InputMessage>("peekU32", &InputMessage::peekU32);
|
|
|
|
g_lua.bindClassMemberFunction<InputMessage>("peekU64", &InputMessage::peekU64);
|
2012-07-18 01:49:21 +02:00
|
|
|
g_lua.bindClassMemberFunction<InputMessage>("decryptRsa", &InputMessage::decryptRsa);
|
2012-05-14 23:36:54 +02:00
|
|
|
g_lua.bindClassMemberFunction<InputMessage>("getReadSize", &InputMessage::getReadSize);
|
|
|
|
g_lua.bindClassMemberFunction<InputMessage>("getUnreadSize", &InputMessage::getUnreadSize);
|
2012-05-15 02:04:04 +02:00
|
|
|
g_lua.bindClassMemberFunction<InputMessage>("getMessageSize", &InputMessage::getMessageSize);
|
2012-05-14 23:36:54 +02:00
|
|
|
g_lua.bindClassMemberFunction<InputMessage>("eof", &InputMessage::eof);
|
|
|
|
|
2012-01-13 03:07:14 +01:00
|
|
|
// OutputMessage
|
|
|
|
g_lua.registerClass<OutputMessage>();
|
2012-05-14 23:36:54 +02:00
|
|
|
g_lua.bindClassStaticFunction<OutputMessage>("create", []{ return OutputMessagePtr(new OutputMessage); });
|
2012-05-15 01:13:48 +02:00
|
|
|
g_lua.bindClassMemberFunction<OutputMessage>("getBuffer", &OutputMessage::getBuffer);
|
2012-01-13 03:07:14 +01:00
|
|
|
g_lua.bindClassMemberFunction<OutputMessage>("reset", &OutputMessage::reset);
|
|
|
|
g_lua.bindClassMemberFunction<OutputMessage>("addU8", &OutputMessage::addU8);
|
|
|
|
g_lua.bindClassMemberFunction<OutputMessage>("addU16", &OutputMessage::addU16);
|
|
|
|
g_lua.bindClassMemberFunction<OutputMessage>("addU32", &OutputMessage::addU32);
|
|
|
|
g_lua.bindClassMemberFunction<OutputMessage>("addU64", &OutputMessage::addU64);
|
2012-05-14 23:36:54 +02:00
|
|
|
g_lua.bindClassMemberFunction<OutputMessage>("addString", &OutputMessage::addString);
|
|
|
|
g_lua.bindClassMemberFunction<OutputMessage>("addPaddingBytes", &OutputMessage::addPaddingBytes);
|
2012-07-18 01:49:21 +02:00
|
|
|
g_lua.bindClassMemberFunction<OutputMessage>("encryptRsa", &OutputMessage::encryptRsa);
|
2012-05-15 02:04:04 +02:00
|
|
|
g_lua.bindClassMemberFunction<OutputMessage>("getMessageSize", &OutputMessage::getMessageSize);
|
2012-08-30 07:59:10 +02:00
|
|
|
g_lua.bindClassMemberFunction<OutputMessage>("setMessageSize", &OutputMessage::setMessageSize);
|
|
|
|
g_lua.bindClassMemberFunction<OutputMessage>("getWritePos", &OutputMessage::getWritePos);
|
|
|
|
g_lua.bindClassMemberFunction<OutputMessage>("setWritePos", &OutputMessage::setWritePos);
|
2012-07-14 03:10:24 +02:00
|
|
|
#endif
|
2011-08-14 04:09:11 +02:00
|
|
|
|
2012-07-14 03:10:24 +02:00
|
|
|
#ifdef FW_SOUND
|
2012-04-14 16:19:58 +02:00
|
|
|
// SoundManager
|
2012-06-17 17:21:46 +02:00
|
|
|
g_lua.registerSingletonClass("g_sounds");
|
|
|
|
g_lua.bindSingletonFunction("g_sounds", "preload", &SoundManager::preload, &g_sounds);
|
|
|
|
g_lua.bindSingletonFunction("g_sounds", "play", &SoundManager::play, &g_sounds);
|
2013-01-16 19:46:42 +01:00
|
|
|
g_lua.bindSingletonFunction("g_sounds", "getChannel", &SoundManager::getChannel, &g_sounds);
|
|
|
|
g_lua.bindSingletonFunction("g_sounds", "stopAll", &SoundManager::stopAll, &g_sounds);
|
|
|
|
g_lua.bindSingletonFunction("g_sounds", "enableAudio", &SoundManager::enableAudio, &g_sounds);
|
|
|
|
g_lua.bindSingletonFunction("g_sounds", "disableAudio", &SoundManager::disableAudio, &g_sounds);
|
|
|
|
g_lua.bindSingletonFunction("g_sounds", "setAudioEnabled", &SoundManager::setAudioEnabled, &g_sounds);
|
2012-06-17 17:21:46 +02:00
|
|
|
g_lua.bindSingletonFunction("g_sounds", "isAudioEnabled", &SoundManager::isAudioEnabled, &g_sounds);
|
2013-01-16 19:46:42 +01:00
|
|
|
|
|
|
|
g_lua.registerClass<SoundSource>();
|
|
|
|
g_lua.registerClass<CombinedSoundSource, SoundSource>();
|
|
|
|
g_lua.registerClass<StreamSoundSource, SoundSource>();
|
|
|
|
|
|
|
|
g_lua.registerClass<SoundChannel>();
|
|
|
|
g_lua.bindClassMemberFunction<SoundChannel>("play", &SoundChannel::play);
|
|
|
|
g_lua.bindClassMemberFunction<SoundChannel>("stop", &SoundChannel::stop);
|
|
|
|
g_lua.bindClassMemberFunction<SoundChannel>("enqueue", &SoundChannel::enqueue);
|
|
|
|
g_lua.bindClassMemberFunction<SoundChannel>("enable", &SoundChannel::enable);
|
|
|
|
g_lua.bindClassMemberFunction<SoundChannel>("disable", &SoundChannel::disable);
|
|
|
|
g_lua.bindClassMemberFunction<SoundChannel>("setGain", &SoundChannel::setGain);
|
|
|
|
g_lua.bindClassMemberFunction<SoundChannel>("getGain", &SoundChannel::getGain);
|
|
|
|
g_lua.bindClassMemberFunction<SoundChannel>("setEnabled", &SoundChannel::setEnabled);
|
|
|
|
g_lua.bindClassMemberFunction<SoundChannel>("isEnabled", &SoundChannel::isEnabled);
|
|
|
|
g_lua.bindClassMemberFunction<SoundChannel>("getId", &SoundChannel::getId);
|
2012-07-14 03:10:24 +02:00
|
|
|
#endif
|
2012-08-02 13:36:21 +02:00
|
|
|
|
|
|
|
#ifdef FW_SQL
|
|
|
|
// Database
|
|
|
|
g_lua.registerClass<Database>();
|
|
|
|
|
2012-08-03 13:44:11 +02:00
|
|
|
// DBResult
|
|
|
|
g_lua.registerClass<DBResult>();
|
|
|
|
g_lua.bindClassMemberFunction<DBResult>("getDataInt", &DBResult::getDataInt);
|
|
|
|
g_lua.bindClassMemberFunction<DBResult>("getDataLong", &DBResult::getDataLong);
|
|
|
|
g_lua.bindClassMemberFunction<DBResult>("getDataString", &DBResult::getDataString);
|
2013-01-09 20:29:58 +01:00
|
|
|
g_lua.bindClassMemberFunction<DBResult>("getRowCount", &DBResult::getRowCount);
|
2012-08-03 13:44:11 +02:00
|
|
|
g_lua.bindClassMemberFunction<DBResult>("next", &DBResult::next);
|
|
|
|
|
2013-01-09 20:29:58 +01:00
|
|
|
|
2012-08-02 13:36:21 +02:00
|
|
|
// Mysql
|
2012-08-22 10:51:31 +02:00
|
|
|
g_lua.registerClass<DatabaseMySQL, Database>();
|
2012-08-02 13:36:21 +02:00
|
|
|
g_lua.bindClassStaticFunction<DatabaseMySQL>("create", []{ return DatabaseMySQLPtr(new DatabaseMySQL); });
|
|
|
|
g_lua.bindClassMemberFunction<DatabaseMySQL>("connect", &DatabaseMySQL::connect);
|
2012-08-03 13:44:11 +02:00
|
|
|
g_lua.bindClassMemberFunction<DatabaseMySQL>("executeQuery", &DatabaseMySQL::executeQuery);
|
|
|
|
g_lua.bindClassMemberFunction<DatabaseMySQL>("storeQuery", &DatabaseMySQL::storeQuery);
|
|
|
|
g_lua.bindClassMemberFunction<DatabaseMySQL>("escapeString", &DatabaseMySQL::escapeString);
|
2012-08-02 13:36:21 +02:00
|
|
|
#endif
|
2011-08-14 04:09:11 +02:00
|
|
|
}
|