start TestNotCurses
This commit is contained in:
@@ -5,13 +5,24 @@ TestNotCurses::TestNotCurses(Archimedes::App* a, void* h) : Archimedes::Module(a
|
|||||||
}
|
}
|
||||||
|
|
||||||
TestNotCurses::~TestNotCurses() {
|
TestNotCurses::~TestNotCurses() {
|
||||||
|
notcurses_stop(ncInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestNotCurses::onLoad() {
|
void TestNotCurses::onLoad() {
|
||||||
|
|
||||||
|
setlocale(LC_ALL, "");
|
||||||
|
|
||||||
|
notcurses_options opts;
|
||||||
|
|
||||||
|
ncInstance = notcurses_init(&opts, NULL);
|
||||||
|
|
||||||
|
if(!ncInstance) {
|
||||||
|
app->stopModule(getName());
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestNotCurses::run() {
|
void TestNotCurses::run() {
|
||||||
|
|
||||||
|
notcurses_render(ncInstance);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ class TestNotCurses : public Archimedes::Module {
|
|||||||
~TestNotCurses();
|
~TestNotCurses();
|
||||||
void run();
|
void run();
|
||||||
void onLoad();
|
void onLoad();
|
||||||
|
private:
|
||||||
|
notcurses* ncInstance;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef TESTNOTCURSES_DYNAMIC
|
#ifdef TESTNOTCURSES_DYNAMIC
|
||||||
|
|||||||
Reference in New Issue
Block a user