dartterm/lib/terminal/reexports.dart

39 lines
773 B
Dart
Raw Permalink Normal View History

2023-09-11 02:00:06 +00:00
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);
}
2023-09-21 03:56:30 +00:00
Stream<Input> rawInput() {
return _terminal.rawInput();
}
2023-09-11 02:00:06 +00:00
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);
}