Author: rolf
Date: 2006-11-28 13:20:01 -0500 (Tue, 28 Nov 2006)
New Revision: 68595
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIDriver.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIOSX.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
Log:
2006-11-27 Rolf Bjarne Kvinge
* XplatUI.cs:
* XplatUIDriver.cs:
* XplatUIX11.cs:
* XplatUIWin32.cs:
* XplatUIOSX.cs:
- Added RequestAdditionalWM_NCMessages for windows to
opt in for WM_NCMOUSELEAVE and WM_NCMOUSEHOVER.
Currently only implemented in XplatUIWin32.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-11-28 18:14:03 UTC (rev 68594)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-11-28 18:20:01 UTC (rev 68595)
@@ -1,3 +1,14 @@
+2006-11-27 Rolf Bjarne Kvinge
+
+ * XplatUI.cs:
+ * XplatUIDriver.cs:
+ * XplatUIX11.cs:
+ * XplatUIWin32.cs:
+ * XplatUIOSX.cs:
+ - Added RequestAdditionalWM_NCMessages for windows to
+ opt in for WM_NCMOUSELEAVE and WM_NCMOUSEHOVER.
+ Currently only implemented in XplatUIWin32.
+
2006-11-27 Chris Toshok <[EMAIL PROTECTED]>
* Hwnd.cs: only add the hwnd to the windows hash in
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs
2006-11-28 18:14:03 UTC (rev 68594)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs
2006-11-28 18:20:01 UTC (rev 68595)
@@ -670,6 +670,13 @@
driver.PostQuitMessage(exitCode);
}
+ internal static void RequestAdditionalWM_NCMessages(IntPtr
handle, bool hover, bool leave) {
+ #if DriverDebug
+
Console.WriteLine("RequestAdditionalWM_NCMessages({0}, {1}, {2}): Called",
Window(handle), hover, leave);
+ #endif
+ driver.RequestAdditionalWM_NCMessages (handle, hover,
leave);
+ }
+
internal static void RequestNCRecalc(IntPtr handle) {
#if DriverDebug
Console.WriteLine("RequestNCRecalc({0}):
Called", Window(handle));
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIDriver.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIDriver.cs
2006-11-28 18:14:03 UTC (rev 68594)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIDriver.cs
2006-11-28 18:20:01 UTC (rev 68595)
@@ -278,6 +278,7 @@
internal abstract void RequestNCRecalc(IntPtr hwnd);
internal abstract void ResetMouseHover(IntPtr hwnd);
+ internal abstract void RequestAdditionalWM_NCMessages(IntPtr
hwnd, bool hover, bool leave);
// System information
internal abstract int KeyboardSpeed { get; }
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIOSX.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIOSX.cs
2006-11-28 18:14:03 UTC (rev 68594)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIOSX.cs
2006-11-28 18:20:01 UTC (rev 68595)
@@ -1402,6 +1402,11 @@
throw new NotImplementedException();
}
+ [MonoTODO]
+ internal override void RequestAdditionalWM_NCMessages(IntPtr
hwnd, bool hover, bool leave) {
+ throw new NotImplementedException();
+ }
+
[MonoTODO]
internal override void RequestNCRecalc(IntPtr handle) {
throw new NotImplementedException();
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
2006-11-28 18:14:03 UTC (rev 68594)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
2006-11-28 18:20:01 UTC (rev 68595)
@@ -61,6 +61,7 @@
private static IntPtr clip_magic = new
IntPtr(27051977);
private static int scroll_width;
private static int scroll_height;
+ private static Hashtable wm_nc_registered;
private static Win32DnD DnD;
#endregion // Local Variables
@@ -147,6 +148,7 @@
private enum TMEFlags {
TME_HOVER = 0x00000001,
TME_LEAVE = 0x00000002,
+ TME_NONCLIENT = 0x00000010,
TME_QUERY = unchecked((int)0x40000000),
TME_CANCEL = unchecked((int)0x80000000)
}
@@ -1394,6 +1396,30 @@
Win32PostQuitMessage(exitCode);
}
+ internal override void RequestAdditionalWM_NCMessages(IntPtr
hwnd, bool hover, bool leave)
+ {
+ if (wm_nc_registered == null)
+ wm_nc_registered = new Hashtable ();
+
+ TMEFlags flags = TMEFlags.TME_NONCLIENT;
+ if (hover)
+ flags |= TMEFlags.TME_HOVER;
+ if (leave)
+ flags |= TMEFlags.TME_LEAVE;
+
+ if (flags == TMEFlags.TME_NONCLIENT) {
+ if (wm_nc_registered.Contains (hwnd)) {
+ wm_nc_registered.Remove (hwnd);
+ }
+ } else {
+ if (!wm_nc_registered.Contains (hwnd)) {
+ wm_nc_registered.Add (hwnd, flags);
+ } else {
+ wm_nc_registered [hwnd] = flags;
+ }
+ }
+ }
+
internal override void RequestNCRecalc(IntPtr handle) {
Win32SetWindowPos(handle, IntPtr.Zero, 0, 0, 0, 0,
SetWindowPosFlags.SWP_FRAMECHANGED | SetWindowPosFlags.SWP_NOOWNERZORDER |
SetWindowPosFlags.SWP_NOSIZE | SetWindowPosFlags.SWP_NOMOVE);
}
@@ -1488,6 +1514,20 @@
break;
}
+ case Msg.WM_NCMOUSEMOVE: {
+ if (wm_nc_registered == null ||
!wm_nc_registered.Contains (msg.hwnd))
+ break;
+
+ TRACKMOUSEEVENT tme;
+
+ tme = new TRACKMOUSEEVENT ();
+ tme.size = Marshal.SizeOf(tme);
+ tme.hWnd = msg.hwnd;
+ tme.dwFlags =
(TMEFlags)wm_nc_registered[msg.hwnd];
+ Win32TrackMouseEvent (ref tme);
+ return result;
+ }
+
case Msg.WM_DROPFILES: {
return Win32DnD.HandleWMDropFiles(ref
msg);
}
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
2006-11-28 18:14:03 UTC (rev 68594)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
2006-11-28 18:20:01 UTC (rev 68595)
@@ -4138,6 +4138,11 @@
ThreadQueue(Thread.CurrentThread).PostQuitState = true;
}
+ internal override void RequestAdditionalWM_NCMessages(IntPtr
hwnd, bool hover, bool leave)
+ {
+ // TODO
+ }
+
internal override void RequestNCRecalc(IntPtr handle) {
Hwnd hwnd;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches