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:
9 // The above copyright notice and this permission notice shall be
10 // included in all copies or substantial portions of the Software.
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)
23 // Miguel de Icaza (miguel@novell.com).
24 // Peter Bartok (pbartok@novell.com)
32 namespace System.Windows.Forms {
33 public class SystemInformation {
35 internal SystemInformation() {
39 #region Public Static Properties
40 public static ArrangeDirection ArrangeDirection {
42 return ThemeEngine.Current.ArrangeDirection;
46 public static ArrangeStartingPosition ArrangeStartingPosition {
48 return ThemeEngine.Current.ArrangeStartingPosition;
52 public static BootMode BootMode {
54 return BootMode.Normal;
58 public static Size Border3DSize {
60 return ThemeEngine.Current.Border3DSize;
64 public static Size BorderSize {
66 return ThemeEngine.Current.Border3DSize;
70 public static Size CaptionButtonSize {
72 return ThemeEngine.Current.CaptionButtonSize;
76 public static int CaptionHeight {
78 return ThemeEngine.Current.CaptionHeight;
82 public static string ComputerName {
84 return Environment.MachineName;
88 public static Size CursorSize {
90 return XplatUI.CursorSize;
94 public static bool DbcsEnabled {
100 public static bool DebugOS {
106 public static Size DoubleClickSize {
108 return ThemeEngine.Current.DoubleClickSize;
112 public static int DoubleClickTime {
114 return ThemeEngine.Current.DoubleClickTime;
118 public static bool DragFullWindows {
120 return XplatUI.DragFullWindows;
124 public static Size DragSize {
126 return XplatUI.DragSize;
130 public static Size FixedFrameBorderSize {
132 return ThemeEngine.Current.FixedFrameBorderSize;
136 public static Size FrameBorderSize {
138 return ThemeEngine.Current.FrameBorderSize;
142 public static bool HighContrast {
148 public static int HorizontalScrollBarArrowWidth {
150 return ThemeEngine.Current.HorizontalScrollBarArrowWidth;
154 public static int HorizontalScrollBarHeight {
156 return ThemeEngine.Current.HorizontalScrollBarHeight;
160 public static int HorizontalScrollBarThumbWidth {
162 return ThemeEngine.Current.HorizontalScrollBarThumbWidth;
166 public static Size IconSize {
168 return XplatUI.IconSize;
172 public static Size IconSpacingSize {
174 return ThemeEngine.Current.IconSpacingSize;
178 public static int KanjiWindowHeight {
184 public static Size MaxWindowTrackSize {
186 return XplatUI.MaxWindowTrackSize;
190 public static Size MenuButtonSize {
192 return ThemeEngine.Current.MenuButtonSize;
196 public static Size MenuCheckSize {
198 return ThemeEngine.Current.MenuCheckSize;
202 public static Font MenuFont {
204 // note: we MUST return a clone of the Font instance as anyone
205 // can dispose it. However we shouldn't expect the theme to do
206 // the cloning for performance reason
207 return (Font) ThemeEngine.Current.MenuFont.Clone ();
211 public static int MenuHeight {
213 return ThemeEngine.Current.MenuHeight;
217 public static bool MidEastEnabled {
219 return false; // ??? how do we decide?
223 public static Size MinimizedWindowSize {
225 return XplatUI.MinimizedWindowSize;
229 public static Size MinimizedWindowSpacingSize {
231 return XplatUI.MinimizedWindowSpacingSize;
235 public static Size MinimumWindowSize {
237 return XplatUI.MinimumWindowSize;
241 public static Size MinWindowTrackSize {
243 return XplatUI.MinWindowTrackSize;
247 public static int MonitorCount {
249 return 1; // Why bother...
253 public static bool MonitorsSameDisplayFormat {
259 public static int MouseButtons {
261 return XplatUI.MouseButtonCount;
265 public static bool MouseButtonsSwapped {
267 return XplatUI.MouseButtonsSwapped;
272 public static Size MouseHoverSize {
274 return XplatUI.MouseHoverSize;
278 public static int MouseHoverTime {
280 return XplatUI.MouseHoverTime;
285 public static bool MousePresent {
291 public static bool MouseWheelPresent {
293 return XplatUI.MouseWheelPresent;
297 public static int MouseWheelScrollLines {
299 return ThemeEngine.Current.MouseWheelScrollLines;
303 public static bool NativeMouseWheelSupport {
305 return MouseWheelPresent;
309 public static bool Network {
315 public static bool PenWindows {
321 public static Size PrimaryMonitorMaximizedWindowSize {
323 return new Size(WorkingArea.Width, WorkingArea.Height);
327 public static Size PrimaryMonitorSize {
329 return new Size(WorkingArea.Width, WorkingArea.Height);
333 public static bool RightAlignedMenus {
335 return ThemeEngine.Current.RightAlignedMenus;
339 public static bool Secure {
341 return true; // FIXME - figure out if we're running 98/Me and return false
345 public static bool ShowSounds {
351 public static Size SmallIconSize {
353 return XplatUI.SmallIconSize;
357 public static Size ToolWindowCaptionButtonSize {
359 return ThemeEngine.Current.ToolWindowCaptionButtonSize;
363 public static int ToolWindowCaptionHeight {
365 return ThemeEngine.Current.ToolWindowCaptionHeight;
369 public static string UserDomainName {
371 return Environment.UserDomainName;
375 public static bool UserInteractive {
377 return Environment.UserInteractive;
381 public static string UserName {
383 return Environment.UserName;
387 public static int VerticalScrollBarArrowHeight {
389 return ThemeEngine.Current.VerticalScrollBarArrowHeight;
393 public static int VerticalScrollBarThumbHeight {
395 return ThemeEngine.Current.VerticalScrollBarThumbHeight;
399 public static int VerticalScrollBarWidth {
401 return ThemeEngine.Current.VerticalScrollBarWidth;
405 public static Rectangle VirtualScreen {
407 return XplatUI.VirtualScreen;
411 public static Rectangle WorkingArea {
413 return XplatUI.WorkingArea;
416 #endregion // Public Static Properties
418 #region Internal Static Properties
419 internal static int KeyboardSpeed {
421 return XplatUI.KeyboardSpeed;
425 internal static int KeyboardDelay {
427 return XplatUI.KeyboardDelay;
430 #endregion // Internal Static Properties