Implement mono_gc_alloc_fixed on Boehm to be uncollectable. This matches SGen behavio...
[mono.git] / mcs / class / corlib / System / NullConsoleDriver.cs
1 //
2 // System.NullConsoleDriver
3 //
4 // Author:
5 //      Gonzalo Paniagua Javier (gonzalo@ximian.com)
6 //
7 // (C) 2006 Novell, Inc. (http://www.novell.com)
8 //
9
10 // Permission is hereby granted, free of charge, to any person obtaining
11 // a copy of this software and associated documentation files (the
12 // "Software"), to deal in the Software without restriction, including
13 // without limitation the rights to use, copy, modify, merge, publish,
14 // distribute, sublicense, and/or sell copies of the Software, and to
15 // permit persons to whom the Software is furnished to do so, subject to
16 // the following conditions:
17 // 
18 // The above copyright notice and this permission notice shall be
19 // included in all copies or substantial portions of the Software.
20 // 
21 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 //
29 #if !MOBILE
30 using System.Runtime.InteropServices;
31 using System.Text;
32 namespace System {
33         class NullConsoleDriver : IConsoleDriver
34         {
35                 static readonly ConsoleKeyInfo EmptyConsoleKeyInfo = new ConsoleKeyInfo ('\0', 0, false, false, false);
36
37                 public ConsoleColor BackgroundColor {
38                         get { return ConsoleColor.Black; }
39                         set {
40                         }
41                 }
42
43                 public int BufferHeight {
44                         get { return 0; }
45                         set {}
46                 }
47
48                 public int BufferWidth {
49                         get { return 0; }
50                         set {}
51                 }
52
53                 public bool CapsLock {
54                         get { return false; }
55                 }
56
57                 public int CursorLeft {
58                         get { return 0; }
59                         set {}
60                 }
61
62                 public int CursorSize {
63                         get { return 0; }
64                         set { }
65                 }
66
67                 public int CursorTop {
68                         get { return 0; }
69                         set {}
70                 }
71
72                 public bool CursorVisible {
73                         get { return false; }
74                         set {}
75                 }
76
77                 public ConsoleColor ForegroundColor {
78                         get { return ConsoleColor.Black; }
79                         set {}
80                 }
81
82                 public bool KeyAvailable {
83                         get { return false; } // FIXME: throw?
84                 }
85
86                 public bool Initialized {
87                         get { return true; }
88                 }
89
90                 public int LargestWindowHeight {
91                         get { return 0; }
92                 }
93
94                 public int LargestWindowWidth {
95                         get { return 0; }
96                 }
97
98                 public bool NumberLock {
99                         get { return false; }
100                 }
101
102                 public string Title {
103                         get { return ""; }
104                         set {}
105                 }
106
107                 public bool TreatControlCAsInput {
108                         get { return false; }
109                         set {}
110                 }
111
112                 public int WindowHeight {
113                         get { return 0; }
114                         set {}
115                 }
116
117                 public int WindowLeft {
118                         get { return 0; }
119                         set {}
120                 }
121
122                 public int WindowTop {
123                         get { return 0; }
124                         set {}
125                 }
126
127                 public int WindowWidth {
128                         get { return 0; }
129                         set {}
130                 }
131
132                 public void Beep (int frequency, int duration)
133                 {
134                 }
135
136                 public void Clear ()
137                 {
138                 }
139
140                 public void MoveBufferArea (int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight,
141                                         int targetLeft, int targetTop, Char sourceChar,
142                                         ConsoleColor sourceForeColor, ConsoleColor sourceBackColor)
143                 {
144                 }
145
146                 public void Init ()
147                 {
148                 }
149
150                 public string ReadLine ()
151                 {
152                         return null;
153                 }
154
155                 public ConsoleKeyInfo ReadKey (bool intercept)
156                 {
157                         return EmptyConsoleKeyInfo;
158                 }
159
160                 public void ResetColor ()
161                 {
162                 }
163
164                 public void SetBufferSize (int width, int height)
165                 {
166                 }
167
168                 public void SetCursorPosition (int left, int top)
169                 {
170                 }
171
172                 public void SetWindowPosition (int left, int top)
173                 {
174                 }
175
176                 public void SetWindowSize (int width, int height)
177                 {
178                 }
179         }
180 }
181 #endif
182