Fixed api

This commit is contained in:
Chewico 2025-06-22 01:51:04 +02:00
parent 9ca8377b7e
commit 905e66b241
19 changed files with 3933 additions and 556 deletions

18
.clang-format Normal file
View File

@ -0,0 +1,18 @@
BasedOnStyle: LLVM
UseTab: ForIndentation
IndentWidth: 4
TabWidth: 4
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
AllowShortIfStatementsOnASingleLine: false
BreakBeforeBraces: Attach
NamespaceIndentation: All

View File

@ -1,6 +1,6 @@
[Window][DockSpace Demo] [Window][DockSpace Demo]
Pos=0,0 Pos=0,0
Size=2560,1371 Size=1280,720
Collapsed=0 Collapsed=0
[Window][Debug##Default] [Window][Debug##Default]
@ -9,44 +9,44 @@ Size=400,400
Collapsed=0 Collapsed=0
[Window][Terrain Editor] [Window][Terrain Editor]
Pos=2107,24 Pos=827,24
Size=453,1012 Size=453,361
Collapsed=0 Collapsed=0
DockId=0x00000006,0 DockId=0x00000006,0
[Window][Viewport] [Window][Viewport]
Pos=440,24 Pos=440,24
Size=1665,1012 Size=385,361
Collapsed=0 Collapsed=0
DockId=0x00000005,0 DockId=0x00000005,0
[Window][ViewportPannel] [Window][ViewportPannel]
Pos=440,24 Pos=440,24
Size=1665,1012 Size=385,361
Collapsed=0 Collapsed=0
DockId=0x00000005,1 DockId=0x00000005,1
[Window][ShaderExplorer] [Window][ShaderExplorer]
Pos=0,1038 Pos=0,387
Size=2560,333 Size=1280,333
Collapsed=0 Collapsed=0
DockId=0x00000004,1 DockId=0x00000004,1
[Window][TreePannel] [Window][TreePannel]
Pos=0,24 Pos=0,24
Size=438,1012 Size=438,361
Collapsed=0 Collapsed=0
DockId=0x00000001,0 DockId=0x00000001,0
[Window][MeshExplorer] [Window][MeshExplorer]
Pos=0,1038 Pos=0,387
Size=2560,333 Size=1280,333
Collapsed=0 Collapsed=0
DockId=0x00000004,0 DockId=0x00000004,0
[Window][PropertiesPannel] [Window][PropertiesPannel]
Pos=2107,24 Pos=827,24
Size=453,1012 Size=453,361
Collapsed=0 Collapsed=0
DockId=0x00000006,1 DockId=0x00000006,1
@ -66,8 +66,13 @@ Pos=1228,651
Size=104,68 Size=104,68
Collapsed=0 Collapsed=0
[Window][Test]
Pos=60,60
Size=55,82
Collapsed=0
[Docking][Data] [Docking][Data]
DockSpace ID=0xA1672E74 Window=0x4647B76E Pos=0,24 Size=2560,1347 Split=Y Selected=0x34A4C10F DockSpace ID=0xA1672E74 Window=0x4647B76E Pos=0,24 Size=1280,696 Split=Y Selected=0x34A4C10F
DockNode ID=0x00000003 Parent=0xA1672E74 SizeRef=1280,1012 Split=X DockNode ID=0x00000003 Parent=0xA1672E74 SizeRef=1280,1012 Split=X
DockNode ID=0x00000001 Parent=0x00000003 SizeRef=438,696 Selected=0xE45B9F93 DockNode ID=0x00000001 Parent=0x00000003 SizeRef=438,696 Selected=0xE45B9F93
DockNode ID=0x00000002 Parent=0x00000003 SizeRef=2120,696 Split=X Selected=0x34A4C10F DockNode ID=0x00000002 Parent=0x00000003 SizeRef=2120,696 Split=X Selected=0x34A4C10F

View File

@ -0,0 +1,223 @@
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// THIS FILE IS A MODIFIED VERSION
// https://github.com/sashi0034/angel-lsp/blob/main/examples/OpenSiv3D/make_predefined.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "DeerStudio/EditorEngine/AngelscriptPredefined.h"
#include "DeerStudio/EditorEngine.h"
#include "angelscript.h"
#include <iso646.h>
#include <sstream>
#include <string>
#include <string_view>
#include <angelscript.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <string_view>
#include "Deer/DataStore.h"
#include "Deer/Path.h"
static std::stringstream stream;
static std::string str;
void printFuncList(const asIScriptEngine &engine) {
for (int i = 0; i < engine.GetFuncdefCount(); ++i) {
asITypeInfo *t = engine.GetFuncdefByIndex(i);
if (!t)
continue;
asIScriptFunction *f = t->GetFuncdefSignature();
stream << "funcdef " << f->GetDeclaration(true, false, true) << ";\n";
}
}
void printEnumList(const asIScriptEngine &engine) {
for (int i = 0; i < engine.GetEnumCount(); ++i) {
const auto e = engine.GetEnumByIndex(i);
if (!e)
continue;
std::string_view ns = e->GetNamespace();
if (!ns.empty())
stream << "namespace " << ns << " {\n";
stream << "enum " << e->GetName() << " {\n";
for (int j = 0; j < e->GetEnumValueCount(); ++j) {
int value;
stream << "\t" << e->GetEnumValueByIndex(j, &value) << " = "
<< value;
if (j < e->GetEnumValueCount() - 1)
stream << ",";
stream << "\n";
}
stream << "}\n";
if (!ns.empty())
stream << "}\n\n";
}
}
void printClassTypeList(const asIScriptEngine &engine) {
for (int i = 0; i < engine.GetObjectTypeCount(); ++i) {
asITypeInfo *t = engine.GetObjectTypeByIndex(i);
if (!t)
continue;
std::string_view ns = t->GetNamespace();
if (!ns.empty())
stream << "namespace " << ns << " {\n";
stream << "class " << t->GetName();
if (std::string("any") == t->GetName())
stream << " ";
if (t->GetSubTypeCount() > 0) {
stream << "<";
for (int sub = 0; sub < t->GetSubTypeCount(); ++sub) {
if (sub > 0)
stream << ", ";
const auto st = t->GetSubType(sub);
stream << st->GetName();
}
stream << ">";
}
stream << " {\n";
for (int j = 0; j < t->GetFactoryCount(); ++j) {
asIScriptFunction *f = t->GetFactoryByIndex(j);
stream << "\t" << f->GetDeclaration(false, false, true) << ";\n";
}
for (int j = 0; j < t->GetBehaviourCount(); ++j) {
asEBehaviours behaviours;
const auto f = t->GetBehaviourByIndex(j, &behaviours);
if (behaviours == asBEHAVE_CONSTRUCT ||
behaviours == asBEHAVE_DESTRUCT ||
behaviours == asBEHAVE_FACTORY)
stream << "\t" << f->GetDeclaration(false, false, true)
<< ";\n";
}
for (int j = 0; j < t->GetMethodCount(); ++j) {
const auto m = t->GetMethodByIndex(j);
stream << "\t" << m->GetDeclaration(false, false, true);
if (m->IsProperty())
stream << " property";
stream << ";\n";
}
for (int j = 0; j < t->GetPropertyCount(); ++j) {
stream << "\t" << t->GetPropertyDeclaration(j, false) << ";\n";
}
for (int j = 0; j < t->GetChildFuncdefCount(); ++j) {
stream
<< "\tfuncdef "
<< t->GetChildFuncdef(j)->GetFuncdefSignature()->GetDeclaration(
false)
<< ";\n";
}
stream << "}\n";
if (!ns.empty())
stream << "}\n\n";
}
}
void printGlobalFunctionList(const asIScriptEngine &engine) {
for (int i = 0; i < engine.GetGlobalFunctionCount(); ++i) {
const auto f = engine.GetGlobalFunctionByIndex(i);
if (!f)
continue;
std::string_view ns = f->GetNamespace();
if (!ns.empty())
stream << "namespace " << ns << " { ";
stream << f->GetDeclaration(false, false, true) << ";";
if (!ns.empty())
stream << " }";
stream << "\n";
}
}
void printGlobalPropertyList(const asIScriptEngine &engine) {
for (int i = 0; i < engine.GetGlobalPropertyCount(); ++i) {
const char *name;
const char *ns0;
int type;
engine.GetGlobalPropertyByIndex(i, &name, &ns0, &type, nullptr, nullptr,
nullptr, nullptr);
std::string t = engine.GetTypeDeclaration(type, true);
if (t.empty())
continue;
std::string_view ns = ns0;
if (!ns.empty())
stream << "namespace " << ns << " { ";
stream << t << " " << name << ";";
if (!ns.empty())
stream << " }";
stream << "\n";
}
}
void printGlobalTypedef(const asIScriptEngine &engine) {
for (int i = 0; i < engine.GetTypedefCount(); ++i) {
const auto type = engine.GetTypedefByIndex(i);
if (!type)
continue;
std::string_view ns = type->GetNamespace();
if (!ns.empty())
stream << "namespace " << ns << " {\n";
stream << "typedef "
<< engine.GetTypeDeclaration(type->GetTypedefTypeId()) << " "
<< type->GetName() << ";\n";
if (!ns.empty())
stream << "}\n";
}
}
void printAngelInfo(const asIScriptEngine &engine) {
printFuncList(engine);
printEnumList(engine);
printClassTypeList(engine);
printGlobalFunctionList(engine);
printGlobalPropertyList(engine);
printGlobalTypedef(engine);
}
namespace Deer {
void EditorEngine::generateAngelscriptPredefined() {
stream.clear();
stream << "//This file was generated automatically\n";
printAngelInfo(*Deer::EditorEngine::scriptEngine);
str = stream.str();
}
void EditorEngine::saveAngelscriptPredefined(const Path &path) {
Deer::Path filePath = path / "as.predefined";
std::ofstream file(filePath, std::ios::out | std::ios::binary);
file.write(reinterpret_cast<const char *>(str.c_str()), str.size());
file.close();
}
} // namespace Deer

View File

@ -0,0 +1,9 @@
#pragma once
#include "Deer/Path.h"
namespace Deer {
namespace EditorEngine {
void generateAngelscriptPredefined();
void saveAngelscriptPredefined(const Path &path);
} // namespace EditorEngine
} // namespace Deer

View File

@ -1,20 +1,22 @@
#include "DeerStudio/EditorEngine.h"
#include "DeerStudio/EditorEngine/DockPanel/DockPanelInfo.h"
#include "DeerStudio/EditorEngine/DockPanel/DockPanelContext.h"
#include "DeerStudio/EditorEngine/ServiceScript/ServiceScriptContext.h"
#include "DeerStudio/EditorEngine/ErrorHandle.h"
#include "Deer/Log.h" #include "Deer/Log.h"
#include "DeerStudio/EditorEngine.h"
#include "DeerStudio/EditorEngine/DockPanel/DockPanelContext.h"
#include "DeerStudio/EditorEngine/DockPanel/DockPanelInfo.h"
#include "DeerStudio/EditorEngine/ErrorHandle.h"
#include "DeerStudio/EditorEngine/AngelscriptPredefined.h"
#include "DeerStudio/EditorEngine/ServiceScript/ServiceScriptContext.h"
#include "Deer/Path.h"
#include "Deer/DataStore.h" #include "Deer/DataStore.h"
#include "Deer/Path.h"
#include "angelscript.h" #include "angelscript.h"
#include "scriptbuilder.h" #include "scriptbuilder.h"
#include <iostream>
#include <filesystem> #include <filesystem>
#include <vector> #include <iostream>
#include <string> #include <string>
#include <vector>
namespace fs = std::filesystem; namespace fs = std::filesystem;
@ -22,9 +24,10 @@ namespace Deer {
namespace EditorEngine { namespace EditorEngine {
CScriptBuilder scriptBuilder; CScriptBuilder scriptBuilder;
ServiceScriptContext* getServiceScriptContext(const ServiceScriptRef& ref) { ServiceScriptContext *
for (ServiceScriptContext& ctx : serviceScriptModules) { getServiceScriptContext(const ServiceScriptRef &ref) {
const ServiceScriptInfo& info = ctx.getInfo(); for (ServiceScriptContext &ctx : serviceScriptModules) {
const ServiceScriptInfo &info = ctx.getInfo();
if (info.name == ref.name && info.version == ref.version) { if (info.name == ref.name && info.version == ref.version) {
return &ctx; return &ctx;
@ -33,67 +36,89 @@ namespace Deer {
return nullptr; return nullptr;
} }
} } // namespace EditorEngine
void EditorEngine::loadDockPanels() { void EditorEngine::loadDockPanels() {
Path path = DataStore::rootPath / DEER_EDITOR_PANEL_PATH; Path path = DataStore::rootPath / DEER_EDITOR_PANEL_PATH;
if (!fs::exists(path) || !fs::is_directory(path)) { if (!fs::exists(path) || !fs::is_directory(path)) {
DEER_EDITOR_ENGINE_ERROR("Could not find folder " DEER_EDITOR_PANEL_PATH); DEER_EDITOR_ENGINE_ERROR(
"Could not find folder " DEER_EDITOR_PANEL_PATH);
return; return;
} }
DEER_CORE_TRACE("Extracting UI Engine Scripts "); DEER_CORE_TRACE("Extracting UI Engine Scripts ");
for (const auto& _dir : fs::directory_iterator(path)) { for (const auto &_dir : fs::directory_iterator(path)) {
Path panelInfo_path = _dir.path() / "dockPanelModule.json"; Path panelInfo_path = _dir.path() / "dockPanelModule.json";
// A panel info is neded to load a panel // A panel info is neded to load a panel
if (!fs::exists(panelInfo_path) || !fs::is_regular_file(panelInfo_path)) { if (!fs::exists(panelInfo_path) ||
DEER_EDITOR_ENGINE_WARN("Editor engine did not find dockPanelModule.json in folder {0}", panelInfo_path.c_str()); !fs::is_regular_file(panelInfo_path)) {
DEER_EDITOR_ENGINE_WARN("Editor engine did not find "
"dockPanelModule.json in folder {0}",
panelInfo_path.c_str());
continue; continue;
} }
DockPanelInfo* dockPanelInfo = loadDockPanelInfo(panelInfo_path); DockPanelInfo *dockPanelInfo = loadDockPanelInfo(panelInfo_path);
if (dockPanelInfo->name == "null") { if (dockPanelInfo->name == "null") {
DEER_EDITOR_ENGINE_ERROR("Failed to load dock panel module from {0},\n incorrect panelInfo.json file", path.string().c_str()); DEER_EDITOR_ENGINE_ERROR(
"Failed to load dock panel module from {0},\n incorrect "
"panelInfo.json file",
path.string().c_str());
delete dockPanelInfo; delete dockPanelInfo;
continue; continue;
} }
int r; r = scriptBuilder.StartNewModule(scriptEngine, dockPanelInfo->name.c_str()); saveAngelscriptPredefined(_dir);
int r;
r = scriptBuilder.StartNewModule(scriptEngine,
dockPanelInfo->name.c_str());
if (r < 0) { if (r < 0) {
DEER_EDITOR_ENGINE_ERROR("Failed to create module for dock panel module {0}", path.string().c_str()); DEER_EDITOR_ENGINE_ERROR(
"Failed to create module for dock panel module {0}",
path.string().c_str());
delete dockPanelInfo; delete dockPanelInfo;
continue; continue;
} }
asIScriptModule* module = scriptBuilder.GetModule(); asIScriptModule *module = scriptBuilder.GetModule();
// Extract apis // Extract apis
for (const ServiceScriptRef& serviceRef : dockPanelInfo->services) { for (const ServiceScriptRef &serviceRef : dockPanelInfo->services) {
ServiceScriptContext* ctx = getServiceScriptContext(serviceRef); ServiceScriptContext *ctx = getServiceScriptContext(serviceRef);
if (ctx == nullptr) { if (ctx == nullptr) {
DEER_EDITOR_ENGINE_ERROR("Editor engine could not find the Service with name {0} and version {1}", serviceRef.name.c_str(), serviceRef.version.c_str()); DEER_EDITOR_ENGINE_ERROR(
"Editor engine could not find the Service with name "
"{0} and version {1}",
serviceRef.name.c_str(), serviceRef.version.c_str());
continue; continue;
} }
ctx->bindFunctions(); DEER_EDITOR_ENGINE_INFO("added service {0}",
serviceRef.name.c_str());
} }
for (const auto& entry : fs::recursive_directory_iterator(_dir)) { for (const auto &entry : fs::recursive_directory_iterator(_dir)) {
if (entry.is_regular_file() && entry.path().extension() == ".as") { if (entry.is_regular_file() &&
r = scriptBuilder.AddSectionFromFile(entry.path().string().c_str()); entry.path().extension() == ".as") {
r = scriptBuilder.AddSectionFromFile(
entry.path().string().c_str());
if (r < 0) { if (r < 0) {
DEER_EDITOR_ENGINE_ERROR("Failed loading script for module {0}\nscript: {1}", path.string().c_str(), entry.path().string().c_str()); DEER_EDITOR_ENGINE_ERROR(
"Failed loading script for module {0}\nscript: {1}",
path.string().c_str(),
entry.path().string().c_str());
} }
} }
} }
r = scriptBuilder.BuildModule(); r = scriptBuilder.BuildModule();
if (r < 0) { if (r < 0) {
DEER_EDITOR_ENGINE_ERROR("Failed compiling module {0}", path.string().c_str()); DEER_EDITOR_ENGINE_ERROR("Failed compiling module {0}",
_dir.path().stem().string().c_str());
delete dockPanelInfo; delete dockPanelInfo;
continue; continue;
} }
@ -101,4 +126,4 @@ namespace Deer {
dockPanelModules.push_back({module, dockPanelInfo}); dockPanelModules.push_back({module, dockPanelInfo});
} }
} }
} } // namespace Deer

View File

@ -1,35 +1,34 @@
#include "DeerStudio/EditorEngine.h" #include "DeerStudio/EditorEngine.h"
#include "DeerStudio/EditorEngine/ErrorHandle.h"
#include "DeerStudio/EditorEngine/API.h" #include "DeerStudio/EditorEngine/API.h"
#include "DeerStudio/EditorEngine/ErrorHandle.h"
#include "DeerStudio/EditorEngine/DockPanel/DockPanelObject.h"
#include "DeerStudio/EditorEngine/DockPanel/DockPanelContext.h"
#include "DeerStudio/EditorEngine/ServiceScript/ServiceScriptContext.h"
#include "DeerStudio/EditorEngine.h" #include "DeerStudio/EditorEngine.h"
#include "DeerStudio/EditorEngine/AngelscriptPredefined.h"
#include "DeerStudio/EditorEngine/DockPanel/DockPanelContext.h"
#include "DeerStudio/EditorEngine/DockPanel/DockPanelObject.h"
#include "DeerStudio/EditorEngine/ServiceScript/ServiceScriptContext.h"
#include "Deer/Log.h" #include "Deer/Log.h"
#include <vector> #include <vector>
#include "angelscript.h" #include "angelscript.h"
#include "scriptbuilder.h"
#include "scriptstdstring.h"
#include "scriptarray.h" #include "scriptarray.h"
#include "scriptbuilder.h"
#include "scriptdictionary.h" #include "scriptdictionary.h"
#include "scriptstdstring.h"
void extract_angelScript();
namespace Deer { namespace Deer {
namespace EditorEngine { namespace EditorEngine {
asIScriptEngine* scriptEngine = nullptr; asIScriptEngine *scriptEngine = nullptr;
std::vector<DockPanelContext> dockPanelModules; std::vector<DockPanelContext> dockPanelModules;
std::vector<ServiceScriptContext> serviceScriptModules; std::vector<ServiceScriptContext> serviceScriptModules;
DockPanelObject* currentDockPanelExecution = nullptr; DockPanelObject *currentDockPanelExecution = nullptr;
asIScriptContext* executingScriptContext; asIScriptContext *executingScriptContext;
bool active = false; bool active = false;
} } // namespace EditorEngine
void EditorEngine::initialize() { void EditorEngine::initialize() {
int err = 0; int err = 0;
@ -39,7 +38,8 @@ namespace Deer {
scriptEngine = asCreateScriptEngine(); scriptEngine = asCreateScriptEngine();
AS_RET_CHECK(scriptEngine->SetMessageCallback(asFUNCTION(Deer::EditorEngine::errorCallback), 0, asCALL_CDECL)); AS_RET_CHECK(scriptEngine->SetMessageCallback(
asFUNCTION(Deer::EditorEngine::errorCallback), 0, asCALL_CDECL));
RegisterStdString(scriptEngine); RegisterStdString(scriptEngine);
RegisterScriptArray(scriptEngine, true); RegisterScriptArray(scriptEngine, true);
@ -48,20 +48,20 @@ namespace Deer {
registerEditorEngineStructs(); registerEditorEngineStructs();
registerEditorEngineFunctions(); registerEditorEngineFunctions();
// This is simply to generate the as.predefined for better experience // We generate a as.predefined file generic for services
extract_angelScript(); generateAngelscriptPredefined();
loadServiceScripts(); loadServiceScripts();
generateAngelscriptPredefined();
loadDockPanels(); loadDockPanels();
active = true; active = true;
for (ServiceScriptContext& service : serviceScriptModules) { for (ServiceScriptContext &service : serviceScriptModules) {
service.init(); service.init();
} }
for (DockPanelContext& pannel : dockPanelModules) for (DockPanelContext &pannel : dockPanelModules)
pannel.init(); pannel.init();
} }
void EditorEngine::deinitialize() { void EditorEngine::deinitialize() {
@ -79,7 +79,7 @@ namespace Deer {
if (!active) if (!active)
return; return;
for (auto& panel : dockPanelModules) for (auto &panel : dockPanelModules)
panel.render(); panel.render();
} }
} } // namespace Deer

View File

@ -1,19 +1,20 @@
#include "Deer/Log.h"
#include "DeerStudio/EditorEngine.h" #include "DeerStudio/EditorEngine.h"
#include "DeerStudio/EditorEngine/AngelscriptPredefined.h"
#include "DeerStudio/EditorEngine/ErrorHandle.h"
#include "DeerStudio/EditorEngine/ServiceScript/ServiceScriptContext.h" #include "DeerStudio/EditorEngine/ServiceScript/ServiceScriptContext.h"
#include "DeerStudio/EditorEngine/ServiceScript/ServiceScriptInfo.h" #include "DeerStudio/EditorEngine/ServiceScript/ServiceScriptInfo.h"
#include "DeerStudio/EditorEngine/ErrorHandle.h"
#include "Deer/Log.h"
#include "Deer/Path.h"
#include "Deer/DataStore.h" #include "Deer/DataStore.h"
#include "Deer/Path.h"
#include "angelscript.h" #include "angelscript.h"
#include "scriptbuilder.h" #include "scriptbuilder.h"
#include <iostream>
#include <filesystem> #include <filesystem>
#include <vector> #include <iostream>
#include <string> #include <string>
#include <vector>
namespace fs = std::filesystem; namespace fs = std::filesystem;
@ -22,50 +23,74 @@ namespace Deer {
Path path = DataStore::rootPath / DEER_EDITOR_SERVICE_PATH; Path path = DataStore::rootPath / DEER_EDITOR_SERVICE_PATH;
if (!fs::exists(path) || !fs::is_directory(path)) { if (!fs::exists(path) || !fs::is_directory(path)) {
DEER_EDITOR_ENGINE_ERROR("Could not find folder " DEER_EDITOR_SERVICE_PATH); DEER_EDITOR_ENGINE_ERROR(
"Could not find folder " DEER_EDITOR_SERVICE_PATH);
return; return;
} }
for (const auto& _dir : fs::directory_iterator(path)) { for (const auto &_dir : fs::directory_iterator(path)) {
Path panelInfo_path = _dir.path() / "ServiceScript.json"; Path panelInfo_path = _dir.path() / "ServiceScript.json";
// A panel info is neded to load a panel // A panel info is neded to load a panel
if (!fs::exists(panelInfo_path) || !fs::is_regular_file(panelInfo_path)) { if (!fs::exists(panelInfo_path) ||
DEER_EDITOR_ENGINE_WARN("Editor engine did not find ServiceScript.json in folder {0}", panelInfo_path.c_str()); !fs::is_regular_file(panelInfo_path)) {
DEER_EDITOR_ENGINE_WARN("Editor engine did not find "
"ServiceScript.json in folder {0}",
panelInfo_path.c_str());
continue; continue;
} }
ServiceScriptInfo* serviceScriptInfo = loadServiceScriptInfo(panelInfo_path); ServiceScriptInfo *serviceScriptInfo =
loadServiceScriptInfo(panelInfo_path);
if (serviceScriptInfo->name == "null") { if (serviceScriptInfo->name == "null") {
DEER_EDITOR_ENGINE_ERROR("Failed to load service script module from {0},\n incorrect ServiceScript.json file", path.string().c_str()); DEER_EDITOR_ENGINE_ERROR(
"Failed to load service script module from {0},\n "
"incorrect ServiceScript.json file",
path.string().c_str());
delete serviceScriptInfo; delete serviceScriptInfo;
continue; continue;
} }
int r; r = scriptBuilder.StartNewModule(scriptEngine, serviceScriptInfo->name.c_str()); saveAngelscriptPredefined(_dir);
int r;
r = scriptBuilder.StartNewModule(scriptEngine,
serviceScriptInfo->name.c_str());
if (r < 0) { if (r < 0) {
DEER_EDITOR_ENGINE_ERROR("Failed to create module for service script module {0}", path.string().c_str()); DEER_EDITOR_ENGINE_ERROR(
"Failed to create module for service script module {0}",
path.string().c_str());
delete serviceScriptInfo; delete serviceScriptInfo;
continue; continue;
} }
for (const auto& entry : fs::recursive_directory_iterator(_dir)) { for (const auto &entry : fs::recursive_directory_iterator(_dir)) {
if (entry.is_regular_file() && entry.path().extension() == ".as") { if (entry.is_regular_file() &&
r = scriptBuilder.AddSectionFromFile(entry.path().string().c_str()); entry.path().extension() == ".as") {
r = scriptBuilder.AddSectionFromFile(
entry.path().string().c_str());
if (r < 0) { if (r < 0) {
DEER_EDITOR_ENGINE_ERROR("Failed loading script for module {0}\nscript: {1}", path.string().c_str(), entry.path().string().c_str()); DEER_EDITOR_ENGINE_ERROR(
"Failed loading script for module {0}\nscript: {1}",
path.string().c_str(),
entry.path().string().c_str());
} }
} }
} }
r = scriptBuilder.BuildModule(); r = scriptBuilder.BuildModule();
if (r < 0) { if (r < 0) {
DEER_EDITOR_ENGINE_ERROR("Failed compiling module {0}", path.string().c_str()); DEER_EDITOR_ENGINE_ERROR("Failed compiling module {0}",
path.string().c_str());
delete serviceScriptInfo; delete serviceScriptInfo;
continue; continue;
} }
serviceScriptModules.push_back(ServiceScriptContext(scriptEngine->GetModule(serviceScriptInfo->name.c_str()), serviceScriptInfo)); serviceScriptModules.push_back(ServiceScriptContext(
scriptEngine->GetModule(serviceScriptInfo->name.c_str()),
serviceScriptInfo));
serviceScriptModules.back().bindFunctions();
} }
} }
} } // namespace Deer

View File

@ -0,0 +1,10 @@
#include "ServiceScriptGenericFunction.h"
#include "Deer/Log.h"
#include "angelscript.h"
namespace Deer {
void EditorEngine::apiFunction(asIScriptGeneric *func) {
DEER_CORE_TRACE("Called function {0}",
func->GetFunction()->GetDeclaration());
}
} // namespace Deer

View File

@ -0,0 +1,16 @@
#pragma once
class asIScriptGeneric;
namespace Deer {
namespace EditorEngine {
struct ServiceScriptObject;
void apiFunction(asIScriptGeneric *gen);
struct ApiFunctionData {
uint16_t serviceContextId;
uint16_t serviceObjectId;
};
} // namespace EditorEngine
} // namespace Deer

View File

@ -1,16 +1,21 @@
#include "DeerStudio/EditorEngine/ServiceScript/ServiceScriptObject.h" #include "DeerStudio/EditorEngine/ServiceScript/ServiceScriptObject.h"
#include "DeerStudio/EditorEngine/ErrorHandle.h"
#include "DeerStudio/EditorEngine.h" #include "DeerStudio/EditorEngine.h"
#include "DeerStudio/EditorEngine/ErrorHandle.h"
#include "DeerStudio/EditorEngine/ServiceScript/ServiceScriptGenericFunction.h"
#include "angelscript.h" #include "angelscript.h"
#include "scriptbuilder.h" #include "scriptbuilder.h"
#include <string> #include <functional>
#include <sstream> #include <sstream>
#include <string>
namespace Deer { namespace Deer {
namespace EditorEngine { namespace EditorEngine {
ServiceScriptObject::ServiceScriptObject(asITypeInfo* _type, asIScriptContext* _scriptContext) ServiceScriptObject::ServiceScriptObject(
asITypeInfo *_type, asIScriptContext *_scriptContext)
: type(_type), scriptContext(_scriptContext) { : type(_type), scriptContext(_scriptContext) {
// Constructor // Constructor
// "type@ type()" // "type@ type()"
@ -29,15 +34,19 @@ namespace Deer {
callString += type->GetName(); callString += type->GetName();
callString += "()"; callString += "()";
asIScriptFunction* factory = type->GetFactoryByDecl(callString.c_str()); asIScriptFunction *factory =
type->GetFactoryByDecl(callString.c_str());
AS_CHECK(scriptContext->Prepare(factory)); AS_CHECK(scriptContext->Prepare(factory));
AS_CHECK(scriptContext->Execute()); AS_CHECK(scriptContext->Execute());
// Return value contains the ref to a asIScriptObject in the location provided // Return value contains the ref to a asIScriptObject in the
object = *(asIScriptObject**)scriptContext->GetAddressOfReturnValue(); // location provided
if (!object){ object =
DEER_EDITOR_ENGINE_ERROR("Could not create object", type->GetName()); *(asIScriptObject **)scriptContext->GetAddressOfReturnValue();
if (!object) {
DEER_EDITOR_ENGINE_ERROR("Could not create object",
type->GetName());
return; return;
} }
object->AddRef(); object->AddRef();
@ -73,8 +82,8 @@ namespace Deer {
AS_CHECK(scriptContext->Unprepare()); AS_CHECK(scriptContext->Unprepare());
} }
ServiceScriptObject::ServiceScriptObject(
ServiceScriptObject::ServiceScriptObject(ServiceScriptObject&& other) noexcept { ServiceScriptObject &&other) noexcept {
type = other.type; type = other.type;
object = other.object; object = other.object;
updateFunction = other.updateFunction; updateFunction = other.updateFunction;
@ -88,7 +97,8 @@ namespace Deer {
other.scriptContext = nullptr; other.scriptContext = nullptr;
} }
ServiceScriptObject& ServiceScriptObject::operator=(ServiceScriptObject&& other) noexcept { ServiceScriptObject &
ServiceScriptObject::operator=(ServiceScriptObject &&other) noexcept {
if (&other != this) { if (&other != this) {
type = other.type; type = other.type;
object = other.object; object = other.object;
@ -107,11 +117,13 @@ namespace Deer {
void ServiceScriptObject::bindFunctions() { void ServiceScriptObject::bindFunctions() {
for (int i = 0; i < type->GetMethodCount(); i++) { for (int i = 0; i < type->GetMethodCount(); i++) {
asIScriptFunction* func = type->GetMethodByIndex(i); asIScriptFunction *func = type->GetMethodByIndex(i);
std::vector<std::string> metadata = scriptBuilder.GetMetadataForTypeMethod(type->GetTypeId(), func); std::vector<std::string> metadata =
scriptBuilder.GetMetadataForTypeMethod(type->GetTypeId(),
func);
bool containsServiceAPI = false; bool containsServiceAPI = false;
for (std::string& str : metadata) { for (std::string &str : metadata) {
if (str != "ServiceAPI") if (str != "ServiceAPI")
continue; continue;
containsServiceAPI = true; containsServiceAPI = true;
@ -121,9 +133,12 @@ namespace Deer {
if (!containsServiceAPI) if (!containsServiceAPI)
continue; continue;
DEER_CORE_INFO("Registering function from object {0}.{1}", type->GetName(), func->GetName()); DEER_CORE_INFO("Registering function from object {0}.{1}",
type->GetName(), func->GetName());
asITypeInfo* retType = EditorEngine::scriptEngine->GetTypeInfoById(func->GetReturnTypeId()); asITypeInfo *retType =
EditorEngine::scriptEngine->GetTypeInfoById(
func->GetReturnTypeId());
std::stringstream ext_dec; std::stringstream ext_dec;
@ -141,10 +156,11 @@ namespace Deer {
ext_dec << ", "; ext_dec << ", ";
int typeId; int typeId;
const char* name; const char *name;
func->GetParam(i, &typeId, nullptr, &name); func->GetParam(i, &typeId, nullptr, &name);
asITypeInfo* paramType = scriptEngine->GetTypeInfoById(typeId); asITypeInfo *paramType =
scriptEngine->GetTypeInfoById(typeId);
ext_dec << paramType->GetName(); ext_dec << paramType->GetName();
if (name != nullptr) if (name != nullptr)
@ -154,15 +170,11 @@ namespace Deer {
ext_dec << ")"; ext_dec << ")";
DEER_CORE_INFO(ext_dec.str().c_str()); DEER_CORE_INFO(ext_dec.str().c_str());
//scriptEngine->RegisterGlobalFunction(ext_dec.str().c_str(), asFUNCTION(apiFunction), asEP_GENERIC_CALL_MODE);
} AS_CHECK(scriptEngine->RegisterGlobalFunction(
ext_dec.str().c_str(), asFUNCTION(apiFunction),
asCALL_GENERIC));
}
void ServiceScriptObject::apiFunction(asIScriptGeneric* gen) {
gen->GetAuxiliary();
} }
} }
} } // namespace EditorEngine
} // namespace Deer

View File

@ -12,29 +12,30 @@ namespace Deer {
namespace EditorEngine { namespace EditorEngine {
struct ServiceScriptObject { struct ServiceScriptObject {
public: public:
ServiceScriptObject(asITypeInfo*, asIScriptContext*); ServiceScriptObject(asITypeInfo *, asIScriptContext *);
~ServiceScriptObject(); ~ServiceScriptObject();
// Delete copy constructor // Delete copy constructor
ServiceScriptObject(const ServiceScriptObject&) = delete; ServiceScriptObject(const ServiceScriptObject &) = delete;
ServiceScriptObject& operator=(const ServiceScriptObject&) = delete; ServiceScriptObject &
operator=(const ServiceScriptObject &) = delete;
ServiceScriptObject(ServiceScriptObject&& other) noexcept; ServiceScriptObject(ServiceScriptObject &&other) noexcept;
ServiceScriptObject& operator=(ServiceScriptObject&& other) noexcept; ServiceScriptObject &
operator=(ServiceScriptObject &&other) noexcept;
void init(); void init();
void update(); void update();
void bindFunctions(); void bindFunctions();
const char* getName(); const char *getName();
private:
asITypeInfo* type = nullptr;
asIScriptObject* object = nullptr;
asIScriptFunction* updateFunction = nullptr;
asIScriptFunction* initFunction = nullptr;
asIScriptContext* scriptContext = nullptr;
void apiFunction(asIScriptGeneric*); private:
asITypeInfo *type = nullptr;
asIScriptObject *object = nullptr;
asIScriptFunction *updateFunction = nullptr;
asIScriptFunction *initFunction = nullptr;
asIScriptContext *scriptContext = nullptr;
}; };
} } // namespace EditorEngine
} } // namespace Deer

View File

@ -1,205 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// THIS FILE IS A MODIFIED VERSION OF THIS https://github.com/sashi0034/angel-lsp/blob/main/examples/OpenSiv3D/make_predefined.cpp //
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "DeerStudio/EditorEngine.h"
#include "angelscript.h"
#include <iso646.h>
#include <string>
#include <string_view>
#include <sstream>
#include <iostream>
#include <string>
#include <string_view>
#include <sstream>
#include <angelscript.h>
#include <fstream>
#include "Deer/DataStore.h"
#include "Deer/Path.h"
std::stringstream stream;
void printFuncList(const asIScriptEngine& engine) {
for (int i = 0; i < engine.GetFuncdefCount(); ++i) {
asITypeInfo* t = engine.GetFuncdefByIndex(i);
if (!t) continue;
asIScriptFunction* f = t->GetFuncdefSignature();
stream << "funcdef "<< f->GetDeclaration(true, false, true) << ";\n";
}
}
void printEnumList(const asIScriptEngine& engine) {
for (int i = 0; i < engine.GetEnumCount(); ++i) {
const auto e = engine.GetEnumByIndex(i);
if (!e) continue;
std::string_view ns = e->GetNamespace();
if (!ns.empty()) stream << "namespace " << ns << " {\n";
stream << "enum " << e->GetName() << " {\n";
for (int j = 0; j < e->GetEnumValueCount(); ++j)
{
int value;
stream << "\t" << e->GetEnumValueByIndex(j, &value) << " = " << value;
if (j < e->GetEnumValueCount() - 1) stream << ",";
stream << "\n";
}
stream << "}\n";
if (!ns.empty()) stream << "}\n\n";
}
}
void printClassTypeList(const asIScriptEngine& engine)
{
for (int i = 0; i < engine.GetObjectTypeCount(); ++i)
{
asITypeInfo* t = engine.GetObjectTypeByIndex(i);
if (!t) continue;
std::string_view ns = t->GetNamespace();
if (!ns.empty()) stream << "namespace " << ns << " {\n";
stream << "class " << t->GetName();
if (std::string("any") == t->GetName())
stream << " " ;
if (t->GetSubTypeCount() > 0)
{
stream << "<";
for (int sub = 0; sub < t->GetSubTypeCount(); ++sub)
{
if (sub > 0) stream << ", ";
const auto st = t->GetSubType(sub);
stream << st->GetName();
}
stream << ">";
}
stream << " {\n";
for (int j = 0; j < t->GetFactoryCount(); ++j)
{
asIScriptFunction* f = t->GetFactoryByIndex(j);
stream << "\t" << f->GetDeclaration(false, false, true) << ";\n";
}
for (int j = 0; j < t->GetBehaviourCount(); ++j)
{
asEBehaviours behaviours;
const auto f = t->GetBehaviourByIndex(j, &behaviours);
if (behaviours == asBEHAVE_CONSTRUCT ||
behaviours == asBEHAVE_DESTRUCT ||
behaviours == asBEHAVE_FACTORY)
stream << "\t" << f->GetDeclaration(false, false, true) << ";\n";
}
for (int j = 0; j < t->GetMethodCount(); ++j)
{
const auto m = t->GetMethodByIndex(j);
stream << "\t" << m->GetDeclaration(false, false, true);
if (m->IsProperty())
stream << " property";
stream << ";\n";
}
for (int j = 0; j < t->GetPropertyCount(); ++j)
{
stream << "\t" << t->GetPropertyDeclaration(j, false) << ";\n";
}
for (int j = 0; j < t->GetChildFuncdefCount(); ++j)
{
stream << "\tfuncdef " << t->GetChildFuncdef(j)->GetFuncdefSignature()->GetDeclaration(false) << ";\n";
}
stream << "}\n";
if (!ns.empty()) stream << "}\n\n";
}
}
void printGlobalFunctionList(const asIScriptEngine& engine)
{
for (int i = 0; i < engine.GetGlobalFunctionCount(); ++i)
{
const auto f = engine.GetGlobalFunctionByIndex(i);
if (!f) continue;
std::string_view ns = f->GetNamespace();
if (!ns.empty()) stream << "namespace " << ns << " { ";
stream << f->GetDeclaration(false, false, true) << ";";
if (!ns.empty()) stream << " }";
stream << "\n";
}
}
void printGlobalPropertyList(const asIScriptEngine& engine)
{
for (int i = 0; i < engine.GetGlobalPropertyCount(); ++i)
{
const char* name;
const char* ns0;
int type;
engine.GetGlobalPropertyByIndex(i, &name, &ns0, &type, nullptr, nullptr, nullptr, nullptr);
std::string t = engine.GetTypeDeclaration(type, true);
if (t.empty()) continue;
std::string_view ns = ns0;
if (!ns.empty()) stream << "namespace " << ns << " { ";
stream << t << " " << name << ";";
if (!ns.empty()) stream << " }";
stream << "\n";
}
}
void printGlobalTypedef(const asIScriptEngine& engine)
{
for (int i = 0; i < engine.GetTypedefCount(); ++i)
{
const auto type = engine.GetTypedefByIndex(i);
if (!type) continue;
std::string_view ns = type->GetNamespace();
if (!ns.empty()) stream << "namespace " << ns << " {\n";
stream << "typedef " << engine.GetTypeDeclaration(type->GetTypedefTypeId())
<< " " << type->GetName() << ";\n";
if (!ns.empty()) stream << "}\n";
}
}
void printAngelInfo(const asIScriptEngine& engine)
{
printFuncList(engine);
printEnumList(engine);
printClassTypeList(engine);
printGlobalFunctionList(engine);
printGlobalPropertyList(engine);
printGlobalTypedef(engine);
}
void extract_angelScript() {
stream.clear();
stream << "//This file was generated automatically\n";
printAngelInfo(*Deer::EditorEngine::scriptEngine);
std::string str = stream.str();
Deer::Path filePath = Deer::DataStore::rootPath / DEER_EDITOR_PATH / "as.predefined";
std::ofstream file(filePath, std::ios::out | std::ios::binary);
file.write(reinterpret_cast<const char*>(str.c_str()), str.size());
file.close();
}

View File

@ -0,0 +1,806 @@
//This file was generated automatically
funcdef bool T[]::less(const T&in a, const T&in b);
funcdef void ReciverFunc(any@);
funcdef void TransferFunc(any@, any@);
enum key {
A = 546,
B = 547,
C = 548,
D = 549,
E = 550,
F = 551,
G = 552,
H = 553,
I = 554,
J = 555,
K = 556,
L = 557,
M = 558,
N = 559,
O = 560,
P = 561,
Q = 562,
R = 563,
S = 564,
T = 565,
U = 566,
V = 567,
W = 568,
X = 569,
Y = 570,
Z = 571,
K0 = 536,
K1 = 537,
K2 = 538,
K3 = 539,
K4 = 540,
K5 = 541,
K6 = 542,
K7 = 543,
K8 = 544,
K9 = 545,
Tab = 512,
Enter = 525,
Escape = 526,
Backspace = 523,
Space = 524,
Delete = 522,
Insert = 521,
Home = 519,
End = 520,
PageUp = 517,
PageDown = 518,
Right = 514,
Up = 515,
Down = 516,
Left = 513,
RightCtrl = 531,
LeftShift = 528,
RightShift = 532,
LeftAlt = 529,
RightAlt = 533,
LeftSuper = 530,
RightSuper = 534,
LeftCtrl = 527,
MouseLeft = 641,
MouseRight = 642,
MouseMiddle = 643
}
enum ResourceType {
Mesh = 1,
Shader = 2
}
class string {
~string();
string();
string(const string&in);
string& opAssign(const string&in);
string& opAddAssign(const string&in);
bool opEquals(const string&in) const;
int opCmp(const string&in) const;
string opAdd(const string&in) const;
uint length() const;
void resize(uint);
bool isEmpty() const;
uint8& opIndex(uint);
const uint8& opIndex(uint) const;
string& opAssign(double);
string& opAddAssign(double);
string opAdd(double) const;
string opAdd_r(double) const;
string& opAssign(float);
string& opAddAssign(float);
string opAdd(float) const;
string opAdd_r(float) const;
string& opAssign(int64);
string& opAddAssign(int64);
string opAdd(int64) const;
string opAdd_r(int64) const;
string& opAssign(uint64);
string& opAddAssign(uint64);
string opAdd(uint64) const;
string opAdd_r(uint64) const;
string& opAssign(bool);
string& opAddAssign(bool);
string opAdd(bool) const;
string opAdd_r(bool) const;
string substr(uint start = 0, int count = - 1) const;
int findFirst(const string&in, uint start = 0) const;
int findFirstOf(const string&in, uint start = 0) const;
int findFirstNotOf(const string&in, uint start = 0) const;
int findLast(const string&in, int start = - 1) const;
int findLastOf(const string&in, int start = - 1) const;
int findLastNotOf(const string&in, int start = - 1) const;
void insert(uint pos, const string&in other);
void erase(uint pos, int count = - 1);
}
class array<T> {
T[]@ array(int&in);
T[]@ array(int&in, uint length);
T[]@ array(int&in, uint length, const T&in value);
T& opIndex(uint index);
const T& opIndex(uint index) const;
T[]& opAssign(const T[]&in);
void insertAt(uint index, const T&in value);
void insertAt(uint index, const T[]&inout arr);
void insertLast(const T&in value);
void removeAt(uint index);
void removeLast();
void removeRange(uint start, uint count);
uint length() const;
void reserve(uint length);
void resize(uint length);
void sortAsc();
void sortAsc(uint startAt, uint count);
void sortDesc();
void sortDesc(uint startAt, uint count);
void reverse();
int find(const T&in value) const;
int find(uint startAt, const T&in value) const;
int findByRef(const T&in value) const;
int findByRef(uint startAt, const T&in value) const;
bool opEquals(const T[]&in) const;
bool isEmpty() const;
void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 ));
funcdef bool less(const T&in, const T&in);
}
class dictionaryValue {
~dictionaryValue();
dictionaryValue();
dictionaryValue& opAssign(const dictionaryValue&in);
dictionaryValue& opHndlAssign(const ?&in);
dictionaryValue& opHndlAssign(const dictionaryValue&in);
dictionaryValue& opAssign(const ?&in);
dictionaryValue& opAssign(double);
dictionaryValue& opAssign(int64);
void opCast(?&out);
void opConv(?&out);
int64 opConv();
double opConv();
}
class dictionary {
dictionary@ dictionary();
dictionary& opAssign(const dictionary&in);
void set(const string&in, const ?&in);
bool get(const string&in, ?&out) const;
void set(const string&in, const int64&in);
bool get(const string&in, int64&out) const;
void set(const string&in, const double&in);
bool get(const string&in, double&out) const;
bool exists(const string&in) const;
bool isEmpty() const;
uint getSize() const;
bool delete(const string&in);
void deleteAll();
string[]@ getKeys() const;
dictionaryValue& opIndex(const string&in);
const dictionaryValue& opIndex(const string&in) const;
}
class ref {
~ref();
ref();
ref(const ref&in);
ref(const ?&in);
void opCast(?&out);
ref& opHndlAssign(const ref&in);
ref& opHndlAssign(const ?&in);
bool opEquals(const ref&in) const;
bool opEquals(const ?&in) const;
}
class any {
any@ any();
any@ any(?&in);
any@ any(const int64&in);
any@ any(const double&in);
any& opAssign(any&in);
void store(?&in);
void store(const int64&in);
void store(const double&in);
bool retrieve(?&out);
bool retrieve(int64&out);
bool retrieve(double&out);
}
class DockPanel {
void onRender();
}
class ServiceScript {
}
class Entity {
string get_name() const property;
void set_name(string&in) property;
int get_id() const property;
Entity createChild(const string&in);
bool get_isRoot() const property;
void destroy();
bool get_exists() const property;
Entity get_parent() property;
void set_parent(Entity) property;
bool isDescendantOf(Entity);
bool opEquals(const Entity&in) const;
EntityChilds get_childs() const property;
TransformComponent get_transform() const property;
MeshComponent getMeshComponent();
MeshComponent createMeshComponent();
bool hasMeshComponent();
void removeMeshComponent();
ShaderComponent getShaderComponent();
ShaderComponent createShaderComponent();
bool hasShaderComponent();
void removeShaderComponent();
CameraComponent getCameraComponent();
CameraComponent createCameraComponent();
bool hasCameraComponent();
void removeCameraComponent();
}
class EntityChilds {
int get_count() const property;
Entity opIndex(int) const;
}
class TransformComponent {
vec3 get_position() const property;
vec3 get_scale() const property;
vec3 get_rotation() const property;
void set_position(const vec3) property;
void set_scale(const vec3) property;
void set_rotation(const vec3) property;
}
class MeshComponent {
bool get_isActive() const property;
bool get_hasMesh() const property;
void clear();
string getMesh();
void setMesh(string&in);
void set_isActive(const bool) property;
}
class ShaderComponent {
bool get_hasShader() const property;
void clear();
string getShader();
void setShader(const string&in);
}
class CameraComponent {
float get_fov() const property;
float get_aspectRatio() const property;
float get_nearZ() const property;
float get_farZ() const property;
void set_fov(float) property;
void set_aspectRatio(float) property;
void set_nearZ(float) property;
void set_farZ(float) property;
}
class vec3 {
vec3();
vec3(float, float = 0, float = 0);
vec3 opAdd(const vec3&in);
vec3 opSub(const vec3&in) const;
vec3 opNeg() const;
vec3 opMul(float) const;
vec3 opMul_r(float) const;
float x;
float y;
float z;
}
class quat {
~quat();
quat();
quat(float, float, float, float);
quat opMul(const quat&in) const;
vec3 getEuler() const;
void setEuler(vec3);
float x;
float y;
float z;
float w;
}
class Transform {
Transform();
vec3 relative(vec3);
vec3 position;
vec3 scale;
quat rotation;
}
class Camera {
Camera();
float fov;
float aspect;
float nearZ;
float farZ;
}
class SceneCamera {
SceneCamera();
Camera camera;
Transform transform;
}
class FrameBuffer {
FrameBuffer();
void clearRGBA(int, int, int, int);
int get_height() const property;
void resize(int, int);
string get_name() const property;
bool isValid();
}
class Environment {
void render(FrameBuffer, SceneCamera&in);
Entity getRootEntity();
Entity getEntity(int);
}
string formatInt(int64 val, const string&in options = "", uint width = 0);
string formatUInt(uint64 val, const string&in options = "", uint width = 0);
string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0);
int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0);
uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0);
double parseFloat(const string&in, uint&out byteCount = 0);
namespace Engine { Entity getRoot(); }
namespace UI { bool button(const string&in); }
namespace UI { bool buttonCenter(const string&in); }
namespace UI { bool buttonEnd(const string&in); }
namespace UI { bool checkbox(const string&in, bool); }
namespace UI { bool checkboxDisabled(const string&in, bool); }
namespace UI { void drawFrameBuffer(FrameBuffer, int, int); }
namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); }
namespace UI { void drawIcon(const string&in, int); }
namespace UI { void drawIconCentered(const string&in, int); }
namespace UI { bool inputText(const string&in, const string&in, string&out); }
namespace UI { bool isItemClicked(int); }
namespace UI { bool isMouseDoubleClicked(int); }
namespace UI { float magicSlider(const string&in, float, float); }
namespace UI { vec3 magicSlider3(const string&in, vec3, float); }
namespace UI { bool menuItem(const string&in); }
namespace UI { void menuItemDisabled(const string&in); }
namespace UI { void menuSpace(const string&in, any@, ReciverFunc@); }
namespace UI { void sameline(); }
namespace UI { void separator(); }
namespace UI { void space(); }
namespace UI { void space(int, int = 10); }
namespace UI { void text(const string&in); }
namespace UI { void textCenter(const string&in); }
namespace UI { void textColor(float, float, float, const string&in); }
namespace UI { void textEnd(const string&in); }
namespace UI { void title(const string&in); }
namespace UI { void titleCenter(const string&in); }
namespace UI { void titleCenterY(const string&in, int); }
namespace UI { void titleEnd(const string&in); }
namespace UI { bool isKeyDown(key); }
namespace UI { bool isKeyPressed(key); }
namespace UI { bool isMouseDraggin(key); }
namespace UI { bool isPannelActive(); }
namespace UI { float getMouseDragDeltaX(); }
namespace UI { float getMouseDragDeltaY(); }
namespace UI { float getMouseDeltaX(); }
namespace UI { float getMouseDeltaY(); }
namespace UI { int getAvailableSizeX(); }
namespace UI { int getAvailableSizeY(); }
namespace UI { void disablePannelPadding(bool); }
namespace UI { int sliderInt(string&in, int, int, int); }
namespace UI { float slider(string&in, float, float, float); }
namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); }
namespace Engine { FrameBuffer getFrameBuffer(const string&in); }
namespace Engine { Environment getMainEnvironment(); }
namespace Engine { Environment createEnvironment(); }
namespace UI { void setupAutomaticColumns(int); }
namespace UI { void setupColumns(int); }
namespace UI { void endColumns(); }
namespace UI { void nextColumn(); }
namespace Resource { int getResourceCount(ResourceType, const string&in); }
namespace Resource { string getResourceNameById(ResourceType, const string&in, int); }
namespace Resource { string getResourcePathById(ResourceType, const string&in, int); }
namespace Resource { int getDirCount(ResourceType, const string&in); }
namespace Resource { string getDirPathById(ResourceType, const string&in, int); }
namespace Resource { string getDirNameById(ResourceType, const string&in, int); }
namespace Engine { void print(const string&in); }
namespace UI { void treeNodeLeaf(const string&in, bool); }
namespace UI { bool treeNode(const string&in, bool, any@, ReciverFunc@); }
namespace UI { bool componentNode(const string&in, any@, ReciverFunc@); }
namespace UI { bool componentNode_contextMenu(const string&in, any@, ReciverFunc@, ReciverFunc@); }
namespace UI { void contextItemPopup(const string&in, any@, ReciverFunc@); }
namespace UI { void contextMenuPopup(const string&in, any@, ReciverFunc@); }
namespace UI { void modalPopup(const string&in, ReciverFunc@); }
namespace UI { void simplePopup(const string&in, ReciverFunc@); }
namespace UI { void openPopup(const string&in, any@); }
namespace UI { void closePopup(); }
namespace UI { void dragDropSource(const string&in, any@, const string&in); }
namespace UI { void dragDropTarget(const string&in, any@, TransferFunc@); }
//This file was generated automatically
funcdef bool T[]::less(const T&in a, const T&in b);
funcdef void ReciverFunc(any@);
funcdef void TransferFunc(any@, any@);
enum key {
A = 546,
B = 547,
C = 548,
D = 549,
E = 550,
F = 551,
G = 552,
H = 553,
I = 554,
J = 555,
K = 556,
L = 557,
M = 558,
N = 559,
O = 560,
P = 561,
Q = 562,
R = 563,
S = 564,
T = 565,
U = 566,
V = 567,
W = 568,
X = 569,
Y = 570,
Z = 571,
K0 = 536,
K1 = 537,
K2 = 538,
K3 = 539,
K4 = 540,
K5 = 541,
K6 = 542,
K7 = 543,
K8 = 544,
K9 = 545,
Tab = 512,
Enter = 525,
Escape = 526,
Backspace = 523,
Space = 524,
Delete = 522,
Insert = 521,
Home = 519,
End = 520,
PageUp = 517,
PageDown = 518,
Right = 514,
Up = 515,
Down = 516,
Left = 513,
RightCtrl = 531,
LeftShift = 528,
RightShift = 532,
LeftAlt = 529,
RightAlt = 533,
LeftSuper = 530,
RightSuper = 534,
LeftCtrl = 527,
MouseLeft = 641,
MouseRight = 642,
MouseMiddle = 643
}
enum ResourceType {
Mesh = 1,
Shader = 2
}
class string {
~string();
string();
string(const string&in);
string& opAssign(const string&in);
string& opAddAssign(const string&in);
bool opEquals(const string&in) const;
int opCmp(const string&in) const;
string opAdd(const string&in) const;
uint length() const;
void resize(uint);
bool isEmpty() const;
uint8& opIndex(uint);
const uint8& opIndex(uint) const;
string& opAssign(double);
string& opAddAssign(double);
string opAdd(double) const;
string opAdd_r(double) const;
string& opAssign(float);
string& opAddAssign(float);
string opAdd(float) const;
string opAdd_r(float) const;
string& opAssign(int64);
string& opAddAssign(int64);
string opAdd(int64) const;
string opAdd_r(int64) const;
string& opAssign(uint64);
string& opAddAssign(uint64);
string opAdd(uint64) const;
string opAdd_r(uint64) const;
string& opAssign(bool);
string& opAddAssign(bool);
string opAdd(bool) const;
string opAdd_r(bool) const;
string substr(uint start = 0, int count = - 1) const;
int findFirst(const string&in, uint start = 0) const;
int findFirstOf(const string&in, uint start = 0) const;
int findFirstNotOf(const string&in, uint start = 0) const;
int findLast(const string&in, int start = - 1) const;
int findLastOf(const string&in, int start = - 1) const;
int findLastNotOf(const string&in, int start = - 1) const;
void insert(uint pos, const string&in other);
void erase(uint pos, int count = - 1);
}
class array<T> {
T[]@ array(int&in);
T[]@ array(int&in, uint length);
T[]@ array(int&in, uint length, const T&in value);
T& opIndex(uint index);
const T& opIndex(uint index) const;
T[]& opAssign(const T[]&in);
void insertAt(uint index, const T&in value);
void insertAt(uint index, const T[]&inout arr);
void insertLast(const T&in value);
void removeAt(uint index);
void removeLast();
void removeRange(uint start, uint count);
uint length() const;
void reserve(uint length);
void resize(uint length);
void sortAsc();
void sortAsc(uint startAt, uint count);
void sortDesc();
void sortDesc(uint startAt, uint count);
void reverse();
int find(const T&in value) const;
int find(uint startAt, const T&in value) const;
int findByRef(const T&in value) const;
int findByRef(uint startAt, const T&in value) const;
bool opEquals(const T[]&in) const;
bool isEmpty() const;
void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 ));
funcdef bool less(const T&in, const T&in);
}
class dictionaryValue {
~dictionaryValue();
dictionaryValue();
dictionaryValue& opAssign(const dictionaryValue&in);
dictionaryValue& opHndlAssign(const ?&in);
dictionaryValue& opHndlAssign(const dictionaryValue&in);
dictionaryValue& opAssign(const ?&in);
dictionaryValue& opAssign(double);
dictionaryValue& opAssign(int64);
void opCast(?&out);
void opConv(?&out);
int64 opConv();
double opConv();
}
class dictionary {
dictionary@ dictionary();
dictionary& opAssign(const dictionary&in);
void set(const string&in, const ?&in);
bool get(const string&in, ?&out) const;
void set(const string&in, const int64&in);
bool get(const string&in, int64&out) const;
void set(const string&in, const double&in);
bool get(const string&in, double&out) const;
bool exists(const string&in) const;
bool isEmpty() const;
uint getSize() const;
bool delete(const string&in);
void deleteAll();
string[]@ getKeys() const;
dictionaryValue& opIndex(const string&in);
const dictionaryValue& opIndex(const string&in) const;
}
class ref {
~ref();
ref();
ref(const ref&in);
ref(const ?&in);
void opCast(?&out);
ref& opHndlAssign(const ref&in);
ref& opHndlAssign(const ?&in);
bool opEquals(const ref&in) const;
bool opEquals(const ?&in) const;
}
class any {
any@ any();
any@ any(?&in);
any@ any(const int64&in);
any@ any(const double&in);
any& opAssign(any&in);
void store(?&in);
void store(const int64&in);
void store(const double&in);
bool retrieve(?&out);
bool retrieve(int64&out);
bool retrieve(double&out);
}
class DockPanel {
void onRender();
}
class ServiceScript {
}
class Entity {
string get_name() const property;
void set_name(string&in) property;
int get_id() const property;
Entity createChild(const string&in);
bool get_isRoot() const property;
void destroy();
bool get_exists() const property;
Entity get_parent() property;
void set_parent(Entity) property;
bool isDescendantOf(Entity);
bool opEquals(const Entity&in) const;
EntityChilds get_childs() const property;
TransformComponent get_transform() const property;
MeshComponent getMeshComponent();
MeshComponent createMeshComponent();
bool hasMeshComponent();
void removeMeshComponent();
ShaderComponent getShaderComponent();
ShaderComponent createShaderComponent();
bool hasShaderComponent();
void removeShaderComponent();
CameraComponent getCameraComponent();
CameraComponent createCameraComponent();
bool hasCameraComponent();
void removeCameraComponent();
}
class EntityChilds {
int get_count() const property;
Entity opIndex(int) const;
}
class TransformComponent {
vec3 get_position() const property;
vec3 get_scale() const property;
vec3 get_rotation() const property;
void set_position(const vec3) property;
void set_scale(const vec3) property;
void set_rotation(const vec3) property;
}
class MeshComponent {
bool get_isActive() const property;
bool get_hasMesh() const property;
void clear();
string getMesh();
void setMesh(string&in);
void set_isActive(const bool) property;
}
class ShaderComponent {
bool get_hasShader() const property;
void clear();
string getShader();
void setShader(const string&in);
}
class CameraComponent {
float get_fov() const property;
float get_aspectRatio() const property;
float get_nearZ() const property;
float get_farZ() const property;
void set_fov(float) property;
void set_aspectRatio(float) property;
void set_nearZ(float) property;
void set_farZ(float) property;
}
class vec3 {
vec3();
vec3(float, float = 0, float = 0);
vec3 opAdd(const vec3&in);
vec3 opSub(const vec3&in) const;
vec3 opNeg() const;
vec3 opMul(float) const;
vec3 opMul_r(float) const;
float x;
float y;
float z;
}
class quat {
~quat();
quat();
quat(float, float, float, float);
quat opMul(const quat&in) const;
vec3 getEuler() const;
void setEuler(vec3);
float x;
float y;
float z;
float w;
}
class Transform {
Transform();
vec3 relative(vec3);
vec3 position;
vec3 scale;
quat rotation;
}
class Camera {
Camera();
float fov;
float aspect;
float nearZ;
float farZ;
}
class SceneCamera {
SceneCamera();
Camera camera;
Transform transform;
}
class FrameBuffer {
FrameBuffer();
void clearRGBA(int, int, int, int);
int get_height() const property;
void resize(int, int);
string get_name() const property;
bool isValid();
}
class Environment {
void render(FrameBuffer, SceneCamera&in);
Entity getRootEntity();
Entity getEntity(int);
}
string formatInt(int64 val, const string&in options = "", uint width = 0);
string formatUInt(uint64 val, const string&in options = "", uint width = 0);
string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0);
int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0);
uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0);
double parseFloat(const string&in, uint&out byteCount = 0);
namespace Engine { Entity getRoot(); }
namespace UI { bool button(const string&in); }
namespace UI { bool buttonCenter(const string&in); }
namespace UI { bool buttonEnd(const string&in); }
namespace UI { bool checkbox(const string&in, bool); }
namespace UI { bool checkboxDisabled(const string&in, bool); }
namespace UI { void drawFrameBuffer(FrameBuffer, int, int); }
namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); }
namespace UI { void drawIcon(const string&in, int); }
namespace UI { void drawIconCentered(const string&in, int); }
namespace UI { bool inputText(const string&in, const string&in, string&out); }
namespace UI { bool isItemClicked(int); }
namespace UI { bool isMouseDoubleClicked(int); }
namespace UI { float magicSlider(const string&in, float, float); }
namespace UI { vec3 magicSlider3(const string&in, vec3, float); }
namespace UI { bool menuItem(const string&in); }
namespace UI { void menuItemDisabled(const string&in); }
namespace UI { void menuSpace(const string&in, any@, ReciverFunc@); }
namespace UI { void sameline(); }
namespace UI { void separator(); }
namespace UI { void space(); }
namespace UI { void space(int, int = 10); }
namespace UI { void text(const string&in); }
namespace UI { void textCenter(const string&in); }
namespace UI { void textColor(float, float, float, const string&in); }
namespace UI { void textEnd(const string&in); }
namespace UI { void title(const string&in); }
namespace UI { void titleCenter(const string&in); }
namespace UI { void titleCenterY(const string&in, int); }
namespace UI { void titleEnd(const string&in); }
namespace UI { bool isKeyDown(key); }
namespace UI { bool isKeyPressed(key); }
namespace UI { bool isMouseDraggin(key); }
namespace UI { bool isPannelActive(); }
namespace UI { float getMouseDragDeltaX(); }
namespace UI { float getMouseDragDeltaY(); }
namespace UI { float getMouseDeltaX(); }
namespace UI { float getMouseDeltaY(); }
namespace UI { int getAvailableSizeX(); }
namespace UI { int getAvailableSizeY(); }
namespace UI { void disablePannelPadding(bool); }
namespace UI { int sliderInt(string&in, int, int, int); }
namespace UI { float slider(string&in, float, float, float); }
namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); }
namespace Engine { FrameBuffer getFrameBuffer(const string&in); }
namespace Engine { Environment getMainEnvironment(); }
namespace Engine { Environment createEnvironment(); }
namespace UI { void setupAutomaticColumns(int); }
namespace UI { void setupColumns(int); }
namespace UI { void endColumns(); }
namespace UI { void nextColumn(); }
namespace Resource { int getResourceCount(ResourceType, const string&in); }
namespace Resource { string getResourceNameById(ResourceType, const string&in, int); }
namespace Resource { string getResourcePathById(ResourceType, const string&in, int); }
namespace Resource { int getDirCount(ResourceType, const string&in); }
namespace Resource { string getDirPathById(ResourceType, const string&in, int); }
namespace Resource { string getDirNameById(ResourceType, const string&in, int); }
namespace Engine { void print(const string&in); }
namespace UI { void treeNodeLeaf(const string&in, bool); }
namespace UI { bool treeNode(const string&in, bool, any@, ReciverFunc@); }
namespace UI { bool componentNode(const string&in, any@, ReciverFunc@); }
namespace UI { bool componentNode_contextMenu(const string&in, any@, ReciverFunc@, ReciverFunc@); }
namespace UI { void contextItemPopup(const string&in, any@, ReciverFunc@); }
namespace UI { void contextMenuPopup(const string&in, any@, ReciverFunc@); }
namespace UI { void modalPopup(const string&in, ReciverFunc@); }
namespace UI { void simplePopup(const string&in, ReciverFunc@); }
namespace UI { void openPopup(const string&in, any@); }
namespace UI { void closePopup(); }
namespace UI { void dragDropSource(const string&in, any@, const string&in); }
namespace UI { void dragDropTarget(const string&in, any@, TransferFunc@); }
namespace Chewico::ActiveEntity::ActiveEntity { Entity getActiveEntity(); }
namespace Chewico::ActiveEntity::ActiveEntity { void setActiveEntity(Entity); }

View File

@ -0,0 +1,806 @@
//This file was generated automatically
funcdef bool T[]::less(const T&in a, const T&in b);
funcdef void ReciverFunc(any@);
funcdef void TransferFunc(any@, any@);
enum key {
A = 546,
B = 547,
C = 548,
D = 549,
E = 550,
F = 551,
G = 552,
H = 553,
I = 554,
J = 555,
K = 556,
L = 557,
M = 558,
N = 559,
O = 560,
P = 561,
Q = 562,
R = 563,
S = 564,
T = 565,
U = 566,
V = 567,
W = 568,
X = 569,
Y = 570,
Z = 571,
K0 = 536,
K1 = 537,
K2 = 538,
K3 = 539,
K4 = 540,
K5 = 541,
K6 = 542,
K7 = 543,
K8 = 544,
K9 = 545,
Tab = 512,
Enter = 525,
Escape = 526,
Backspace = 523,
Space = 524,
Delete = 522,
Insert = 521,
Home = 519,
End = 520,
PageUp = 517,
PageDown = 518,
Right = 514,
Up = 515,
Down = 516,
Left = 513,
RightCtrl = 531,
LeftShift = 528,
RightShift = 532,
LeftAlt = 529,
RightAlt = 533,
LeftSuper = 530,
RightSuper = 534,
LeftCtrl = 527,
MouseLeft = 641,
MouseRight = 642,
MouseMiddle = 643
}
enum ResourceType {
Mesh = 1,
Shader = 2
}
class string {
~string();
string();
string(const string&in);
string& opAssign(const string&in);
string& opAddAssign(const string&in);
bool opEquals(const string&in) const;
int opCmp(const string&in) const;
string opAdd(const string&in) const;
uint length() const;
void resize(uint);
bool isEmpty() const;
uint8& opIndex(uint);
const uint8& opIndex(uint) const;
string& opAssign(double);
string& opAddAssign(double);
string opAdd(double) const;
string opAdd_r(double) const;
string& opAssign(float);
string& opAddAssign(float);
string opAdd(float) const;
string opAdd_r(float) const;
string& opAssign(int64);
string& opAddAssign(int64);
string opAdd(int64) const;
string opAdd_r(int64) const;
string& opAssign(uint64);
string& opAddAssign(uint64);
string opAdd(uint64) const;
string opAdd_r(uint64) const;
string& opAssign(bool);
string& opAddAssign(bool);
string opAdd(bool) const;
string opAdd_r(bool) const;
string substr(uint start = 0, int count = - 1) const;
int findFirst(const string&in, uint start = 0) const;
int findFirstOf(const string&in, uint start = 0) const;
int findFirstNotOf(const string&in, uint start = 0) const;
int findLast(const string&in, int start = - 1) const;
int findLastOf(const string&in, int start = - 1) const;
int findLastNotOf(const string&in, int start = - 1) const;
void insert(uint pos, const string&in other);
void erase(uint pos, int count = - 1);
}
class array<T> {
T[]@ array(int&in);
T[]@ array(int&in, uint length);
T[]@ array(int&in, uint length, const T&in value);
T& opIndex(uint index);
const T& opIndex(uint index) const;
T[]& opAssign(const T[]&in);
void insertAt(uint index, const T&in value);
void insertAt(uint index, const T[]&inout arr);
void insertLast(const T&in value);
void removeAt(uint index);
void removeLast();
void removeRange(uint start, uint count);
uint length() const;
void reserve(uint length);
void resize(uint length);
void sortAsc();
void sortAsc(uint startAt, uint count);
void sortDesc();
void sortDesc(uint startAt, uint count);
void reverse();
int find(const T&in value) const;
int find(uint startAt, const T&in value) const;
int findByRef(const T&in value) const;
int findByRef(uint startAt, const T&in value) const;
bool opEquals(const T[]&in) const;
bool isEmpty() const;
void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 ));
funcdef bool less(const T&in, const T&in);
}
class dictionaryValue {
~dictionaryValue();
dictionaryValue();
dictionaryValue& opAssign(const dictionaryValue&in);
dictionaryValue& opHndlAssign(const ?&in);
dictionaryValue& opHndlAssign(const dictionaryValue&in);
dictionaryValue& opAssign(const ?&in);
dictionaryValue& opAssign(double);
dictionaryValue& opAssign(int64);
void opCast(?&out);
void opConv(?&out);
int64 opConv();
double opConv();
}
class dictionary {
dictionary@ dictionary();
dictionary& opAssign(const dictionary&in);
void set(const string&in, const ?&in);
bool get(const string&in, ?&out) const;
void set(const string&in, const int64&in);
bool get(const string&in, int64&out) const;
void set(const string&in, const double&in);
bool get(const string&in, double&out) const;
bool exists(const string&in) const;
bool isEmpty() const;
uint getSize() const;
bool delete(const string&in);
void deleteAll();
string[]@ getKeys() const;
dictionaryValue& opIndex(const string&in);
const dictionaryValue& opIndex(const string&in) const;
}
class ref {
~ref();
ref();
ref(const ref&in);
ref(const ?&in);
void opCast(?&out);
ref& opHndlAssign(const ref&in);
ref& opHndlAssign(const ?&in);
bool opEquals(const ref&in) const;
bool opEquals(const ?&in) const;
}
class any {
any@ any();
any@ any(?&in);
any@ any(const int64&in);
any@ any(const double&in);
any& opAssign(any&in);
void store(?&in);
void store(const int64&in);
void store(const double&in);
bool retrieve(?&out);
bool retrieve(int64&out);
bool retrieve(double&out);
}
class DockPanel {
void onRender();
}
class ServiceScript {
}
class Entity {
string get_name() const property;
void set_name(string&in) property;
int get_id() const property;
Entity createChild(const string&in);
bool get_isRoot() const property;
void destroy();
bool get_exists() const property;
Entity get_parent() property;
void set_parent(Entity) property;
bool isDescendantOf(Entity);
bool opEquals(const Entity&in) const;
EntityChilds get_childs() const property;
TransformComponent get_transform() const property;
MeshComponent getMeshComponent();
MeshComponent createMeshComponent();
bool hasMeshComponent();
void removeMeshComponent();
ShaderComponent getShaderComponent();
ShaderComponent createShaderComponent();
bool hasShaderComponent();
void removeShaderComponent();
CameraComponent getCameraComponent();
CameraComponent createCameraComponent();
bool hasCameraComponent();
void removeCameraComponent();
}
class EntityChilds {
int get_count() const property;
Entity opIndex(int) const;
}
class TransformComponent {
vec3 get_position() const property;
vec3 get_scale() const property;
vec3 get_rotation() const property;
void set_position(const vec3) property;
void set_scale(const vec3) property;
void set_rotation(const vec3) property;
}
class MeshComponent {
bool get_isActive() const property;
bool get_hasMesh() const property;
void clear();
string getMesh();
void setMesh(string&in);
void set_isActive(const bool) property;
}
class ShaderComponent {
bool get_hasShader() const property;
void clear();
string getShader();
void setShader(const string&in);
}
class CameraComponent {
float get_fov() const property;
float get_aspectRatio() const property;
float get_nearZ() const property;
float get_farZ() const property;
void set_fov(float) property;
void set_aspectRatio(float) property;
void set_nearZ(float) property;
void set_farZ(float) property;
}
class vec3 {
vec3();
vec3(float, float = 0, float = 0);
vec3 opAdd(const vec3&in);
vec3 opSub(const vec3&in) const;
vec3 opNeg() const;
vec3 opMul(float) const;
vec3 opMul_r(float) const;
float x;
float y;
float z;
}
class quat {
~quat();
quat();
quat(float, float, float, float);
quat opMul(const quat&in) const;
vec3 getEuler() const;
void setEuler(vec3);
float x;
float y;
float z;
float w;
}
class Transform {
Transform();
vec3 relative(vec3);
vec3 position;
vec3 scale;
quat rotation;
}
class Camera {
Camera();
float fov;
float aspect;
float nearZ;
float farZ;
}
class SceneCamera {
SceneCamera();
Camera camera;
Transform transform;
}
class FrameBuffer {
FrameBuffer();
void clearRGBA(int, int, int, int);
int get_height() const property;
void resize(int, int);
string get_name() const property;
bool isValid();
}
class Environment {
void render(FrameBuffer, SceneCamera&in);
Entity getRootEntity();
Entity getEntity(int);
}
string formatInt(int64 val, const string&in options = "", uint width = 0);
string formatUInt(uint64 val, const string&in options = "", uint width = 0);
string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0);
int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0);
uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0);
double parseFloat(const string&in, uint&out byteCount = 0);
namespace Engine { Entity getRoot(); }
namespace UI { bool button(const string&in); }
namespace UI { bool buttonCenter(const string&in); }
namespace UI { bool buttonEnd(const string&in); }
namespace UI { bool checkbox(const string&in, bool); }
namespace UI { bool checkboxDisabled(const string&in, bool); }
namespace UI { void drawFrameBuffer(FrameBuffer, int, int); }
namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); }
namespace UI { void drawIcon(const string&in, int); }
namespace UI { void drawIconCentered(const string&in, int); }
namespace UI { bool inputText(const string&in, const string&in, string&out); }
namespace UI { bool isItemClicked(int); }
namespace UI { bool isMouseDoubleClicked(int); }
namespace UI { float magicSlider(const string&in, float, float); }
namespace UI { vec3 magicSlider3(const string&in, vec3, float); }
namespace UI { bool menuItem(const string&in); }
namespace UI { void menuItemDisabled(const string&in); }
namespace UI { void menuSpace(const string&in, any@, ReciverFunc@); }
namespace UI { void sameline(); }
namespace UI { void separator(); }
namespace UI { void space(); }
namespace UI { void space(int, int = 10); }
namespace UI { void text(const string&in); }
namespace UI { void textCenter(const string&in); }
namespace UI { void textColor(float, float, float, const string&in); }
namespace UI { void textEnd(const string&in); }
namespace UI { void title(const string&in); }
namespace UI { void titleCenter(const string&in); }
namespace UI { void titleCenterY(const string&in, int); }
namespace UI { void titleEnd(const string&in); }
namespace UI { bool isKeyDown(key); }
namespace UI { bool isKeyPressed(key); }
namespace UI { bool isMouseDraggin(key); }
namespace UI { bool isPannelActive(); }
namespace UI { float getMouseDragDeltaX(); }
namespace UI { float getMouseDragDeltaY(); }
namespace UI { float getMouseDeltaX(); }
namespace UI { float getMouseDeltaY(); }
namespace UI { int getAvailableSizeX(); }
namespace UI { int getAvailableSizeY(); }
namespace UI { void disablePannelPadding(bool); }
namespace UI { int sliderInt(string&in, int, int, int); }
namespace UI { float slider(string&in, float, float, float); }
namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); }
namespace Engine { FrameBuffer getFrameBuffer(const string&in); }
namespace Engine { Environment getMainEnvironment(); }
namespace Engine { Environment createEnvironment(); }
namespace UI { void setupAutomaticColumns(int); }
namespace UI { void setupColumns(int); }
namespace UI { void endColumns(); }
namespace UI { void nextColumn(); }
namespace Resource { int getResourceCount(ResourceType, const string&in); }
namespace Resource { string getResourceNameById(ResourceType, const string&in, int); }
namespace Resource { string getResourcePathById(ResourceType, const string&in, int); }
namespace Resource { int getDirCount(ResourceType, const string&in); }
namespace Resource { string getDirPathById(ResourceType, const string&in, int); }
namespace Resource { string getDirNameById(ResourceType, const string&in, int); }
namespace Engine { void print(const string&in); }
namespace UI { void treeNodeLeaf(const string&in, bool); }
namespace UI { bool treeNode(const string&in, bool, any@, ReciverFunc@); }
namespace UI { bool componentNode(const string&in, any@, ReciverFunc@); }
namespace UI { bool componentNode_contextMenu(const string&in, any@, ReciverFunc@, ReciverFunc@); }
namespace UI { void contextItemPopup(const string&in, any@, ReciverFunc@); }
namespace UI { void contextMenuPopup(const string&in, any@, ReciverFunc@); }
namespace UI { void modalPopup(const string&in, ReciverFunc@); }
namespace UI { void simplePopup(const string&in, ReciverFunc@); }
namespace UI { void openPopup(const string&in, any@); }
namespace UI { void closePopup(); }
namespace UI { void dragDropSource(const string&in, any@, const string&in); }
namespace UI { void dragDropTarget(const string&in, any@, TransferFunc@); }
//This file was generated automatically
funcdef bool T[]::less(const T&in a, const T&in b);
funcdef void ReciverFunc(any@);
funcdef void TransferFunc(any@, any@);
enum key {
A = 546,
B = 547,
C = 548,
D = 549,
E = 550,
F = 551,
G = 552,
H = 553,
I = 554,
J = 555,
K = 556,
L = 557,
M = 558,
N = 559,
O = 560,
P = 561,
Q = 562,
R = 563,
S = 564,
T = 565,
U = 566,
V = 567,
W = 568,
X = 569,
Y = 570,
Z = 571,
K0 = 536,
K1 = 537,
K2 = 538,
K3 = 539,
K4 = 540,
K5 = 541,
K6 = 542,
K7 = 543,
K8 = 544,
K9 = 545,
Tab = 512,
Enter = 525,
Escape = 526,
Backspace = 523,
Space = 524,
Delete = 522,
Insert = 521,
Home = 519,
End = 520,
PageUp = 517,
PageDown = 518,
Right = 514,
Up = 515,
Down = 516,
Left = 513,
RightCtrl = 531,
LeftShift = 528,
RightShift = 532,
LeftAlt = 529,
RightAlt = 533,
LeftSuper = 530,
RightSuper = 534,
LeftCtrl = 527,
MouseLeft = 641,
MouseRight = 642,
MouseMiddle = 643
}
enum ResourceType {
Mesh = 1,
Shader = 2
}
class string {
~string();
string();
string(const string&in);
string& opAssign(const string&in);
string& opAddAssign(const string&in);
bool opEquals(const string&in) const;
int opCmp(const string&in) const;
string opAdd(const string&in) const;
uint length() const;
void resize(uint);
bool isEmpty() const;
uint8& opIndex(uint);
const uint8& opIndex(uint) const;
string& opAssign(double);
string& opAddAssign(double);
string opAdd(double) const;
string opAdd_r(double) const;
string& opAssign(float);
string& opAddAssign(float);
string opAdd(float) const;
string opAdd_r(float) const;
string& opAssign(int64);
string& opAddAssign(int64);
string opAdd(int64) const;
string opAdd_r(int64) const;
string& opAssign(uint64);
string& opAddAssign(uint64);
string opAdd(uint64) const;
string opAdd_r(uint64) const;
string& opAssign(bool);
string& opAddAssign(bool);
string opAdd(bool) const;
string opAdd_r(bool) const;
string substr(uint start = 0, int count = - 1) const;
int findFirst(const string&in, uint start = 0) const;
int findFirstOf(const string&in, uint start = 0) const;
int findFirstNotOf(const string&in, uint start = 0) const;
int findLast(const string&in, int start = - 1) const;
int findLastOf(const string&in, int start = - 1) const;
int findLastNotOf(const string&in, int start = - 1) const;
void insert(uint pos, const string&in other);
void erase(uint pos, int count = - 1);
}
class array<T> {
T[]@ array(int&in);
T[]@ array(int&in, uint length);
T[]@ array(int&in, uint length, const T&in value);
T& opIndex(uint index);
const T& opIndex(uint index) const;
T[]& opAssign(const T[]&in);
void insertAt(uint index, const T&in value);
void insertAt(uint index, const T[]&inout arr);
void insertLast(const T&in value);
void removeAt(uint index);
void removeLast();
void removeRange(uint start, uint count);
uint length() const;
void reserve(uint length);
void resize(uint length);
void sortAsc();
void sortAsc(uint startAt, uint count);
void sortDesc();
void sortDesc(uint startAt, uint count);
void reverse();
int find(const T&in value) const;
int find(uint startAt, const T&in value) const;
int findByRef(const T&in value) const;
int findByRef(uint startAt, const T&in value) const;
bool opEquals(const T[]&in) const;
bool isEmpty() const;
void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 ));
funcdef bool less(const T&in, const T&in);
}
class dictionaryValue {
~dictionaryValue();
dictionaryValue();
dictionaryValue& opAssign(const dictionaryValue&in);
dictionaryValue& opHndlAssign(const ?&in);
dictionaryValue& opHndlAssign(const dictionaryValue&in);
dictionaryValue& opAssign(const ?&in);
dictionaryValue& opAssign(double);
dictionaryValue& opAssign(int64);
void opCast(?&out);
void opConv(?&out);
int64 opConv();
double opConv();
}
class dictionary {
dictionary@ dictionary();
dictionary& opAssign(const dictionary&in);
void set(const string&in, const ?&in);
bool get(const string&in, ?&out) const;
void set(const string&in, const int64&in);
bool get(const string&in, int64&out) const;
void set(const string&in, const double&in);
bool get(const string&in, double&out) const;
bool exists(const string&in) const;
bool isEmpty() const;
uint getSize() const;
bool delete(const string&in);
void deleteAll();
string[]@ getKeys() const;
dictionaryValue& opIndex(const string&in);
const dictionaryValue& opIndex(const string&in) const;
}
class ref {
~ref();
ref();
ref(const ref&in);
ref(const ?&in);
void opCast(?&out);
ref& opHndlAssign(const ref&in);
ref& opHndlAssign(const ?&in);
bool opEquals(const ref&in) const;
bool opEquals(const ?&in) const;
}
class any {
any@ any();
any@ any(?&in);
any@ any(const int64&in);
any@ any(const double&in);
any& opAssign(any&in);
void store(?&in);
void store(const int64&in);
void store(const double&in);
bool retrieve(?&out);
bool retrieve(int64&out);
bool retrieve(double&out);
}
class DockPanel {
void onRender();
}
class ServiceScript {
}
class Entity {
string get_name() const property;
void set_name(string&in) property;
int get_id() const property;
Entity createChild(const string&in);
bool get_isRoot() const property;
void destroy();
bool get_exists() const property;
Entity get_parent() property;
void set_parent(Entity) property;
bool isDescendantOf(Entity);
bool opEquals(const Entity&in) const;
EntityChilds get_childs() const property;
TransformComponent get_transform() const property;
MeshComponent getMeshComponent();
MeshComponent createMeshComponent();
bool hasMeshComponent();
void removeMeshComponent();
ShaderComponent getShaderComponent();
ShaderComponent createShaderComponent();
bool hasShaderComponent();
void removeShaderComponent();
CameraComponent getCameraComponent();
CameraComponent createCameraComponent();
bool hasCameraComponent();
void removeCameraComponent();
}
class EntityChilds {
int get_count() const property;
Entity opIndex(int) const;
}
class TransformComponent {
vec3 get_position() const property;
vec3 get_scale() const property;
vec3 get_rotation() const property;
void set_position(const vec3) property;
void set_scale(const vec3) property;
void set_rotation(const vec3) property;
}
class MeshComponent {
bool get_isActive() const property;
bool get_hasMesh() const property;
void clear();
string getMesh();
void setMesh(string&in);
void set_isActive(const bool) property;
}
class ShaderComponent {
bool get_hasShader() const property;
void clear();
string getShader();
void setShader(const string&in);
}
class CameraComponent {
float get_fov() const property;
float get_aspectRatio() const property;
float get_nearZ() const property;
float get_farZ() const property;
void set_fov(float) property;
void set_aspectRatio(float) property;
void set_nearZ(float) property;
void set_farZ(float) property;
}
class vec3 {
vec3();
vec3(float, float = 0, float = 0);
vec3 opAdd(const vec3&in);
vec3 opSub(const vec3&in) const;
vec3 opNeg() const;
vec3 opMul(float) const;
vec3 opMul_r(float) const;
float x;
float y;
float z;
}
class quat {
~quat();
quat();
quat(float, float, float, float);
quat opMul(const quat&in) const;
vec3 getEuler() const;
void setEuler(vec3);
float x;
float y;
float z;
float w;
}
class Transform {
Transform();
vec3 relative(vec3);
vec3 position;
vec3 scale;
quat rotation;
}
class Camera {
Camera();
float fov;
float aspect;
float nearZ;
float farZ;
}
class SceneCamera {
SceneCamera();
Camera camera;
Transform transform;
}
class FrameBuffer {
FrameBuffer();
void clearRGBA(int, int, int, int);
int get_height() const property;
void resize(int, int);
string get_name() const property;
bool isValid();
}
class Environment {
void render(FrameBuffer, SceneCamera&in);
Entity getRootEntity();
Entity getEntity(int);
}
string formatInt(int64 val, const string&in options = "", uint width = 0);
string formatUInt(uint64 val, const string&in options = "", uint width = 0);
string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0);
int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0);
uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0);
double parseFloat(const string&in, uint&out byteCount = 0);
namespace Engine { Entity getRoot(); }
namespace UI { bool button(const string&in); }
namespace UI { bool buttonCenter(const string&in); }
namespace UI { bool buttonEnd(const string&in); }
namespace UI { bool checkbox(const string&in, bool); }
namespace UI { bool checkboxDisabled(const string&in, bool); }
namespace UI { void drawFrameBuffer(FrameBuffer, int, int); }
namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); }
namespace UI { void drawIcon(const string&in, int); }
namespace UI { void drawIconCentered(const string&in, int); }
namespace UI { bool inputText(const string&in, const string&in, string&out); }
namespace UI { bool isItemClicked(int); }
namespace UI { bool isMouseDoubleClicked(int); }
namespace UI { float magicSlider(const string&in, float, float); }
namespace UI { vec3 magicSlider3(const string&in, vec3, float); }
namespace UI { bool menuItem(const string&in); }
namespace UI { void menuItemDisabled(const string&in); }
namespace UI { void menuSpace(const string&in, any@, ReciverFunc@); }
namespace UI { void sameline(); }
namespace UI { void separator(); }
namespace UI { void space(); }
namespace UI { void space(int, int = 10); }
namespace UI { void text(const string&in); }
namespace UI { void textCenter(const string&in); }
namespace UI { void textColor(float, float, float, const string&in); }
namespace UI { void textEnd(const string&in); }
namespace UI { void title(const string&in); }
namespace UI { void titleCenter(const string&in); }
namespace UI { void titleCenterY(const string&in, int); }
namespace UI { void titleEnd(const string&in); }
namespace UI { bool isKeyDown(key); }
namespace UI { bool isKeyPressed(key); }
namespace UI { bool isMouseDraggin(key); }
namespace UI { bool isPannelActive(); }
namespace UI { float getMouseDragDeltaX(); }
namespace UI { float getMouseDragDeltaY(); }
namespace UI { float getMouseDeltaX(); }
namespace UI { float getMouseDeltaY(); }
namespace UI { int getAvailableSizeX(); }
namespace UI { int getAvailableSizeY(); }
namespace UI { void disablePannelPadding(bool); }
namespace UI { int sliderInt(string&in, int, int, int); }
namespace UI { float slider(string&in, float, float, float); }
namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); }
namespace Engine { FrameBuffer getFrameBuffer(const string&in); }
namespace Engine { Environment getMainEnvironment(); }
namespace Engine { Environment createEnvironment(); }
namespace UI { void setupAutomaticColumns(int); }
namespace UI { void setupColumns(int); }
namespace UI { void endColumns(); }
namespace UI { void nextColumn(); }
namespace Resource { int getResourceCount(ResourceType, const string&in); }
namespace Resource { string getResourceNameById(ResourceType, const string&in, int); }
namespace Resource { string getResourcePathById(ResourceType, const string&in, int); }
namespace Resource { int getDirCount(ResourceType, const string&in); }
namespace Resource { string getDirPathById(ResourceType, const string&in, int); }
namespace Resource { string getDirNameById(ResourceType, const string&in, int); }
namespace Engine { void print(const string&in); }
namespace UI { void treeNodeLeaf(const string&in, bool); }
namespace UI { bool treeNode(const string&in, bool, any@, ReciverFunc@); }
namespace UI { bool componentNode(const string&in, any@, ReciverFunc@); }
namespace UI { bool componentNode_contextMenu(const string&in, any@, ReciverFunc@, ReciverFunc@); }
namespace UI { void contextItemPopup(const string&in, any@, ReciverFunc@); }
namespace UI { void contextMenuPopup(const string&in, any@, ReciverFunc@); }
namespace UI { void modalPopup(const string&in, ReciverFunc@); }
namespace UI { void simplePopup(const string&in, ReciverFunc@); }
namespace UI { void openPopup(const string&in, any@); }
namespace UI { void closePopup(); }
namespace UI { void dragDropSource(const string&in, any@, const string&in); }
namespace UI { void dragDropTarget(const string&in, any@, TransferFunc@); }
namespace Chewico::ActiveEntity::ActiveEntity { Entity getActiveEntity(); }
namespace Chewico::ActiveEntity::ActiveEntity { void setActiveEntity(Entity); }

View File

@ -0,0 +1,6 @@
class Test : DockPanel {
void onRender() {
UI::text("Hi");
Chewico::ActiveEntity::ActiveEntity::getActiveEntity();
}
}

View File

@ -0,0 +1,806 @@
//This file was generated automatically
funcdef bool T[]::less(const T&in a, const T&in b);
funcdef void ReciverFunc(any@);
funcdef void TransferFunc(any@, any@);
enum key {
A = 546,
B = 547,
C = 548,
D = 549,
E = 550,
F = 551,
G = 552,
H = 553,
I = 554,
J = 555,
K = 556,
L = 557,
M = 558,
N = 559,
O = 560,
P = 561,
Q = 562,
R = 563,
S = 564,
T = 565,
U = 566,
V = 567,
W = 568,
X = 569,
Y = 570,
Z = 571,
K0 = 536,
K1 = 537,
K2 = 538,
K3 = 539,
K4 = 540,
K5 = 541,
K6 = 542,
K7 = 543,
K8 = 544,
K9 = 545,
Tab = 512,
Enter = 525,
Escape = 526,
Backspace = 523,
Space = 524,
Delete = 522,
Insert = 521,
Home = 519,
End = 520,
PageUp = 517,
PageDown = 518,
Right = 514,
Up = 515,
Down = 516,
Left = 513,
RightCtrl = 531,
LeftShift = 528,
RightShift = 532,
LeftAlt = 529,
RightAlt = 533,
LeftSuper = 530,
RightSuper = 534,
LeftCtrl = 527,
MouseLeft = 641,
MouseRight = 642,
MouseMiddle = 643
}
enum ResourceType {
Mesh = 1,
Shader = 2
}
class string {
~string();
string();
string(const string&in);
string& opAssign(const string&in);
string& opAddAssign(const string&in);
bool opEquals(const string&in) const;
int opCmp(const string&in) const;
string opAdd(const string&in) const;
uint length() const;
void resize(uint);
bool isEmpty() const;
uint8& opIndex(uint);
const uint8& opIndex(uint) const;
string& opAssign(double);
string& opAddAssign(double);
string opAdd(double) const;
string opAdd_r(double) const;
string& opAssign(float);
string& opAddAssign(float);
string opAdd(float) const;
string opAdd_r(float) const;
string& opAssign(int64);
string& opAddAssign(int64);
string opAdd(int64) const;
string opAdd_r(int64) const;
string& opAssign(uint64);
string& opAddAssign(uint64);
string opAdd(uint64) const;
string opAdd_r(uint64) const;
string& opAssign(bool);
string& opAddAssign(bool);
string opAdd(bool) const;
string opAdd_r(bool) const;
string substr(uint start = 0, int count = - 1) const;
int findFirst(const string&in, uint start = 0) const;
int findFirstOf(const string&in, uint start = 0) const;
int findFirstNotOf(const string&in, uint start = 0) const;
int findLast(const string&in, int start = - 1) const;
int findLastOf(const string&in, int start = - 1) const;
int findLastNotOf(const string&in, int start = - 1) const;
void insert(uint pos, const string&in other);
void erase(uint pos, int count = - 1);
}
class array<T> {
T[]@ array(int&in);
T[]@ array(int&in, uint length);
T[]@ array(int&in, uint length, const T&in value);
T& opIndex(uint index);
const T& opIndex(uint index) const;
T[]& opAssign(const T[]&in);
void insertAt(uint index, const T&in value);
void insertAt(uint index, const T[]&inout arr);
void insertLast(const T&in value);
void removeAt(uint index);
void removeLast();
void removeRange(uint start, uint count);
uint length() const;
void reserve(uint length);
void resize(uint length);
void sortAsc();
void sortAsc(uint startAt, uint count);
void sortDesc();
void sortDesc(uint startAt, uint count);
void reverse();
int find(const T&in value) const;
int find(uint startAt, const T&in value) const;
int findByRef(const T&in value) const;
int findByRef(uint startAt, const T&in value) const;
bool opEquals(const T[]&in) const;
bool isEmpty() const;
void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 ));
funcdef bool less(const T&in, const T&in);
}
class dictionaryValue {
~dictionaryValue();
dictionaryValue();
dictionaryValue& opAssign(const dictionaryValue&in);
dictionaryValue& opHndlAssign(const ?&in);
dictionaryValue& opHndlAssign(const dictionaryValue&in);
dictionaryValue& opAssign(const ?&in);
dictionaryValue& opAssign(double);
dictionaryValue& opAssign(int64);
void opCast(?&out);
void opConv(?&out);
int64 opConv();
double opConv();
}
class dictionary {
dictionary@ dictionary();
dictionary& opAssign(const dictionary&in);
void set(const string&in, const ?&in);
bool get(const string&in, ?&out) const;
void set(const string&in, const int64&in);
bool get(const string&in, int64&out) const;
void set(const string&in, const double&in);
bool get(const string&in, double&out) const;
bool exists(const string&in) const;
bool isEmpty() const;
uint getSize() const;
bool delete(const string&in);
void deleteAll();
string[]@ getKeys() const;
dictionaryValue& opIndex(const string&in);
const dictionaryValue& opIndex(const string&in) const;
}
class ref {
~ref();
ref();
ref(const ref&in);
ref(const ?&in);
void opCast(?&out);
ref& opHndlAssign(const ref&in);
ref& opHndlAssign(const ?&in);
bool opEquals(const ref&in) const;
bool opEquals(const ?&in) const;
}
class any {
any@ any();
any@ any(?&in);
any@ any(const int64&in);
any@ any(const double&in);
any& opAssign(any&in);
void store(?&in);
void store(const int64&in);
void store(const double&in);
bool retrieve(?&out);
bool retrieve(int64&out);
bool retrieve(double&out);
}
class DockPanel {
void onRender();
}
class ServiceScript {
}
class Entity {
string get_name() const property;
void set_name(string&in) property;
int get_id() const property;
Entity createChild(const string&in);
bool get_isRoot() const property;
void destroy();
bool get_exists() const property;
Entity get_parent() property;
void set_parent(Entity) property;
bool isDescendantOf(Entity);
bool opEquals(const Entity&in) const;
EntityChilds get_childs() const property;
TransformComponent get_transform() const property;
MeshComponent getMeshComponent();
MeshComponent createMeshComponent();
bool hasMeshComponent();
void removeMeshComponent();
ShaderComponent getShaderComponent();
ShaderComponent createShaderComponent();
bool hasShaderComponent();
void removeShaderComponent();
CameraComponent getCameraComponent();
CameraComponent createCameraComponent();
bool hasCameraComponent();
void removeCameraComponent();
}
class EntityChilds {
int get_count() const property;
Entity opIndex(int) const;
}
class TransformComponent {
vec3 get_position() const property;
vec3 get_scale() const property;
vec3 get_rotation() const property;
void set_position(const vec3) property;
void set_scale(const vec3) property;
void set_rotation(const vec3) property;
}
class MeshComponent {
bool get_isActive() const property;
bool get_hasMesh() const property;
void clear();
string getMesh();
void setMesh(string&in);
void set_isActive(const bool) property;
}
class ShaderComponent {
bool get_hasShader() const property;
void clear();
string getShader();
void setShader(const string&in);
}
class CameraComponent {
float get_fov() const property;
float get_aspectRatio() const property;
float get_nearZ() const property;
float get_farZ() const property;
void set_fov(float) property;
void set_aspectRatio(float) property;
void set_nearZ(float) property;
void set_farZ(float) property;
}
class vec3 {
vec3();
vec3(float, float = 0, float = 0);
vec3 opAdd(const vec3&in);
vec3 opSub(const vec3&in) const;
vec3 opNeg() const;
vec3 opMul(float) const;
vec3 opMul_r(float) const;
float x;
float y;
float z;
}
class quat {
~quat();
quat();
quat(float, float, float, float);
quat opMul(const quat&in) const;
vec3 getEuler() const;
void setEuler(vec3);
float x;
float y;
float z;
float w;
}
class Transform {
Transform();
vec3 relative(vec3);
vec3 position;
vec3 scale;
quat rotation;
}
class Camera {
Camera();
float fov;
float aspect;
float nearZ;
float farZ;
}
class SceneCamera {
SceneCamera();
Camera camera;
Transform transform;
}
class FrameBuffer {
FrameBuffer();
void clearRGBA(int, int, int, int);
int get_height() const property;
void resize(int, int);
string get_name() const property;
bool isValid();
}
class Environment {
void render(FrameBuffer, SceneCamera&in);
Entity getRootEntity();
Entity getEntity(int);
}
string formatInt(int64 val, const string&in options = "", uint width = 0);
string formatUInt(uint64 val, const string&in options = "", uint width = 0);
string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0);
int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0);
uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0);
double parseFloat(const string&in, uint&out byteCount = 0);
namespace Engine { Entity getRoot(); }
namespace UI { bool button(const string&in); }
namespace UI { bool buttonCenter(const string&in); }
namespace UI { bool buttonEnd(const string&in); }
namespace UI { bool checkbox(const string&in, bool); }
namespace UI { bool checkboxDisabled(const string&in, bool); }
namespace UI { void drawFrameBuffer(FrameBuffer, int, int); }
namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); }
namespace UI { void drawIcon(const string&in, int); }
namespace UI { void drawIconCentered(const string&in, int); }
namespace UI { bool inputText(const string&in, const string&in, string&out); }
namespace UI { bool isItemClicked(int); }
namespace UI { bool isMouseDoubleClicked(int); }
namespace UI { float magicSlider(const string&in, float, float); }
namespace UI { vec3 magicSlider3(const string&in, vec3, float); }
namespace UI { bool menuItem(const string&in); }
namespace UI { void menuItemDisabled(const string&in); }
namespace UI { void menuSpace(const string&in, any@, ReciverFunc@); }
namespace UI { void sameline(); }
namespace UI { void separator(); }
namespace UI { void space(); }
namespace UI { void space(int, int = 10); }
namespace UI { void text(const string&in); }
namespace UI { void textCenter(const string&in); }
namespace UI { void textColor(float, float, float, const string&in); }
namespace UI { void textEnd(const string&in); }
namespace UI { void title(const string&in); }
namespace UI { void titleCenter(const string&in); }
namespace UI { void titleCenterY(const string&in, int); }
namespace UI { void titleEnd(const string&in); }
namespace UI { bool isKeyDown(key); }
namespace UI { bool isKeyPressed(key); }
namespace UI { bool isMouseDraggin(key); }
namespace UI { bool isPannelActive(); }
namespace UI { float getMouseDragDeltaX(); }
namespace UI { float getMouseDragDeltaY(); }
namespace UI { float getMouseDeltaX(); }
namespace UI { float getMouseDeltaY(); }
namespace UI { int getAvailableSizeX(); }
namespace UI { int getAvailableSizeY(); }
namespace UI { void disablePannelPadding(bool); }
namespace UI { int sliderInt(string&in, int, int, int); }
namespace UI { float slider(string&in, float, float, float); }
namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); }
namespace Engine { FrameBuffer getFrameBuffer(const string&in); }
namespace Engine { Environment getMainEnvironment(); }
namespace Engine { Environment createEnvironment(); }
namespace UI { void setupAutomaticColumns(int); }
namespace UI { void setupColumns(int); }
namespace UI { void endColumns(); }
namespace UI { void nextColumn(); }
namespace Resource { int getResourceCount(ResourceType, const string&in); }
namespace Resource { string getResourceNameById(ResourceType, const string&in, int); }
namespace Resource { string getResourcePathById(ResourceType, const string&in, int); }
namespace Resource { int getDirCount(ResourceType, const string&in); }
namespace Resource { string getDirPathById(ResourceType, const string&in, int); }
namespace Resource { string getDirNameById(ResourceType, const string&in, int); }
namespace Engine { void print(const string&in); }
namespace UI { void treeNodeLeaf(const string&in, bool); }
namespace UI { bool treeNode(const string&in, bool, any@, ReciverFunc@); }
namespace UI { bool componentNode(const string&in, any@, ReciverFunc@); }
namespace UI { bool componentNode_contextMenu(const string&in, any@, ReciverFunc@, ReciverFunc@); }
namespace UI { void contextItemPopup(const string&in, any@, ReciverFunc@); }
namespace UI { void contextMenuPopup(const string&in, any@, ReciverFunc@); }
namespace UI { void modalPopup(const string&in, ReciverFunc@); }
namespace UI { void simplePopup(const string&in, ReciverFunc@); }
namespace UI { void openPopup(const string&in, any@); }
namespace UI { void closePopup(); }
namespace UI { void dragDropSource(const string&in, any@, const string&in); }
namespace UI { void dragDropTarget(const string&in, any@, TransferFunc@); }
//This file was generated automatically
funcdef bool T[]::less(const T&in a, const T&in b);
funcdef void ReciverFunc(any@);
funcdef void TransferFunc(any@, any@);
enum key {
A = 546,
B = 547,
C = 548,
D = 549,
E = 550,
F = 551,
G = 552,
H = 553,
I = 554,
J = 555,
K = 556,
L = 557,
M = 558,
N = 559,
O = 560,
P = 561,
Q = 562,
R = 563,
S = 564,
T = 565,
U = 566,
V = 567,
W = 568,
X = 569,
Y = 570,
Z = 571,
K0 = 536,
K1 = 537,
K2 = 538,
K3 = 539,
K4 = 540,
K5 = 541,
K6 = 542,
K7 = 543,
K8 = 544,
K9 = 545,
Tab = 512,
Enter = 525,
Escape = 526,
Backspace = 523,
Space = 524,
Delete = 522,
Insert = 521,
Home = 519,
End = 520,
PageUp = 517,
PageDown = 518,
Right = 514,
Up = 515,
Down = 516,
Left = 513,
RightCtrl = 531,
LeftShift = 528,
RightShift = 532,
LeftAlt = 529,
RightAlt = 533,
LeftSuper = 530,
RightSuper = 534,
LeftCtrl = 527,
MouseLeft = 641,
MouseRight = 642,
MouseMiddle = 643
}
enum ResourceType {
Mesh = 1,
Shader = 2
}
class string {
~string();
string();
string(const string&in);
string& opAssign(const string&in);
string& opAddAssign(const string&in);
bool opEquals(const string&in) const;
int opCmp(const string&in) const;
string opAdd(const string&in) const;
uint length() const;
void resize(uint);
bool isEmpty() const;
uint8& opIndex(uint);
const uint8& opIndex(uint) const;
string& opAssign(double);
string& opAddAssign(double);
string opAdd(double) const;
string opAdd_r(double) const;
string& opAssign(float);
string& opAddAssign(float);
string opAdd(float) const;
string opAdd_r(float) const;
string& opAssign(int64);
string& opAddAssign(int64);
string opAdd(int64) const;
string opAdd_r(int64) const;
string& opAssign(uint64);
string& opAddAssign(uint64);
string opAdd(uint64) const;
string opAdd_r(uint64) const;
string& opAssign(bool);
string& opAddAssign(bool);
string opAdd(bool) const;
string opAdd_r(bool) const;
string substr(uint start = 0, int count = - 1) const;
int findFirst(const string&in, uint start = 0) const;
int findFirstOf(const string&in, uint start = 0) const;
int findFirstNotOf(const string&in, uint start = 0) const;
int findLast(const string&in, int start = - 1) const;
int findLastOf(const string&in, int start = - 1) const;
int findLastNotOf(const string&in, int start = - 1) const;
void insert(uint pos, const string&in other);
void erase(uint pos, int count = - 1);
}
class array<T> {
T[]@ array(int&in);
T[]@ array(int&in, uint length);
T[]@ array(int&in, uint length, const T&in value);
T& opIndex(uint index);
const T& opIndex(uint index) const;
T[]& opAssign(const T[]&in);
void insertAt(uint index, const T&in value);
void insertAt(uint index, const T[]&inout arr);
void insertLast(const T&in value);
void removeAt(uint index);
void removeLast();
void removeRange(uint start, uint count);
uint length() const;
void reserve(uint length);
void resize(uint length);
void sortAsc();
void sortAsc(uint startAt, uint count);
void sortDesc();
void sortDesc(uint startAt, uint count);
void reverse();
int find(const T&in value) const;
int find(uint startAt, const T&in value) const;
int findByRef(const T&in value) const;
int findByRef(uint startAt, const T&in value) const;
bool opEquals(const T[]&in) const;
bool isEmpty() const;
void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 ));
funcdef bool less(const T&in, const T&in);
}
class dictionaryValue {
~dictionaryValue();
dictionaryValue();
dictionaryValue& opAssign(const dictionaryValue&in);
dictionaryValue& opHndlAssign(const ?&in);
dictionaryValue& opHndlAssign(const dictionaryValue&in);
dictionaryValue& opAssign(const ?&in);
dictionaryValue& opAssign(double);
dictionaryValue& opAssign(int64);
void opCast(?&out);
void opConv(?&out);
int64 opConv();
double opConv();
}
class dictionary {
dictionary@ dictionary();
dictionary& opAssign(const dictionary&in);
void set(const string&in, const ?&in);
bool get(const string&in, ?&out) const;
void set(const string&in, const int64&in);
bool get(const string&in, int64&out) const;
void set(const string&in, const double&in);
bool get(const string&in, double&out) const;
bool exists(const string&in) const;
bool isEmpty() const;
uint getSize() const;
bool delete(const string&in);
void deleteAll();
string[]@ getKeys() const;
dictionaryValue& opIndex(const string&in);
const dictionaryValue& opIndex(const string&in) const;
}
class ref {
~ref();
ref();
ref(const ref&in);
ref(const ?&in);
void opCast(?&out);
ref& opHndlAssign(const ref&in);
ref& opHndlAssign(const ?&in);
bool opEquals(const ref&in) const;
bool opEquals(const ?&in) const;
}
class any {
any@ any();
any@ any(?&in);
any@ any(const int64&in);
any@ any(const double&in);
any& opAssign(any&in);
void store(?&in);
void store(const int64&in);
void store(const double&in);
bool retrieve(?&out);
bool retrieve(int64&out);
bool retrieve(double&out);
}
class DockPanel {
void onRender();
}
class ServiceScript {
}
class Entity {
string get_name() const property;
void set_name(string&in) property;
int get_id() const property;
Entity createChild(const string&in);
bool get_isRoot() const property;
void destroy();
bool get_exists() const property;
Entity get_parent() property;
void set_parent(Entity) property;
bool isDescendantOf(Entity);
bool opEquals(const Entity&in) const;
EntityChilds get_childs() const property;
TransformComponent get_transform() const property;
MeshComponent getMeshComponent();
MeshComponent createMeshComponent();
bool hasMeshComponent();
void removeMeshComponent();
ShaderComponent getShaderComponent();
ShaderComponent createShaderComponent();
bool hasShaderComponent();
void removeShaderComponent();
CameraComponent getCameraComponent();
CameraComponent createCameraComponent();
bool hasCameraComponent();
void removeCameraComponent();
}
class EntityChilds {
int get_count() const property;
Entity opIndex(int) const;
}
class TransformComponent {
vec3 get_position() const property;
vec3 get_scale() const property;
vec3 get_rotation() const property;
void set_position(const vec3) property;
void set_scale(const vec3) property;
void set_rotation(const vec3) property;
}
class MeshComponent {
bool get_isActive() const property;
bool get_hasMesh() const property;
void clear();
string getMesh();
void setMesh(string&in);
void set_isActive(const bool) property;
}
class ShaderComponent {
bool get_hasShader() const property;
void clear();
string getShader();
void setShader(const string&in);
}
class CameraComponent {
float get_fov() const property;
float get_aspectRatio() const property;
float get_nearZ() const property;
float get_farZ() const property;
void set_fov(float) property;
void set_aspectRatio(float) property;
void set_nearZ(float) property;
void set_farZ(float) property;
}
class vec3 {
vec3();
vec3(float, float = 0, float = 0);
vec3 opAdd(const vec3&in);
vec3 opSub(const vec3&in) const;
vec3 opNeg() const;
vec3 opMul(float) const;
vec3 opMul_r(float) const;
float x;
float y;
float z;
}
class quat {
~quat();
quat();
quat(float, float, float, float);
quat opMul(const quat&in) const;
vec3 getEuler() const;
void setEuler(vec3);
float x;
float y;
float z;
float w;
}
class Transform {
Transform();
vec3 relative(vec3);
vec3 position;
vec3 scale;
quat rotation;
}
class Camera {
Camera();
float fov;
float aspect;
float nearZ;
float farZ;
}
class SceneCamera {
SceneCamera();
Camera camera;
Transform transform;
}
class FrameBuffer {
FrameBuffer();
void clearRGBA(int, int, int, int);
int get_height() const property;
void resize(int, int);
string get_name() const property;
bool isValid();
}
class Environment {
void render(FrameBuffer, SceneCamera&in);
Entity getRootEntity();
Entity getEntity(int);
}
string formatInt(int64 val, const string&in options = "", uint width = 0);
string formatUInt(uint64 val, const string&in options = "", uint width = 0);
string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0);
int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0);
uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0);
double parseFloat(const string&in, uint&out byteCount = 0);
namespace Engine { Entity getRoot(); }
namespace UI { bool button(const string&in); }
namespace UI { bool buttonCenter(const string&in); }
namespace UI { bool buttonEnd(const string&in); }
namespace UI { bool checkbox(const string&in, bool); }
namespace UI { bool checkboxDisabled(const string&in, bool); }
namespace UI { void drawFrameBuffer(FrameBuffer, int, int); }
namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); }
namespace UI { void drawIcon(const string&in, int); }
namespace UI { void drawIconCentered(const string&in, int); }
namespace UI { bool inputText(const string&in, const string&in, string&out); }
namespace UI { bool isItemClicked(int); }
namespace UI { bool isMouseDoubleClicked(int); }
namespace UI { float magicSlider(const string&in, float, float); }
namespace UI { vec3 magicSlider3(const string&in, vec3, float); }
namespace UI { bool menuItem(const string&in); }
namespace UI { void menuItemDisabled(const string&in); }
namespace UI { void menuSpace(const string&in, any@, ReciverFunc@); }
namespace UI { void sameline(); }
namespace UI { void separator(); }
namespace UI { void space(); }
namespace UI { void space(int, int = 10); }
namespace UI { void text(const string&in); }
namespace UI { void textCenter(const string&in); }
namespace UI { void textColor(float, float, float, const string&in); }
namespace UI { void textEnd(const string&in); }
namespace UI { void title(const string&in); }
namespace UI { void titleCenter(const string&in); }
namespace UI { void titleCenterY(const string&in, int); }
namespace UI { void titleEnd(const string&in); }
namespace UI { bool isKeyDown(key); }
namespace UI { bool isKeyPressed(key); }
namespace UI { bool isMouseDraggin(key); }
namespace UI { bool isPannelActive(); }
namespace UI { float getMouseDragDeltaX(); }
namespace UI { float getMouseDragDeltaY(); }
namespace UI { float getMouseDeltaX(); }
namespace UI { float getMouseDeltaY(); }
namespace UI { int getAvailableSizeX(); }
namespace UI { int getAvailableSizeY(); }
namespace UI { void disablePannelPadding(bool); }
namespace UI { int sliderInt(string&in, int, int, int); }
namespace UI { float slider(string&in, float, float, float); }
namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); }
namespace Engine { FrameBuffer getFrameBuffer(const string&in); }
namespace Engine { Environment getMainEnvironment(); }
namespace Engine { Environment createEnvironment(); }
namespace UI { void setupAutomaticColumns(int); }
namespace UI { void setupColumns(int); }
namespace UI { void endColumns(); }
namespace UI { void nextColumn(); }
namespace Resource { int getResourceCount(ResourceType, const string&in); }
namespace Resource { string getResourceNameById(ResourceType, const string&in, int); }
namespace Resource { string getResourcePathById(ResourceType, const string&in, int); }
namespace Resource { int getDirCount(ResourceType, const string&in); }
namespace Resource { string getDirPathById(ResourceType, const string&in, int); }
namespace Resource { string getDirNameById(ResourceType, const string&in, int); }
namespace Engine { void print(const string&in); }
namespace UI { void treeNodeLeaf(const string&in, bool); }
namespace UI { bool treeNode(const string&in, bool, any@, ReciverFunc@); }
namespace UI { bool componentNode(const string&in, any@, ReciverFunc@); }
namespace UI { bool componentNode_contextMenu(const string&in, any@, ReciverFunc@, ReciverFunc@); }
namespace UI { void contextItemPopup(const string&in, any@, ReciverFunc@); }
namespace UI { void contextMenuPopup(const string&in, any@, ReciverFunc@); }
namespace UI { void modalPopup(const string&in, ReciverFunc@); }
namespace UI { void simplePopup(const string&in, ReciverFunc@); }
namespace UI { void openPopup(const string&in, any@); }
namespace UI { void closePopup(); }
namespace UI { void dragDropSource(const string&in, any@, const string&in); }
namespace UI { void dragDropTarget(const string&in, any@, TransferFunc@); }
namespace Chewico::ActiveEntity::ActiveEntity { Entity getActiveEntity(); }
namespace Chewico::ActiveEntity::ActiveEntity { void setActiveEntity(Entity); }

View File

@ -0,0 +1,8 @@
{
"dockPanelModule" : {
"name" : "Test",
"author" : "Chewico",
"version" : "1.0.0",
"services" : []
}
}

View File

@ -0,0 +1,806 @@
//This file was generated automatically
funcdef bool T[]::less(const T&in a, const T&in b);
funcdef void ReciverFunc(any@);
funcdef void TransferFunc(any@, any@);
enum key {
A = 546,
B = 547,
C = 548,
D = 549,
E = 550,
F = 551,
G = 552,
H = 553,
I = 554,
J = 555,
K = 556,
L = 557,
M = 558,
N = 559,
O = 560,
P = 561,
Q = 562,
R = 563,
S = 564,
T = 565,
U = 566,
V = 567,
W = 568,
X = 569,
Y = 570,
Z = 571,
K0 = 536,
K1 = 537,
K2 = 538,
K3 = 539,
K4 = 540,
K5 = 541,
K6 = 542,
K7 = 543,
K8 = 544,
K9 = 545,
Tab = 512,
Enter = 525,
Escape = 526,
Backspace = 523,
Space = 524,
Delete = 522,
Insert = 521,
Home = 519,
End = 520,
PageUp = 517,
PageDown = 518,
Right = 514,
Up = 515,
Down = 516,
Left = 513,
RightCtrl = 531,
LeftShift = 528,
RightShift = 532,
LeftAlt = 529,
RightAlt = 533,
LeftSuper = 530,
RightSuper = 534,
LeftCtrl = 527,
MouseLeft = 641,
MouseRight = 642,
MouseMiddle = 643
}
enum ResourceType {
Mesh = 1,
Shader = 2
}
class string {
~string();
string();
string(const string&in);
string& opAssign(const string&in);
string& opAddAssign(const string&in);
bool opEquals(const string&in) const;
int opCmp(const string&in) const;
string opAdd(const string&in) const;
uint length() const;
void resize(uint);
bool isEmpty() const;
uint8& opIndex(uint);
const uint8& opIndex(uint) const;
string& opAssign(double);
string& opAddAssign(double);
string opAdd(double) const;
string opAdd_r(double) const;
string& opAssign(float);
string& opAddAssign(float);
string opAdd(float) const;
string opAdd_r(float) const;
string& opAssign(int64);
string& opAddAssign(int64);
string opAdd(int64) const;
string opAdd_r(int64) const;
string& opAssign(uint64);
string& opAddAssign(uint64);
string opAdd(uint64) const;
string opAdd_r(uint64) const;
string& opAssign(bool);
string& opAddAssign(bool);
string opAdd(bool) const;
string opAdd_r(bool) const;
string substr(uint start = 0, int count = - 1) const;
int findFirst(const string&in, uint start = 0) const;
int findFirstOf(const string&in, uint start = 0) const;
int findFirstNotOf(const string&in, uint start = 0) const;
int findLast(const string&in, int start = - 1) const;
int findLastOf(const string&in, int start = - 1) const;
int findLastNotOf(const string&in, int start = - 1) const;
void insert(uint pos, const string&in other);
void erase(uint pos, int count = - 1);
}
class array<T> {
T[]@ array(int&in);
T[]@ array(int&in, uint length);
T[]@ array(int&in, uint length, const T&in value);
T& opIndex(uint index);
const T& opIndex(uint index) const;
T[]& opAssign(const T[]&in);
void insertAt(uint index, const T&in value);
void insertAt(uint index, const T[]&inout arr);
void insertLast(const T&in value);
void removeAt(uint index);
void removeLast();
void removeRange(uint start, uint count);
uint length() const;
void reserve(uint length);
void resize(uint length);
void sortAsc();
void sortAsc(uint startAt, uint count);
void sortDesc();
void sortDesc(uint startAt, uint count);
void reverse();
int find(const T&in value) const;
int find(uint startAt, const T&in value) const;
int findByRef(const T&in value) const;
int findByRef(uint startAt, const T&in value) const;
bool opEquals(const T[]&in) const;
bool isEmpty() const;
void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 ));
funcdef bool less(const T&in, const T&in);
}
class dictionaryValue {
~dictionaryValue();
dictionaryValue();
dictionaryValue& opAssign(const dictionaryValue&in);
dictionaryValue& opHndlAssign(const ?&in);
dictionaryValue& opHndlAssign(const dictionaryValue&in);
dictionaryValue& opAssign(const ?&in);
dictionaryValue& opAssign(double);
dictionaryValue& opAssign(int64);
void opCast(?&out);
void opConv(?&out);
int64 opConv();
double opConv();
}
class dictionary {
dictionary@ dictionary();
dictionary& opAssign(const dictionary&in);
void set(const string&in, const ?&in);
bool get(const string&in, ?&out) const;
void set(const string&in, const int64&in);
bool get(const string&in, int64&out) const;
void set(const string&in, const double&in);
bool get(const string&in, double&out) const;
bool exists(const string&in) const;
bool isEmpty() const;
uint getSize() const;
bool delete(const string&in);
void deleteAll();
string[]@ getKeys() const;
dictionaryValue& opIndex(const string&in);
const dictionaryValue& opIndex(const string&in) const;
}
class ref {
~ref();
ref();
ref(const ref&in);
ref(const ?&in);
void opCast(?&out);
ref& opHndlAssign(const ref&in);
ref& opHndlAssign(const ?&in);
bool opEquals(const ref&in) const;
bool opEquals(const ?&in) const;
}
class any {
any@ any();
any@ any(?&in);
any@ any(const int64&in);
any@ any(const double&in);
any& opAssign(any&in);
void store(?&in);
void store(const int64&in);
void store(const double&in);
bool retrieve(?&out);
bool retrieve(int64&out);
bool retrieve(double&out);
}
class DockPanel {
void onRender();
}
class ServiceScript {
}
class Entity {
string get_name() const property;
void set_name(string&in) property;
int get_id() const property;
Entity createChild(const string&in);
bool get_isRoot() const property;
void destroy();
bool get_exists() const property;
Entity get_parent() property;
void set_parent(Entity) property;
bool isDescendantOf(Entity);
bool opEquals(const Entity&in) const;
EntityChilds get_childs() const property;
TransformComponent get_transform() const property;
MeshComponent getMeshComponent();
MeshComponent createMeshComponent();
bool hasMeshComponent();
void removeMeshComponent();
ShaderComponent getShaderComponent();
ShaderComponent createShaderComponent();
bool hasShaderComponent();
void removeShaderComponent();
CameraComponent getCameraComponent();
CameraComponent createCameraComponent();
bool hasCameraComponent();
void removeCameraComponent();
}
class EntityChilds {
int get_count() const property;
Entity opIndex(int) const;
}
class TransformComponent {
vec3 get_position() const property;
vec3 get_scale() const property;
vec3 get_rotation() const property;
void set_position(const vec3) property;
void set_scale(const vec3) property;
void set_rotation(const vec3) property;
}
class MeshComponent {
bool get_isActive() const property;
bool get_hasMesh() const property;
void clear();
string getMesh();
void setMesh(string&in);
void set_isActive(const bool) property;
}
class ShaderComponent {
bool get_hasShader() const property;
void clear();
string getShader();
void setShader(const string&in);
}
class CameraComponent {
float get_fov() const property;
float get_aspectRatio() const property;
float get_nearZ() const property;
float get_farZ() const property;
void set_fov(float) property;
void set_aspectRatio(float) property;
void set_nearZ(float) property;
void set_farZ(float) property;
}
class vec3 {
vec3();
vec3(float, float = 0, float = 0);
vec3 opAdd(const vec3&in);
vec3 opSub(const vec3&in) const;
vec3 opNeg() const;
vec3 opMul(float) const;
vec3 opMul_r(float) const;
float x;
float y;
float z;
}
class quat {
~quat();
quat();
quat(float, float, float, float);
quat opMul(const quat&in) const;
vec3 getEuler() const;
void setEuler(vec3);
float x;
float y;
float z;
float w;
}
class Transform {
Transform();
vec3 relative(vec3);
vec3 position;
vec3 scale;
quat rotation;
}
class Camera {
Camera();
float fov;
float aspect;
float nearZ;
float farZ;
}
class SceneCamera {
SceneCamera();
Camera camera;
Transform transform;
}
class FrameBuffer {
FrameBuffer();
void clearRGBA(int, int, int, int);
int get_height() const property;
void resize(int, int);
string get_name() const property;
bool isValid();
}
class Environment {
void render(FrameBuffer, SceneCamera&in);
Entity getRootEntity();
Entity getEntity(int);
}
string formatInt(int64 val, const string&in options = "", uint width = 0);
string formatUInt(uint64 val, const string&in options = "", uint width = 0);
string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0);
int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0);
uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0);
double parseFloat(const string&in, uint&out byteCount = 0);
namespace Engine { Entity getRoot(); }
namespace UI { bool button(const string&in); }
namespace UI { bool buttonCenter(const string&in); }
namespace UI { bool buttonEnd(const string&in); }
namespace UI { bool checkbox(const string&in, bool); }
namespace UI { bool checkboxDisabled(const string&in, bool); }
namespace UI { void drawFrameBuffer(FrameBuffer, int, int); }
namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); }
namespace UI { void drawIcon(const string&in, int); }
namespace UI { void drawIconCentered(const string&in, int); }
namespace UI { bool inputText(const string&in, const string&in, string&out); }
namespace UI { bool isItemClicked(int); }
namespace UI { bool isMouseDoubleClicked(int); }
namespace UI { float magicSlider(const string&in, float, float); }
namespace UI { vec3 magicSlider3(const string&in, vec3, float); }
namespace UI { bool menuItem(const string&in); }
namespace UI { void menuItemDisabled(const string&in); }
namespace UI { void menuSpace(const string&in, any@, ReciverFunc@); }
namespace UI { void sameline(); }
namespace UI { void separator(); }
namespace UI { void space(); }
namespace UI { void space(int, int = 10); }
namespace UI { void text(const string&in); }
namespace UI { void textCenter(const string&in); }
namespace UI { void textColor(float, float, float, const string&in); }
namespace UI { void textEnd(const string&in); }
namespace UI { void title(const string&in); }
namespace UI { void titleCenter(const string&in); }
namespace UI { void titleCenterY(const string&in, int); }
namespace UI { void titleEnd(const string&in); }
namespace UI { bool isKeyDown(key); }
namespace UI { bool isKeyPressed(key); }
namespace UI { bool isMouseDraggin(key); }
namespace UI { bool isPannelActive(); }
namespace UI { float getMouseDragDeltaX(); }
namespace UI { float getMouseDragDeltaY(); }
namespace UI { float getMouseDeltaX(); }
namespace UI { float getMouseDeltaY(); }
namespace UI { int getAvailableSizeX(); }
namespace UI { int getAvailableSizeY(); }
namespace UI { void disablePannelPadding(bool); }
namespace UI { int sliderInt(string&in, int, int, int); }
namespace UI { float slider(string&in, float, float, float); }
namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); }
namespace Engine { FrameBuffer getFrameBuffer(const string&in); }
namespace Engine { Environment getMainEnvironment(); }
namespace Engine { Environment createEnvironment(); }
namespace UI { void setupAutomaticColumns(int); }
namespace UI { void setupColumns(int); }
namespace UI { void endColumns(); }
namespace UI { void nextColumn(); }
namespace Resource { int getResourceCount(ResourceType, const string&in); }
namespace Resource { string getResourceNameById(ResourceType, const string&in, int); }
namespace Resource { string getResourcePathById(ResourceType, const string&in, int); }
namespace Resource { int getDirCount(ResourceType, const string&in); }
namespace Resource { string getDirPathById(ResourceType, const string&in, int); }
namespace Resource { string getDirNameById(ResourceType, const string&in, int); }
namespace Engine { void print(const string&in); }
namespace UI { void treeNodeLeaf(const string&in, bool); }
namespace UI { bool treeNode(const string&in, bool, any@, ReciverFunc@); }
namespace UI { bool componentNode(const string&in, any@, ReciverFunc@); }
namespace UI { bool componentNode_contextMenu(const string&in, any@, ReciverFunc@, ReciverFunc@); }
namespace UI { void contextItemPopup(const string&in, any@, ReciverFunc@); }
namespace UI { void contextMenuPopup(const string&in, any@, ReciverFunc@); }
namespace UI { void modalPopup(const string&in, ReciverFunc@); }
namespace UI { void simplePopup(const string&in, ReciverFunc@); }
namespace UI { void openPopup(const string&in, any@); }
namespace UI { void closePopup(); }
namespace UI { void dragDropSource(const string&in, any@, const string&in); }
namespace UI { void dragDropTarget(const string&in, any@, TransferFunc@); }
//This file was generated automatically
funcdef bool T[]::less(const T&in a, const T&in b);
funcdef void ReciverFunc(any@);
funcdef void TransferFunc(any@, any@);
enum key {
A = 546,
B = 547,
C = 548,
D = 549,
E = 550,
F = 551,
G = 552,
H = 553,
I = 554,
J = 555,
K = 556,
L = 557,
M = 558,
N = 559,
O = 560,
P = 561,
Q = 562,
R = 563,
S = 564,
T = 565,
U = 566,
V = 567,
W = 568,
X = 569,
Y = 570,
Z = 571,
K0 = 536,
K1 = 537,
K2 = 538,
K3 = 539,
K4 = 540,
K5 = 541,
K6 = 542,
K7 = 543,
K8 = 544,
K9 = 545,
Tab = 512,
Enter = 525,
Escape = 526,
Backspace = 523,
Space = 524,
Delete = 522,
Insert = 521,
Home = 519,
End = 520,
PageUp = 517,
PageDown = 518,
Right = 514,
Up = 515,
Down = 516,
Left = 513,
RightCtrl = 531,
LeftShift = 528,
RightShift = 532,
LeftAlt = 529,
RightAlt = 533,
LeftSuper = 530,
RightSuper = 534,
LeftCtrl = 527,
MouseLeft = 641,
MouseRight = 642,
MouseMiddle = 643
}
enum ResourceType {
Mesh = 1,
Shader = 2
}
class string {
~string();
string();
string(const string&in);
string& opAssign(const string&in);
string& opAddAssign(const string&in);
bool opEquals(const string&in) const;
int opCmp(const string&in) const;
string opAdd(const string&in) const;
uint length() const;
void resize(uint);
bool isEmpty() const;
uint8& opIndex(uint);
const uint8& opIndex(uint) const;
string& opAssign(double);
string& opAddAssign(double);
string opAdd(double) const;
string opAdd_r(double) const;
string& opAssign(float);
string& opAddAssign(float);
string opAdd(float) const;
string opAdd_r(float) const;
string& opAssign(int64);
string& opAddAssign(int64);
string opAdd(int64) const;
string opAdd_r(int64) const;
string& opAssign(uint64);
string& opAddAssign(uint64);
string opAdd(uint64) const;
string opAdd_r(uint64) const;
string& opAssign(bool);
string& opAddAssign(bool);
string opAdd(bool) const;
string opAdd_r(bool) const;
string substr(uint start = 0, int count = - 1) const;
int findFirst(const string&in, uint start = 0) const;
int findFirstOf(const string&in, uint start = 0) const;
int findFirstNotOf(const string&in, uint start = 0) const;
int findLast(const string&in, int start = - 1) const;
int findLastOf(const string&in, int start = - 1) const;
int findLastNotOf(const string&in, int start = - 1) const;
void insert(uint pos, const string&in other);
void erase(uint pos, int count = - 1);
}
class array<T> {
T[]@ array(int&in);
T[]@ array(int&in, uint length);
T[]@ array(int&in, uint length, const T&in value);
T& opIndex(uint index);
const T& opIndex(uint index) const;
T[]& opAssign(const T[]&in);
void insertAt(uint index, const T&in value);
void insertAt(uint index, const T[]&inout arr);
void insertLast(const T&in value);
void removeAt(uint index);
void removeLast();
void removeRange(uint start, uint count);
uint length() const;
void reserve(uint length);
void resize(uint length);
void sortAsc();
void sortAsc(uint startAt, uint count);
void sortDesc();
void sortDesc(uint startAt, uint count);
void reverse();
int find(const T&in value) const;
int find(uint startAt, const T&in value) const;
int findByRef(const T&in value) const;
int findByRef(uint startAt, const T&in value) const;
bool opEquals(const T[]&in) const;
bool isEmpty() const;
void sort(T[]::less&in, uint startAt = 0, uint count = uint ( - 1 ));
funcdef bool less(const T&in, const T&in);
}
class dictionaryValue {
~dictionaryValue();
dictionaryValue();
dictionaryValue& opAssign(const dictionaryValue&in);
dictionaryValue& opHndlAssign(const ?&in);
dictionaryValue& opHndlAssign(const dictionaryValue&in);
dictionaryValue& opAssign(const ?&in);
dictionaryValue& opAssign(double);
dictionaryValue& opAssign(int64);
void opCast(?&out);
void opConv(?&out);
int64 opConv();
double opConv();
}
class dictionary {
dictionary@ dictionary();
dictionary& opAssign(const dictionary&in);
void set(const string&in, const ?&in);
bool get(const string&in, ?&out) const;
void set(const string&in, const int64&in);
bool get(const string&in, int64&out) const;
void set(const string&in, const double&in);
bool get(const string&in, double&out) const;
bool exists(const string&in) const;
bool isEmpty() const;
uint getSize() const;
bool delete(const string&in);
void deleteAll();
string[]@ getKeys() const;
dictionaryValue& opIndex(const string&in);
const dictionaryValue& opIndex(const string&in) const;
}
class ref {
~ref();
ref();
ref(const ref&in);
ref(const ?&in);
void opCast(?&out);
ref& opHndlAssign(const ref&in);
ref& opHndlAssign(const ?&in);
bool opEquals(const ref&in) const;
bool opEquals(const ?&in) const;
}
class any {
any@ any();
any@ any(?&in);
any@ any(const int64&in);
any@ any(const double&in);
any& opAssign(any&in);
void store(?&in);
void store(const int64&in);
void store(const double&in);
bool retrieve(?&out);
bool retrieve(int64&out);
bool retrieve(double&out);
}
class DockPanel {
void onRender();
}
class ServiceScript {
}
class Entity {
string get_name() const property;
void set_name(string&in) property;
int get_id() const property;
Entity createChild(const string&in);
bool get_isRoot() const property;
void destroy();
bool get_exists() const property;
Entity get_parent() property;
void set_parent(Entity) property;
bool isDescendantOf(Entity);
bool opEquals(const Entity&in) const;
EntityChilds get_childs() const property;
TransformComponent get_transform() const property;
MeshComponent getMeshComponent();
MeshComponent createMeshComponent();
bool hasMeshComponent();
void removeMeshComponent();
ShaderComponent getShaderComponent();
ShaderComponent createShaderComponent();
bool hasShaderComponent();
void removeShaderComponent();
CameraComponent getCameraComponent();
CameraComponent createCameraComponent();
bool hasCameraComponent();
void removeCameraComponent();
}
class EntityChilds {
int get_count() const property;
Entity opIndex(int) const;
}
class TransformComponent {
vec3 get_position() const property;
vec3 get_scale() const property;
vec3 get_rotation() const property;
void set_position(const vec3) property;
void set_scale(const vec3) property;
void set_rotation(const vec3) property;
}
class MeshComponent {
bool get_isActive() const property;
bool get_hasMesh() const property;
void clear();
string getMesh();
void setMesh(string&in);
void set_isActive(const bool) property;
}
class ShaderComponent {
bool get_hasShader() const property;
void clear();
string getShader();
void setShader(const string&in);
}
class CameraComponent {
float get_fov() const property;
float get_aspectRatio() const property;
float get_nearZ() const property;
float get_farZ() const property;
void set_fov(float) property;
void set_aspectRatio(float) property;
void set_nearZ(float) property;
void set_farZ(float) property;
}
class vec3 {
vec3();
vec3(float, float = 0, float = 0);
vec3 opAdd(const vec3&in);
vec3 opSub(const vec3&in) const;
vec3 opNeg() const;
vec3 opMul(float) const;
vec3 opMul_r(float) const;
float x;
float y;
float z;
}
class quat {
~quat();
quat();
quat(float, float, float, float);
quat opMul(const quat&in) const;
vec3 getEuler() const;
void setEuler(vec3);
float x;
float y;
float z;
float w;
}
class Transform {
Transform();
vec3 relative(vec3);
vec3 position;
vec3 scale;
quat rotation;
}
class Camera {
Camera();
float fov;
float aspect;
float nearZ;
float farZ;
}
class SceneCamera {
SceneCamera();
Camera camera;
Transform transform;
}
class FrameBuffer {
FrameBuffer();
void clearRGBA(int, int, int, int);
int get_height() const property;
void resize(int, int);
string get_name() const property;
bool isValid();
}
class Environment {
void render(FrameBuffer, SceneCamera&in);
Entity getRootEntity();
Entity getEntity(int);
}
string formatInt(int64 val, const string&in options = "", uint width = 0);
string formatUInt(uint64 val, const string&in options = "", uint width = 0);
string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0);
int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0);
uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0);
double parseFloat(const string&in, uint&out byteCount = 0);
namespace Engine { Entity getRoot(); }
namespace UI { bool button(const string&in); }
namespace UI { bool buttonCenter(const string&in); }
namespace UI { bool buttonEnd(const string&in); }
namespace UI { bool checkbox(const string&in, bool); }
namespace UI { bool checkboxDisabled(const string&in, bool); }
namespace UI { void drawFrameBuffer(FrameBuffer, int, int); }
namespace UI { void drawFrameBufferCentered(FrameBuffer, int, int); }
namespace UI { void drawIcon(const string&in, int); }
namespace UI { void drawIconCentered(const string&in, int); }
namespace UI { bool inputText(const string&in, const string&in, string&out); }
namespace UI { bool isItemClicked(int); }
namespace UI { bool isMouseDoubleClicked(int); }
namespace UI { float magicSlider(const string&in, float, float); }
namespace UI { vec3 magicSlider3(const string&in, vec3, float); }
namespace UI { bool menuItem(const string&in); }
namespace UI { void menuItemDisabled(const string&in); }
namespace UI { void menuSpace(const string&in, any@, ReciverFunc@); }
namespace UI { void sameline(); }
namespace UI { void separator(); }
namespace UI { void space(); }
namespace UI { void space(int, int = 10); }
namespace UI { void text(const string&in); }
namespace UI { void textCenter(const string&in); }
namespace UI { void textColor(float, float, float, const string&in); }
namespace UI { void textEnd(const string&in); }
namespace UI { void title(const string&in); }
namespace UI { void titleCenter(const string&in); }
namespace UI { void titleCenterY(const string&in, int); }
namespace UI { void titleEnd(const string&in); }
namespace UI { bool isKeyDown(key); }
namespace UI { bool isKeyPressed(key); }
namespace UI { bool isMouseDraggin(key); }
namespace UI { bool isPannelActive(); }
namespace UI { float getMouseDragDeltaX(); }
namespace UI { float getMouseDragDeltaY(); }
namespace UI { float getMouseDeltaX(); }
namespace UI { float getMouseDeltaY(); }
namespace UI { int getAvailableSizeX(); }
namespace UI { int getAvailableSizeY(); }
namespace UI { void disablePannelPadding(bool); }
namespace UI { int sliderInt(string&in, int, int, int); }
namespace UI { float slider(string&in, float, float, float); }
namespace Engine { FrameBuffer createRGBA8FrameBuffer(const string&in, int, int); }
namespace Engine { FrameBuffer getFrameBuffer(const string&in); }
namespace Engine { Environment getMainEnvironment(); }
namespace Engine { Environment createEnvironment(); }
namespace UI { void setupAutomaticColumns(int); }
namespace UI { void setupColumns(int); }
namespace UI { void endColumns(); }
namespace UI { void nextColumn(); }
namespace Resource { int getResourceCount(ResourceType, const string&in); }
namespace Resource { string getResourceNameById(ResourceType, const string&in, int); }
namespace Resource { string getResourcePathById(ResourceType, const string&in, int); }
namespace Resource { int getDirCount(ResourceType, const string&in); }
namespace Resource { string getDirPathById(ResourceType, const string&in, int); }
namespace Resource { string getDirNameById(ResourceType, const string&in, int); }
namespace Engine { void print(const string&in); }
namespace UI { void treeNodeLeaf(const string&in, bool); }
namespace UI { bool treeNode(const string&in, bool, any@, ReciverFunc@); }
namespace UI { bool componentNode(const string&in, any@, ReciverFunc@); }
namespace UI { bool componentNode_contextMenu(const string&in, any@, ReciverFunc@, ReciverFunc@); }
namespace UI { void contextItemPopup(const string&in, any@, ReciverFunc@); }
namespace UI { void contextMenuPopup(const string&in, any@, ReciverFunc@); }
namespace UI { void modalPopup(const string&in, ReciverFunc@); }
namespace UI { void simplePopup(const string&in, ReciverFunc@); }
namespace UI { void openPopup(const string&in, any@); }
namespace UI { void closePopup(); }
namespace UI { void dragDropSource(const string&in, any@, const string&in); }
namespace UI { void dragDropTarget(const string&in, any@, TransferFunc@); }
namespace Chewico::ActiveEntity::ActiveEntity { Entity getActiveEntity(); }
namespace Chewico::ActiveEntity::ActiveEntity { void setActiveEntity(Entity); }