AuroraRuntime/Source/Console/Console.cpp

74 lines
1.5 KiB
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Console.cpp
Date: 2021-6-8
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "Console.hpp"
#include "Commands/Commands.hpp"
#include "Hooks/Hooks.hpp"
#include "ConsoleStd/ConsoleStd.hpp"
#include "ConsoleWxWidgets/ConsoleWxWidgets.hpp"
#include "ConsoleFIO/ConsoleFIO.hpp"
#include "Flusher.hpp"
namespace Aurora::Console
{
AUKN_SYM void WriteLine(const ConsoleMessage &msg)
{
Hooks::WriteLine(msg);
}
AUKN_SYM AuUInt32 ReadStdIn(void *buffer, AuUInt32 length)
{
return ConsoleStd::ReadStdIn(buffer, length);
}
AUKN_SYM AuUInt32 WriteStdIn(const void *buffer, AuUInt32 length)
{
return ConsoleStd::WriteStdOut(buffer, length);
}
void Init()
{
Hooks::Init();
ConsoleStd::Init();
ConsoleWxWidgets::Init();
}
void Init2()
{
ConsoleFIO::Init();
InitFlusher();
}
void Pump()
{
Commands::PumpCommands();
ConsoleStd::Pump();
ConsoleWxWidgets::Pump();
ConsoleFIO::Pump();
}
void Exit()
{
DeinitFlusher();
ConsoleStd::Exit();
ConsoleWxWidgets::Exit();
ConsoleFIO::Exit();
Hooks::Deinit();
}
AUKN_SYM void OpenLateStd()
{
ConsoleStd::Start();
}
AUKN_SYM void OpenLateGUI()
{
ConsoleWxWidgets::Start();
}
}