dartterm/lib/terminal/reexports.dart
2023-09-10 19:00:06 -07:00

35 lines
712 B
Dart

part of '../terminal.dart';
Terminal _terminal = Terminal();
const int width = Terminal.width;
const int height = Terminal.height;
const int nTiles = Terminal.nTiles;
Widget toWidget(BuildContext context) {
return _terminal.toWidget(context);
}
void notifyInput(Input i) {
_terminal._notifyInput(i);
}
void notifyScreenDimensions(ScreenDimensions sd) {
_terminal._notifyScreenDimensions(sd);
}
void clear() {
at(0, 0).clear();
}
Cursor at(int x, int y) {
return Cursor(t: _terminal, x: x, y: y);
}
Future<void> zzz(double t) async {
await Future.delayed(Duration(milliseconds: (t * 1000).toInt()));
}
Future<void> waitMenu({bool modal = false}) async {
await _waitMenu(_terminal, modal);
}