// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-// Copyright (c) 2004 Novell, Inc.
+// Copyright (c) 2004,2006 Novell, Inc. (http://www.novell.com)
//
// Authors:
// Miguel de Icaza (miguel@novell.com).
using System;
using System.Drawing;
+using System.ComponentModel;
-namespace System.Windows.Forms {
- public class SystemInformation {
- #region Constructor
- internal SystemInformation() {
+namespace System.Windows.Forms
+{
+ public class SystemInformation
+ {
+ private SystemInformation ()
+ {
}
- #endregion
- #region Public Static Properties
+ [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;
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 {
- return ThemeEngine.Current.Border3DSize;
+ return ThemeEngine.Current.BorderSize;
}
}
}
}
+ [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;
}
}
+ [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;
}
}
+ [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;
}
}
+ 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;
}
}
+ public static int KeyboardDelay {
+ get {
+ return XplatUI.KeyboardDelay;
+ }
+ }
+
+ public static int KeyboardSpeed {
+ get {
+ return XplatUI.KeyboardSpeed;
+ }
+ }
+
public static Size MaxWindowTrackSize {
get {
return XplatUI.MaxWindowTrackSize;
}
}
+ 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;
public static Font MenuFont {
get {
- return ThemeEngine.Current.MenuFont;
+ // note: we MUST return a clone of the Font instance as anyone
+ // can dispose it. However we shouldn't expect the theme to do
+ // the cloning for performance reason
+ return (Font) ThemeEngine.Current.MenuFont.Clone ();
}
}
}
}
+ [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?
public static int MonitorCount {
get {
- return 1; // Why bother...
+ return Screen.AllScreens.Length;
}
}
}
}
+ public static Size MouseHoverSize {
+ get {
+ return XplatUI.MouseHoverSize;
+ }
+ }
+
+ public static int MouseHoverTime {
+ get {
+ return XplatUI.MouseHoverTime;
+ }
+ }
+
+ [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;
+ }
+ }
+
+ [EditorBrowsable (EditorBrowsableState.Never)]
public static bool MousePresent {
get {
return true;
}
}
+ [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);
}
}
}
}
+ public static ScreenOrientation ScreenOrientation {
+ get { return ScreenOrientation.Angle0; }
+ }
+
public static bool Secure {
get {
- return true; // FIXME - figure out if we're running 98/Me and return false
+ return true;
}
}
}
}
+ [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;
}
}
+ public static bool TerminalServerSession {
+ get {
+ return false;
+ }
+ }
+
public static Size ToolWindowCaptionButtonSize {
get {
return ThemeEngine.Current.ToolWindowCaptionButtonSize;
}
}
+ [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;
}
}
+ [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;
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;
- }
- }
- #endregion // Public Static Properties
-
- #region Internal Static Properties
- internal static int KeyboardSpeed {
- get {
- return XplatUI.KeyboardSpeed;
- }
- }
-
- internal static int KeyboardDelay {
- get {
- return XplatUI.KeyboardDelay;
+ return Screen.PrimaryScreen.WorkingArea;
}
}
- #endregion // Internal Static Properties
}
}