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)
31 using System.ComponentModel;
33 namespace System.Windows.Forms
35 public class SystemInformation
37 private SystemInformation ()
42 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
43 public static int ActiveWindowTrackingDelay { get { return XplatUI.ActiveWindowTrackingDelay; } }
46 public static ArrangeDirection ArrangeDirection {
48 return ThemeEngine.Current.ArrangeDirection;
52 public static ArrangeStartingPosition ArrangeStartingPosition {
54 return ThemeEngine.Current.ArrangeStartingPosition;
58 public static BootMode BootMode {
60 return BootMode.Normal;
64 public static Size Border3DSize {
66 return ThemeEngine.Current.Border3DSize;
71 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
72 public static int BorderMultiplierFactor { get { return ThemeEngine.Current.BorderMultiplierFactor; } }
75 public static Size BorderSize {
77 return ThemeEngine.Current.BorderSize;
81 public static Size CaptionButtonSize {
83 return ThemeEngine.Current.CaptionButtonSize;
87 public static int CaptionHeight {
89 return ThemeEngine.Current.CaptionHeight;
94 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
95 public static int CaretBlinkTime { get { return XplatUI.CaretBlinkTime; } }
96 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
97 public static int CaretWidth { get { return XplatUI.CaretWidth; } }
100 public static string ComputerName {
102 return Environment.MachineName;
106 public static Size CursorSize {
108 return XplatUI.CursorSize;
112 public static bool DbcsEnabled {
118 public static bool DebugOS {
124 public static Size DoubleClickSize {
126 return ThemeEngine.Current.DoubleClickSize;
130 public static int DoubleClickTime {
132 return ThemeEngine.Current.DoubleClickTime;
136 public static bool DragFullWindows {
138 return XplatUI.DragFullWindows;
142 public static Size DragSize {
144 return XplatUI.DragSize;
148 public static Size FixedFrameBorderSize {
150 return ThemeEngine.Current.FixedFrameBorderSize;
155 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
156 public static int FontSmoothingContrast { get { return XplatUI.FontSmoothingContrast; } }
157 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
158 public static int FontSmoothingType { get { return XplatUI.FontSmoothingType; } }
161 public static Size FrameBorderSize {
163 return ThemeEngine.Current.FrameBorderSize;
167 public static bool HighContrast {
174 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
175 public static int HorizontalFocusThickness { get { return ThemeEngine.Current.HorizontalFocusThickness; } }
176 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
177 public static int HorizontalResizeBorderThickness { get { return XplatUI.HorizontalResizeBorderThickness; } }
180 public static int HorizontalScrollBarArrowWidth {
182 return ThemeEngine.Current.HorizontalScrollBarArrowWidth;
186 public static int HorizontalScrollBarHeight {
188 return ThemeEngine.Current.HorizontalScrollBarHeight;
192 public static int HorizontalScrollBarThumbWidth {
194 return ThemeEngine.Current.HorizontalScrollBarThumbWidth;
198 public static Size IconSize {
200 return XplatUI.IconSize;
205 public static int IconHorizontalSpacing {
207 return IconSpacingSize.Width;
211 public static int IconVerticalSpacing {
213 return IconSpacingSize.Height;
218 public static Size IconSpacingSize {
220 return ThemeEngine.Current.IconSpacingSize;
225 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
226 public static bool IsActiveWindowTrackingEnabled {
227 get { return XplatUI.IsActiveWindowTrackingEnabled; }
230 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
231 public static bool IsComboBoxAnimationEnabled {
232 get { return XplatUI.IsComboBoxAnimationEnabled; }
235 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
236 public static bool IsDropShadowEnabled {
237 get { return XplatUI.IsDropShadowEnabled; }
240 public static bool IsFlatMenuEnabled {
241 get { return false; }
244 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
245 public static bool IsFontSmoothingEnabled {
246 get { return XplatUI.IsFontSmoothingEnabled; }
249 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
250 public static bool IsHotTrackingEnabled {
251 get { return XplatUI.IsHotTrackingEnabled; }
254 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
255 public static bool IsIconTitleWrappingEnabled {
256 get { return XplatUI.IsIconTitleWrappingEnabled; }
259 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
260 public static bool IsKeyboardPreferred {
261 get { return XplatUI.IsKeyboardPreferred; }
264 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
265 public static bool IsListBoxSmoothScrollingEnabled {
266 get { return XplatUI.IsListBoxSmoothScrollingEnabled; }
269 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
270 public static bool IsMenuAnimationEnabled {
271 get { return XplatUI.IsMenuAnimationEnabled; }
274 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
275 public static bool IsMenuFadeEnabled {
276 get { return XplatUI.IsMenuFadeEnabled; }
279 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
280 public static bool IsMinimizeRestoreAnimationEnabled {
281 get { return XplatUI.IsMinimizeRestoreAnimationEnabled; }
284 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
285 public static bool IsSelectionFadeEnabled {
286 get { return XplatUI.IsSelectionFadeEnabled; }
289 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
290 public static bool IsSnapToDefaultEnabled {
291 get { return XplatUI.IsSnapToDefaultEnabled; }
294 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
295 public static bool IsTitleBarGradientEnabled {
296 get { return XplatUI.IsTitleBarGradientEnabled; }
299 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
300 public static bool IsToolTipAnimationEnabled {
301 get { return XplatUI.IsToolTipAnimationEnabled; }
305 public static int KanjiWindowHeight {
316 static int KeyboardDelay {
318 return XplatUI.KeyboardDelay;
327 static int KeyboardSpeed {
329 return XplatUI.KeyboardSpeed;
333 public static Size MaxWindowTrackSize {
335 return XplatUI.MaxWindowTrackSize;
344 static bool MenuAccessKeysUnderlined {
346 return ThemeEngine.Current.MenuAccessKeysUnderlined;
351 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
352 public static Size MenuBarButtonSize {
353 get { return ThemeEngine.Current.MenuBarButtonSize; }
357 public static Size MenuButtonSize {
359 return ThemeEngine.Current.MenuButtonSize;
363 public static Size MenuCheckSize {
365 return ThemeEngine.Current.MenuCheckSize;
369 public static Font MenuFont {
371 // note: we MUST return a clone of the Font instance as anyone
372 // can dispose it. However we shouldn't expect the theme to do
373 // the cloning for performance reason
374 return (Font) ThemeEngine.Current.MenuFont.Clone ();
378 public static int MenuHeight {
380 return ThemeEngine.Current.MenuHeight;
385 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
386 public static int MenuShowDelay { get { return XplatUI.MenuShowDelay; } }
389 public static bool MidEastEnabled {
391 return false; // ??? how do we decide?
395 public static Size MinimizedWindowSize {
397 return XplatUI.MinimizedWindowSize;
401 public static Size MinimizedWindowSpacingSize {
403 return XplatUI.MinimizedWindowSpacingSize;
407 public static Size MinimumWindowSize {
409 return XplatUI.MinimumWindowSize;
413 public static Size MinWindowTrackSize {
415 return XplatUI.MinWindowTrackSize;
419 public static int MonitorCount {
421 return 1; // Why bother...
425 public static bool MonitorsSameDisplayFormat {
431 public static int MouseButtons {
433 return XplatUI.MouseButtonCount;
437 public static bool MouseButtonsSwapped {
439 return XplatUI.MouseButtonsSwapped;
444 public static Size MouseHoverSize {
446 return XplatUI.MouseHoverSize;
450 public static int MouseHoverTime {
452 return XplatUI.MouseHoverTime;
456 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
457 public static int MouseSpeed {
458 get { return XplatUI.MouseSpeed; }
461 public static int MouseWheelScrollDelta {
463 return XplatUI.MouseWheelScrollDelta;
467 [EditorBrowsable (EditorBrowsableState.Never)]
469 public static bool MousePresent {
475 public static bool MouseWheelPresent {
477 return XplatUI.MouseWheelPresent;
481 public static int MouseWheelScrollLines {
483 return ThemeEngine.Current.MouseWheelScrollLines;
487 public static bool NativeMouseWheelSupport {
489 return MouseWheelPresent;
493 public static bool Network {
499 public static bool PenWindows {
506 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
507 public static LeftRightAlignment PopupMenuAlignment {
508 get { return XplatUI.PopupMenuAlignment; }
511 [MonoTODO ("Only implemented for Win32.")]
512 public static PowerStatus PowerStatus {
513 get { return XplatUI.PowerStatus; }
517 public static Size PrimaryMonitorMaximizedWindowSize {
519 return new Size(WorkingArea.Width, WorkingArea.Height);
523 public static Size PrimaryMonitorSize {
525 return new Size(WorkingArea.Width, WorkingArea.Height);
529 public static bool RightAlignedMenus {
531 return ThemeEngine.Current.RightAlignedMenus;
536 public static ScreenOrientation ScreenOrientation {
537 get { return ScreenOrientation.Angle0; }
541 public static bool Secure {
547 public static bool ShowSounds {
554 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
555 public static int SizingBorderWidth {
556 get { return XplatUI.SizingBorderWidth; }
559 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
560 public static Size SmallCaptionButtonSize {
561 get { return XplatUI.SmallCaptionButtonSize; }
565 public static Size SmallIconSize {
567 return XplatUI.SmallIconSize;
572 public static bool TerminalServerSession {
579 public static Size ToolWindowCaptionButtonSize {
581 return ThemeEngine.Current.ToolWindowCaptionButtonSize;
585 public static int ToolWindowCaptionHeight {
587 return ThemeEngine.Current.ToolWindowCaptionHeight;
592 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
593 public static bool UIEffectsEnabled {
594 get { return XplatUI.UIEffectsEnabled; }
598 public static string UserDomainName {
600 return Environment.UserDomainName;
604 public static bool UserInteractive {
606 return Environment.UserInteractive;
610 public static string UserName {
612 return Environment.UserName;
617 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
618 public static int VerticalFocusThickness { get { return ThemeEngine.Current.VerticalFocusThickness; } }
619 [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
620 public static int VerticalResizeBorderThickness { get { return XplatUI.VerticalResizeBorderThickness; } }
623 public static int VerticalScrollBarArrowHeight {
625 return ThemeEngine.Current.VerticalScrollBarArrowHeight;
629 public static int VerticalScrollBarThumbHeight {
631 return ThemeEngine.Current.VerticalScrollBarThumbHeight;
635 public static int VerticalScrollBarWidth {
637 return ThemeEngine.Current.VerticalScrollBarWidth;
641 public static Rectangle VirtualScreen {
643 return XplatUI.VirtualScreen;
647 public static Rectangle WorkingArea {
649 return XplatUI.WorkingArea;