[MWF] Implement multi-display support on Linux (Fixes #325669)
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / SystemInformation.cs
index f9884ffc04052adad86b5e40298a82f3de1da554..6a10a9173584dc7f02507d75bfcc03013662c1c0 100644 (file)
@@ -28,6 +28,7 @@
 
 using System;
 using System.Drawing;
+using System.ComponentModel;
 
 namespace System.Windows.Forms
 {
@@ -37,6 +38,9 @@ namespace System.Windows.Forms
                {
                }
 
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static int ActiveWindowTrackingDelay { get { return XplatUI.ActiveWindowTrackingDelay; } }
+
                public static ArrangeDirection ArrangeDirection {
                        get {
                                return ThemeEngine.Current.ArrangeDirection;
@@ -60,6 +64,9 @@ namespace System.Windows.Forms
                                return ThemeEngine.Current.Border3DSize;
                        }
                }
+               
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static int BorderMultiplierFactor { get { return ThemeEngine.Current.BorderMultiplierFactor; } }
 
                public static Size BorderSize {
                        get {
@@ -79,6 +86,11 @@ namespace System.Windows.Forms
                        }
                }
 
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static int CaretBlinkTime { get { return XplatUI.CaretBlinkTime; } }
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static int CaretWidth { get { return XplatUI.CaretWidth; } }
+
                public static string ComputerName {
                        get {
                                return Environment.MachineName;
@@ -133,6 +145,11 @@ namespace System.Windows.Forms
                        }
                }
 
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static int FontSmoothingContrast { get { return XplatUI.FontSmoothingContrast; } }
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static int FontSmoothingType { get { return XplatUI.FontSmoothingType; } }
+
                public static Size FrameBorderSize {
                        get {
                                return ThemeEngine.Current.FrameBorderSize;
@@ -145,6 +162,11 @@ namespace System.Windows.Forms
                        }
                }
 
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static int HorizontalFocusThickness { get { return ThemeEngine.Current.HorizontalFocusThickness; } }
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static int HorizontalResizeBorderThickness { get { return XplatUI.HorizontalResizeBorderThickness; } }
+
                public static int HorizontalScrollBarArrowWidth {
                        get {
                                return ThemeEngine.Current.HorizontalScrollBarArrowWidth;
@@ -169,35 +191,116 @@ namespace System.Windows.Forms
                        }
                }
 
+               public static int IconHorizontalSpacing {
+                       get {
+                               return IconSpacingSize.Width;
+                       }
+               }
+
+               public static int IconVerticalSpacing {
+                       get {
+                               return IconSpacingSize.Height;
+                       }
+               }
+
                public static Size IconSpacingSize {
                        get {
                                return ThemeEngine.Current.IconSpacingSize;
                        }
                }
 
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static bool IsActiveWindowTrackingEnabled {
+                       get { return XplatUI.IsActiveWindowTrackingEnabled; }
+               }
+
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static bool IsComboBoxAnimationEnabled {
+                       get { return XplatUI.IsComboBoxAnimationEnabled; }
+               }
+
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static bool IsDropShadowEnabled {
+                       get { return XplatUI.IsDropShadowEnabled; }
+               }
+
+               public static bool IsFlatMenuEnabled {
+                       get { return false; }
+               }
+
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static bool IsFontSmoothingEnabled {
+                       get { return XplatUI.IsFontSmoothingEnabled; }
+               }
+
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static bool IsHotTrackingEnabled {
+                       get { return XplatUI.IsHotTrackingEnabled; }
+               }
+
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static bool IsIconTitleWrappingEnabled {
+                       get { return XplatUI.IsIconTitleWrappingEnabled; }
+               }
+
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static bool IsKeyboardPreferred {
+                       get { return XplatUI.IsKeyboardPreferred; }
+               }
+
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static bool IsListBoxSmoothScrollingEnabled {
+                       get { return XplatUI.IsListBoxSmoothScrollingEnabled; }
+               }
+
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static bool IsMenuAnimationEnabled {
+                       get { return XplatUI.IsMenuAnimationEnabled; }
+               }
+
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static bool IsMenuFadeEnabled {
+                       get { return XplatUI.IsMenuFadeEnabled; }
+               }
+
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static bool IsMinimizeRestoreAnimationEnabled {
+                       get { return XplatUI.IsMinimizeRestoreAnimationEnabled; }
+               }
+
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static bool IsSelectionFadeEnabled {
+                       get { return XplatUI.IsSelectionFadeEnabled; }
+               }
+
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static bool IsSnapToDefaultEnabled {
+                       get { return XplatUI.IsSnapToDefaultEnabled; }
+               }
+
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static bool IsTitleBarGradientEnabled {
+                       get { return XplatUI.IsTitleBarGradientEnabled; }
+               }
+
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static bool IsToolTipAnimationEnabled {
+                       get { return XplatUI.IsToolTipAnimationEnabled; }
+               }
+
                public static int KanjiWindowHeight {
                        get {
                                return 0;
                        }
                }
 
-#if NET_2_0
-               public
-#else
-               internal
-#endif
-               static int KeyboardDelay {
+               public static int KeyboardDelay {
                        get {
                                return XplatUI.KeyboardDelay;
                        }
                }
 
-#if NET_2_0
-               public
-#else
-               internal
-#endif
-               static int KeyboardSpeed {
+               public static int KeyboardSpeed {
                        get {
                                return XplatUI.KeyboardSpeed;
                        }
@@ -209,17 +312,17 @@ namespace System.Windows.Forms
                        }
                }
 
-#if NET_2_0
-               public
-#else
-               internal
-#endif
-               static bool MenuAccessKeysUnderlined {
+               public static bool MenuAccessKeysUnderlined {
                        get {
                                return ThemeEngine.Current.MenuAccessKeysUnderlined;
                        }
                }
 
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static Size MenuBarButtonSize {
+                       get { return ThemeEngine.Current.MenuBarButtonSize; }
+               }
+
                public static Size MenuButtonSize {
                        get {
                                return ThemeEngine.Current.MenuButtonSize;
@@ -247,6 +350,9 @@ namespace System.Windows.Forms
                        }
                }
 
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static int MenuShowDelay { get { return XplatUI.MenuShowDelay; } }
+
                public static bool MidEastEnabled {
                        get {
                                return false; // ??? how do we decide?
@@ -279,7 +385,7 @@ namespace System.Windows.Forms
 
                public static int MonitorCount {
                        get {
-                               return 1;               // Why bother...
+                               return Screen.AllScreens.Length;
                        }
                }
 
@@ -301,7 +407,6 @@ namespace System.Windows.Forms
                        }
                }
 
-#if NET_2_0
                public static Size MouseHoverSize {
                        get {
                                return XplatUI.MouseHoverSize;
@@ -314,13 +419,18 @@ namespace System.Windows.Forms
                        }
                }
 
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static int MouseSpeed {
+                       get { return XplatUI.MouseSpeed; }
+               }
+               
                public static int MouseWheelScrollDelta {
                        get {
                                return XplatUI.MouseWheelScrollDelta;
                        }
                }
-#endif
 
+               [EditorBrowsable (EditorBrowsableState.Never)]
                public static bool MousePresent {
                        get {
                                return true;
@@ -357,15 +467,27 @@ namespace System.Windows.Forms
                        }
                }
 
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static LeftRightAlignment PopupMenuAlignment {
+                       get { return XplatUI.PopupMenuAlignment; }
+               }
+               
+               [MonoTODO ("Only implemented for Win32.")]
+               public static PowerStatus PowerStatus {
+                       get { return XplatUI.PowerStatus; }
+               }
+
                public static Size PrimaryMonitorMaximizedWindowSize {
                        get {
-                               return new Size(WorkingArea.Width, WorkingArea.Height);
+                               var workingArea = Screen.PrimaryScreen.WorkingArea;
+                               return new Size (workingArea.Width, workingArea.Height);
                        }
                }
 
                public static Size PrimaryMonitorSize {
                        get {
-                               return new Size(WorkingArea.Width, WorkingArea.Height);
+                               var bounds = Screen.PrimaryScreen.Bounds;
+                               return new Size (bounds.Width, bounds.Height);
                        }
                }
 
@@ -375,6 +497,10 @@ namespace System.Windows.Forms
                        }
                }
 
+               public static ScreenOrientation ScreenOrientation {
+                       get { return ScreenOrientation.Angle0; }
+               }
+
                public static bool Secure {
                        get {
                                return true;
@@ -387,19 +513,27 @@ namespace System.Windows.Forms
                        }
                }
 
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static int SizingBorderWidth {
+                       get { return XplatUI.SizingBorderWidth; }
+               }
+
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static Size SmallCaptionButtonSize {
+                       get { return XplatUI.SmallCaptionButtonSize; }
+               }
+
                public static Size SmallIconSize {
                        get {
                                return XplatUI.SmallIconSize;
                        }
                }
 
-#if NET_2_0
                public static bool TerminalServerSession {
                        get {
                                return false;
                        }
                }
-#endif
 
                public static Size ToolWindowCaptionButtonSize {
                        get {
@@ -413,6 +547,11 @@ namespace System.Windows.Forms
                        }
                }
 
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static bool UIEffectsEnabled {
+                       get { return XplatUI.UIEffectsEnabled; }
+               }
+
                public static string UserDomainName {
                        get {
                                return Environment.UserDomainName;
@@ -431,6 +570,11 @@ namespace System.Windows.Forms
                        }
                }
 
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static int VerticalFocusThickness { get { return ThemeEngine.Current.VerticalFocusThickness; } }
+               [MonoInternalNote ("Determine if we need an X11 implementation or if defaults are good.")]
+               public static int VerticalResizeBorderThickness { get { return XplatUI.VerticalResizeBorderThickness; } }
+
                public static int VerticalScrollBarArrowHeight {
                        get {
                                return ThemeEngine.Current.VerticalScrollBarArrowHeight;
@@ -451,13 +595,16 @@ namespace System.Windows.Forms
 
                public static Rectangle VirtualScreen {
                        get {
-                               return XplatUI.VirtualScreen;
+                               var rect = new Rectangle ();
+                               foreach (var screen in Screen.AllScreens)
+                                       rect = Rectangle.Union (rect, screen.Bounds);
+                               return rect;
                        }
                }
 
                public static Rectangle WorkingArea {
                        get {
-                               return XplatUI.WorkingArea;
+                               return Screen.PrimaryScreen.WorkingArea;
                        }
                }
        }