ncui/example/source/app.d

24 lines
484 B
D
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import ncui;
import std.stdio : writeln;
void main()
{
auto config = SessionConfig(InputMode.raw, Cursor.normal, Echo.on, Keypad.on);
Session session;
try {
session = new Session(config);
} catch (Exception e) {
writeln("Не удалось инициализировать сессию:\n\t", e.msg);
return;
}
try {
session.close();
} catch (Exception e) {
writeln("Не удалось закрыть сессию:\n\t", e.msg);
return;
}
writeln("OK");
}