TerminalEmbed

This commit is contained in:
2025-04-12 13:44:34 -05:00
parent 259cc9a3fa
commit 3e3b87d62e
3 changed files with 100 additions and 4 deletions

View File

@@ -0,0 +1,31 @@
#include "TerminalEmbed.h"
void TerminalEmbed::run() {
for(auto m : runOrder)
modules[m]->onLoad();
// Main loop
while (!done && !runOrder.empty()) {
for(auto m : runOrder) {
modules[m]->run();
}
for(auto m : toClose) {
unload(m);
}
toClose.clear();
for(auto m : toOpen) {
if(std::holds_alternative<std::string>(m)) {
load(std::get<std::string>(m))->onLoad();
} else {
load(std::get<Archimedes::Module*>(m))->onLoad();
}
}
toOpen.clear();
}
}

View File

@@ -0,0 +1,27 @@
#define ENTRYPOINT
#include "Archimedes.h"
#include "modules/Terminal/src/Terminal.h"
class TerminalEmbed : public Archimedes::App {
private:
void printHelp() {};
public:
TerminalEmbed() {
Archimedes::Module* m = (Archimedes::Module*) new Terminal(Get(), nullptr);
load(m);
};
~TerminalEmbed() {};
void handleArgs(const int& argc, char* argv[]) {};
void run();
};
#define APP_TYPE TerminalEmbed
#include "endApp.h"