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

Side by Side Diff: runtime/bin/stdio.h

Issue 2753233002: [dart:io] Move Platform.ansiSupported to {Stdin,Stdout}.supportsAnsiEscapes (Closed)
Patch Set: . Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef RUNTIME_BIN_STDIO_H_ 5 #ifndef RUNTIME_BIN_STDIO_H_
6 #define RUNTIME_BIN_STDIO_H_ 6 #define RUNTIME_BIN_STDIO_H_
7 7
8 #if defined(DART_IO_DISABLED) 8 #if defined(DART_IO_DISABLED)
9 #error "stdio.h can only be included on builds with IO enabled" 9 #error "stdio.h can only be included on builds with IO enabled"
10 #endif 10 #endif
11 11
12 #include "bin/builtin.h" 12 #include "bin/builtin.h"
13 #include "bin/utils.h" 13 #include "bin/utils.h"
14 14
15 #include "platform/globals.h" 15 #include "platform/globals.h"
16 16
17 namespace dart { 17 namespace dart {
18 namespace bin { 18 namespace bin {
19 19
20 class Stdin { 20 class Stdin {
21 public: 21 public:
22 static bool ReadByte(int* byte); 22 static bool ReadByte(int* byte);
23 23
24 static bool GetEchoMode(bool* enabled); 24 static bool GetEchoMode(bool* enabled);
25 static bool SetEchoMode(bool enabled); 25 static bool SetEchoMode(bool enabled);
26 26
27 static bool GetLineMode(bool* enabled); 27 static bool GetLineMode(bool* enabled);
28 static bool SetLineMode(bool enabled); 28 static bool SetLineMode(bool enabled);
29 29
30 static bool AnsiSupported(bool* supported);
31
30 private: 32 private:
31 DISALLOW_ALLOCATION(); 33 DISALLOW_ALLOCATION();
32 DISALLOW_IMPLICIT_CONSTRUCTORS(Stdin); 34 DISALLOW_IMPLICIT_CONSTRUCTORS(Stdin);
33 }; 35 };
34 36
35 37
36 class Stdout { 38 class Stdout {
37 public: 39 public:
38 static bool GetTerminalSize(intptr_t fd, int size[2]); 40 static bool GetTerminalSize(intptr_t fd, int size[2]);
41 static bool AnsiSupported(intptr_t fd, bool* supported);
39 42
40 private: 43 private:
41 DISALLOW_ALLOCATION(); 44 DISALLOW_ALLOCATION();
42 DISALLOW_IMPLICIT_CONSTRUCTORS(Stdout); 45 DISALLOW_IMPLICIT_CONSTRUCTORS(Stdout);
43 }; 46 };
44 47
45 } // namespace bin 48 } // namespace bin
46 } // namespace dart 49 } // namespace dart
47 50
48 #endif // RUNTIME_BIN_STDIO_H_ 51 #endif // RUNTIME_BIN_STDIO_H_
OLDNEW
« no previous file with comments | « runtime/bin/platform_win.cc ('k') | runtime/bin/stdio.cc » ('j') | sdk/lib/io/stdio.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698