reintegration complete
This commit is contained in:
28
modules/Archimedes-Modules/TestNotCurses/TestNotCurses.cpp
Normal file
28
modules/Archimedes-Modules/TestNotCurses/TestNotCurses.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "TestNotCurses.h"
|
||||
|
||||
TestNotCurses::TestNotCurses(Archimedes::App* a, void* h) : Archimedes::Module(a, h) {
|
||||
name = "TestNotCurses";
|
||||
}
|
||||
|
||||
TestNotCurses::~TestNotCurses() {
|
||||
notcurses_stop(ncInstance);
|
||||
}
|
||||
|
||||
void TestNotCurses::onLoad() {
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
notcurses_options opts;
|
||||
|
||||
ncInstance = notcurses_init(&opts, NULL);
|
||||
|
||||
if(!ncInstance) {
|
||||
app->stopModule(getName());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void TestNotCurses::run() {
|
||||
|
||||
notcurses_render(ncInstance);
|
||||
}
|
||||
19
modules/Archimedes-Modules/TestNotCurses/TestNotCurses.h
Normal file
19
modules/Archimedes-Modules/TestNotCurses/TestNotCurses.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "Archimedes.h"
|
||||
|
||||
#include <notcurses/notcurses.h>
|
||||
|
||||
class TestNotCurses : public Archimedes::Module {
|
||||
|
||||
public:
|
||||
TestNotCurses(Archimedes::App*, void*);
|
||||
~TestNotCurses();
|
||||
void run();
|
||||
void onLoad();
|
||||
private:
|
||||
notcurses* ncInstance;
|
||||
};
|
||||
|
||||
#ifdef TESTNOTCURSES_DYNAMIC
|
||||
typedef TestNotCurses mtype;
|
||||
#include "endModule.h"
|
||||
#endif
|
||||
Reference in New Issue
Block a user