2006-05-15 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / XplatUI.cs
index 83e5bad8fbda792a7269a72414ecfc036df2f41d..137d9f12d2b7b28a49146d9816a745ea367d5b35 100644 (file)
@@ -77,9 +77,8 @@ namespace System.Windows.Forms {
 
                #region Constructor & Destructor
                static XplatUI() {
-                       Console.WriteLine("Mono System.Windows.Forms Assembly [Revision: 54007; built: 2005/12/6 14:35:24]");
+                       Console.WriteLine("Mono System.Windows.Forms Assembly [$auto_build_revision$]");
 
-                       // Don't forget to throw the mac in here somewhere, too
                        default_class_name="SWFClass";
 
                        // check for Unix platforms - see FAQ for more details
@@ -142,6 +141,12 @@ namespace System.Windows.Forms {
                        }
                }
 
+               static public int HorizontalScrollBarHeight {
+                       get {
+                               return driver.HorizontalScrollBarHeight;
+                       }
+               }
+
                static public Size IconSize {
                        get {
                                return driver.IconSize;
@@ -196,6 +201,12 @@ namespace System.Windows.Forms {
                        }
                }
 
+               static public int MenuHeight {
+                       get {
+                               return driver.MenuHeight;
+                       }
+               }
+
                static public int MouseButtonCount {
                        get {
                                return driver.MouseButtonCount;
@@ -208,12 +219,36 @@ namespace System.Windows.Forms {
                        }
                }
 
+               static public Size MouseHoverSize {
+                       get {
+                               return driver.MouseHoverSize;
+                       }
+               }
+
+               static public int MouseHoverTime {
+                       get {
+                               return driver.MouseHoverTime;
+                       }
+               }
+
                static public bool MouseWheelPresent {
                        get {
                                return driver.MouseWheelPresent;
                        }
                }
 
+               static public bool UserClipWontExposeParent {
+                       get {
+                               return driver.UserClipWontExposeParent;
+                       }
+               }
+
+               static public int VerticalScrollBarWidth {
+                       get {
+                               return driver.VerticalScrollBarWidth;
+                       }
+               }
+
                static public Rectangle VirtualScreen {
                        get {
                                return driver.VirtualScreen;
@@ -254,11 +289,11 @@ namespace System.Windows.Forms {
                        driver.AudibleAlert();
                }
 
-               internal static bool CalculateWindowRect(IntPtr handle, ref Rectangle ClientRect, int Style, int ExStyle, Menu menu, out Rectangle WindowRect) {
+               internal static bool CalculateWindowRect(ref Rectangle ClientRect, int Style, int ExStyle, Menu menu, out Rectangle WindowRect) {
                        #if DriverDebug
-                               Console.WriteLine("CalculateWindowRect({0}): Called", Window(handle));
+                               Console.WriteLine("CalculateWindowRect({0}, {1}, {2}, {3}): Called", ClientRect, Style, ExStyle, menu);
                        #endif
-                       return driver.CalculateWindowRect(handle, ref ClientRect, Style, ExStyle, menu, out WindowRect);
+                       return driver.CalculateWindowRect(ref ClientRect, Style, ExStyle, menu, out WindowRect);
                }
 
                internal static void CaretVisible(IntPtr handle, bool visible) {
@@ -427,6 +462,13 @@ namespace System.Windows.Forms {
                        return driver.GetAutoScaleSize(font);
                }
 
+               internal static Region GetClipRegion(IntPtr handle) {
+                       #if DriverDebug
+                               Console.WriteLine("GetClipRegion({0}): Called", Window(handle));
+                       #endif
+                       return driver.GetClipRegion(handle);
+               }
+
                internal static void GetCursorInfo(IntPtr cursor, out int width, out int height, out int hotspot_x, out int hotspot_y) {
                        #if DriverDebug
                                Console.WriteLine("GetCursorInfo({0}): Called", cursor.ToInt32());
@@ -455,13 +497,6 @@ namespace System.Windows.Forms {
                        return driver.GetFontMetrics(g, font, out ascent, out descent);
                }
                        
-               internal static Graphics GetMenuDC(IntPtr handle, IntPtr ncpaint_region) {
-                       #if DriverDebug
-                               Console.WriteLine("GetMenuDC({0}): Called", Window(handle));
-                       #endif
-                       return driver.GetMenuDC(handle, ncpaint_region);
-               }
-
                internal static Point GetMenuOrigin(IntPtr handle) {
                        #if DriverDebug
                                Console.WriteLine("GetMenuOrigin({0}): Called", Window(handle));
@@ -469,8 +504,8 @@ namespace System.Windows.Forms {
                        return driver.GetMenuOrigin(handle);
                }
 
-               internal static bool GetMessage(ref MSG msg, IntPtr hWnd, int wFilterMin, int wFilterMax) {
-                       return driver.GetMessage(ref msg, hWnd, wFilterMin, wFilterMax);
+               internal static bool GetMessage(object queue_id, ref MSG msg, IntPtr hWnd, int wFilterMin, int wFilterMax) {
+                       return driver.GetMessage(queue_id, ref msg, hWnd, wFilterMin, wFilterMax);
                }
 
                internal static IntPtr GetParent(IntPtr handle) {
@@ -576,8 +611,8 @@ namespace System.Windows.Forms {
                        return driver.PaintEventStart(handle, client);
                }
 
-               internal static bool PeekMessage(ref MSG msg, IntPtr hWnd, int wFilterMin, int wFilterMax, uint flags) {
-                       return driver.PeekMessage(ref msg, hWnd, wFilterMin, wFilterMax, flags);
+               internal static bool PeekMessage(Object queue_id, ref MSG msg, IntPtr hWnd, int wFilterMin, int wFilterMax, uint flags) {
+                       return driver.PeekMessage(queue_id, ref msg, hWnd, wFilterMin, wFilterMax, flags);
                }
 
                internal static bool PostMessage(IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam) {
@@ -601,11 +636,18 @@ namespace System.Windows.Forms {
                        driver.PostQuitMessage(exitCode);
                }
 
-               internal static void ReleaseMenuDC(IntPtr handle, Graphics dc) {
+               internal static void RequestNCRecalc(IntPtr handle) {
+                       #if DriverDebug
+                               Console.WriteLine("RequestNCRecalc({0}): Called", Window(handle));
+                       #endif
+                       driver.RequestNCRecalc(handle);
+               }
+
+               internal static void ResetMouseHover(IntPtr handle) {
                        #if DriverDebug
-                               Console.WriteLine("ReleaseMenuDC({0:X}): Called", handle.ToInt32());
+                               Console.WriteLine("ResetMouseHover({0}): Called", Window(handle));
                        #endif
-                       driver.ReleaseMenuDC(handle, dc);
+                       driver.ResetMouseHover(handle);
                }
 
                internal static void ScreenToClient(IntPtr handle, ref int x, ref int y) {
@@ -679,6 +721,13 @@ namespace System.Windows.Forms {
                        driver.SetCaretPos(handle, x, y);
                }
 
+               internal static void SetClipRegion(IntPtr handle, Region region) {
+                       #if DriverDebug
+                               Console.WriteLine("SetClipRegion({0}, {1}): Called", Window(handle), region);
+                       #endif
+                       driver.SetClipRegion(handle, region);
+               }
+
                internal static void SetCursor(IntPtr handle, IntPtr cursor) {
                        #if DriverDebug
                                Console.WriteLine("SetCursor({0}, {1:X}): Called", Window(handle), cursor.ToInt32());
@@ -750,6 +799,13 @@ namespace System.Windows.Forms {
                        return driver.SetVisible(handle, visible);
                }
 
+               internal static void SetWindowMinMax(IntPtr handle, Rectangle maximized, Size min, Size max) {
+                       #if DriverDebug || DriverDebugState
+                               Console.WriteLine("SetWindowMinMax({0}, {1}, {2}, {3}): Called", Window(handle), maximized, min, max);
+                       #endif
+                       driver.SetWindowMinMax(handle, maximized, min, max);
+               }
+
                internal static void SetWindowPos(IntPtr handle, int x, int y, int width, int height) {
                        #if DriverDebug
                                Console.WriteLine("SetWindowPos({0}, {1}, {2}, {3}, {4}): Called", Window(handle), x, y, width, height);
@@ -800,11 +856,11 @@ namespace System.Windows.Forms {
                        return driver.StartDrag (handle, data, allowedEffects);
                }
 
-               internal static void StartLoop(Thread thread) {
+               internal static object StartLoop(Thread thread) {
                        #if DriverDebug
                                Console.WriteLine("StartLoop({0:X}): Called", thread.GetHashCode());
                        #endif
-                       driver.StartLoop(thread);
+                       return driver.StartLoop(thread);
                }
 
                internal static bool SupportsTransparency() {