2007-03-19 Chris Toshok <toshok@ximian.com>
[mono-project.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / SystemInformation.cs
blob2bbc46da2324b0d4b6c548008325e99a91515683
1 // Permission is hereby granted, free of charge, to any person obtaining
2 // a copy of this software and associated documentation files (the
3 // "Software"), to deal in the Software without restriction, including
4 // without limitation the rights to use, copy, modify, merge, publish,
5 // distribute, sublicense, and/or sell copies of the Software, and to
6 // permit persons to whom the Software is furnished to do so, subject to
7 // the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be
10 // included in all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
16 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
17 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
18 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 // Copyright (c) 2004,2006 Novell, Inc. (http://www.novell.com)
22 // Authors:
23 // Miguel de Icaza (miguel@novell.com).
24 // Peter Bartok (pbartok@novell.com)
27 // NOT COMPLETE
29 using System;
30 using System.Drawing;
32 namespace System.Windows.Forms
34 public class SystemInformation
36 private SystemInformation ()
40 public static ArrangeDirection ArrangeDirection {
41 get {
42 return ThemeEngine.Current.ArrangeDirection;
46 public static ArrangeStartingPosition ArrangeStartingPosition {
47 get {
48 return ThemeEngine.Current.ArrangeStartingPosition;
52 public static BootMode BootMode {
53 get {
54 return BootMode.Normal;
58 public static Size Border3DSize {
59 get {
60 return ThemeEngine.Current.Border3DSize;
64 public static Size BorderSize {
65 get {
66 return ThemeEngine.Current.Border3DSize;
70 public static Size CaptionButtonSize {
71 get {
72 return ThemeEngine.Current.CaptionButtonSize;
76 public static int CaptionHeight {
77 get {
78 return ThemeEngine.Current.CaptionHeight;
82 public static string ComputerName {
83 get {
84 return Environment.MachineName;
88 public static Size CursorSize {
89 get {
90 return XplatUI.CursorSize;
94 public static bool DbcsEnabled {
95 get {
96 return false;
100 public static bool DebugOS {
101 get {
102 return false;
106 public static Size DoubleClickSize {
107 get {
108 return ThemeEngine.Current.DoubleClickSize;
112 public static int DoubleClickTime {
113 get {
114 return ThemeEngine.Current.DoubleClickTime;
118 public static bool DragFullWindows {
119 get {
120 return XplatUI.DragFullWindows;
124 public static Size DragSize {
125 get {
126 return XplatUI.DragSize;
130 public static Size FixedFrameBorderSize {
131 get {
132 return ThemeEngine.Current.FixedFrameBorderSize;
136 public static Size FrameBorderSize {
137 get {
138 return ThemeEngine.Current.FrameBorderSize;
142 public static bool HighContrast {
143 get {
144 return false;
148 public static int HorizontalScrollBarArrowWidth {
149 get {
150 return ThemeEngine.Current.HorizontalScrollBarArrowWidth;
154 public static int HorizontalScrollBarHeight {
155 get {
156 return ThemeEngine.Current.HorizontalScrollBarHeight;
160 public static int HorizontalScrollBarThumbWidth {
161 get {
162 return ThemeEngine.Current.HorizontalScrollBarThumbWidth;
166 public static Size IconSize {
167 get {
168 return XplatUI.IconSize;
172 public static Size IconSpacingSize {
173 get {
174 return ThemeEngine.Current.IconSpacingSize;
178 public static int KanjiWindowHeight {
179 get {
180 return 0;
184 #if NET_2_0
185 public
186 #else
187 internal
188 #endif
189 static int KeyboardDelay {
190 get {
191 return XplatUI.KeyboardDelay;
195 #if NET_2_0
196 public
197 #else
198 internal
199 #endif
200 static int KeyboardSpeed {
201 get {
202 return XplatUI.KeyboardSpeed;
206 public static Size MaxWindowTrackSize {
207 get {
208 return XplatUI.MaxWindowTrackSize;
212 #if NET_2_0
213 public
214 #else
215 internal
216 #endif
217 static bool MenuAccessKeysUnderlined {
218 get {
219 return ThemeEngine.Current.MenuAccessKeysUnderlined;
223 public static Size MenuButtonSize {
224 get {
225 return ThemeEngine.Current.MenuButtonSize;
229 public static Size MenuCheckSize {
230 get {
231 return ThemeEngine.Current.MenuCheckSize;
235 public static Font MenuFont {
236 get {
237 // note: we MUST return a clone of the Font instance as anyone
238 // can dispose it. However we shouldn't expect the theme to do
239 // the cloning for performance reason
240 return (Font) ThemeEngine.Current.MenuFont.Clone ();
244 public static int MenuHeight {
245 get {
246 return ThemeEngine.Current.MenuHeight;
250 public static bool MidEastEnabled {
251 get {
252 return false; // ??? how do we decide?
256 public static Size MinimizedWindowSize {
257 get {
258 return XplatUI.MinimizedWindowSize;
262 public static Size MinimizedWindowSpacingSize {
263 get {
264 return XplatUI.MinimizedWindowSpacingSize;
268 public static Size MinimumWindowSize {
269 get {
270 return XplatUI.MinimumWindowSize;
274 public static Size MinWindowTrackSize {
275 get {
276 return XplatUI.MinWindowTrackSize;
280 public static int MonitorCount {
281 get {
282 return 1; // Why bother...
286 public static bool MonitorsSameDisplayFormat {
287 get {
288 return true;
292 public static int MouseButtons {
293 get {
294 return XplatUI.MouseButtonCount;
298 public static bool MouseButtonsSwapped {
299 get {
300 return XplatUI.MouseButtonsSwapped;
304 #if NET_2_0
305 public static Size MouseHoverSize {
306 get {
307 return XplatUI.MouseHoverSize;
311 public static int MouseHoverTime {
312 get {
313 return XplatUI.MouseHoverTime;
316 #endif
318 public static bool MousePresent {
319 get {
320 return true;
324 public static bool MouseWheelPresent {
325 get {
326 return XplatUI.MouseWheelPresent;
330 public static int MouseWheelScrollLines {
331 get {
332 return ThemeEngine.Current.MouseWheelScrollLines;
336 public static bool NativeMouseWheelSupport {
337 get {
338 return MouseWheelPresent;
342 public static bool Network {
343 get {
344 return true;
348 public static bool PenWindows {
349 get {
350 return false;
354 public static Size PrimaryMonitorMaximizedWindowSize {
355 get {
356 return new Size(WorkingArea.Width, WorkingArea.Height);
360 public static Size PrimaryMonitorSize {
361 get {
362 return new Size(WorkingArea.Width, WorkingArea.Height);
366 public static bool RightAlignedMenus {
367 get {
368 return ThemeEngine.Current.RightAlignedMenus;
372 public static bool Secure {
373 get {
374 return true;
378 public static bool ShowSounds {
379 get {
380 return false;
384 public static Size SmallIconSize {
385 get {
386 return XplatUI.SmallIconSize;
390 #if NET_2_0
391 public static bool TerminalServerSession {
392 get {
393 return false;
396 #endif
398 public static Size ToolWindowCaptionButtonSize {
399 get {
400 return ThemeEngine.Current.ToolWindowCaptionButtonSize;
404 public static int ToolWindowCaptionHeight {
405 get {
406 return ThemeEngine.Current.ToolWindowCaptionHeight;
410 public static string UserDomainName {
411 get {
412 return Environment.UserDomainName;
416 public static bool UserInteractive {
417 get {
418 return Environment.UserInteractive;
422 public static string UserName {
423 get {
424 return Environment.UserName;
428 public static int VerticalScrollBarArrowHeight {
429 get {
430 return ThemeEngine.Current.VerticalScrollBarArrowHeight;
434 public static int VerticalScrollBarThumbHeight {
435 get {
436 return ThemeEngine.Current.VerticalScrollBarThumbHeight;
440 public static int VerticalScrollBarWidth {
441 get {
442 return ThemeEngine.Current.VerticalScrollBarWidth;
446 public static Rectangle VirtualScreen {
447 get {
448 return XplatUI.VirtualScreen;
452 public static Rectangle WorkingArea {
453 get {
454 return XplatUI.WorkingArea;