Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(569)

Unified Diff: sky/examples/terminal/terminal_display.dart

Issue 999193002: Add a simple prototype "terminal" example. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: review comments Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/terminal/terminal.sky ('k') | sky/examples/terminal/terminal_file_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/terminal/terminal_display.dart
diff --git a/sky/examples/terminal/terminal_display.dart b/sky/examples/terminal/terminal_display.dart
new file mode 100644
index 0000000000000000000000000000000000000000..c932825dcde85a4da2958af8c2c6e682c83f920a
--- /dev/null
+++ b/sky/examples/terminal/terminal_display.dart
@@ -0,0 +1,16 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import 'dart:async';
+
+// Interface for a terminal display, able to accept bytes (from the computer)
+// and typically displaying them (or possibly handling them as escape codes,
+// etc.) and able to get bytes from the "user".
+abstract class TerminalDisplay {
+ void putChar(int byte);
+ Future<int> getChar();
+
+ // TODO(vtl): Should probably also have facilities for putting many bytes at a
+ // time or getting as many bytes as available.
+}
« no previous file with comments | « sky/examples/terminal/terminal.sky ('k') | sky/examples/terminal/terminal_file_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698