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 |
3 | // BSD-style license that can be found in the LICENSE file. |
4 | |
5 | #ifndef RUNTIME_BIN_STDIO_H_ |
6 | #define RUNTIME_BIN_STDIO_H_ |
7 | |
8 | #include "bin/builtin.h" |
9 | #include "bin/utils.h" |
10 | |
11 | #include "platform/globals.h" |
12 | |
13 | namespace dart { |
14 | namespace bin { |
15 | |
16 | class Stdin { |
17 | public: |
18 | static bool ReadByte(intptr_t fd, int* byte); |
19 | |
20 | static bool GetEchoMode(intptr_t fd, bool* enabled); |
21 | static bool SetEchoMode(intptr_t fd, bool enabled); |
22 | |
23 | static bool GetLineMode(intptr_t fd, bool* enabled); |
24 | static bool SetLineMode(intptr_t fd, bool enabled); |
25 | |
26 | static bool AnsiSupported(intptr_t fd, bool* supported); |
27 | |
28 | private: |
29 | DISALLOW_ALLOCATION(); |
30 | DISALLOW_IMPLICIT_CONSTRUCTORS(Stdin); |
31 | }; |
32 | |
33 | class Stdout { |
34 | public: |
35 | static bool GetTerminalSize(intptr_t fd, int size[2]); |
36 | static bool AnsiSupported(intptr_t fd, bool* supported); |
37 | |
38 | private: |
39 | DISALLOW_ALLOCATION(); |
40 | DISALLOW_IMPLICIT_CONSTRUCTORS(Stdout); |
41 | }; |
42 | |
43 | } // namespace bin |
44 | } // namespace dart |
45 | |
46 | #endif // RUNTIME_BIN_STDIO_H_ |
47 | |