Author: gnorton
Date: 2007-12-21 16:55:30 -0500 (Fri, 21 Dec 2007)
New Revision: 91792

Modified:
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.CarbonInternal/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.CarbonInternal/Dnd.cs
Log:
2007-12-21  Geoff Norton  <[EMAIL PROTECTED]>

        * Dnd.cs: Flush the message queue during drag callbacks.  This allows
        queued paints to occur when we're dragging.



Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.CarbonInternal/ChangeLog
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.CarbonInternal/ChangeLog
 2007-12-21 21:38:19 UTC (rev 91791)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.CarbonInternal/ChangeLog
 2007-12-21 21:55:30 UTC (rev 91792)
@@ -1,5 +1,10 @@
 2007-12-21  Geoff Norton  <[EMAIL PROTECTED]>
 
+       * Dnd.cs: Flush the message queue during drag callbacks.  This allows
+       queued paints to occur when we're dragging.
+
+2007-12-21  Geoff Norton  <[EMAIL PROTECTED]>
+
        * Dnd.cs: Add support for D&D of objects internally and serialized
        objects across instances.
 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.CarbonInternal/Dnd.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.CarbonInternal/Dnd.cs
    2007-12-21 21:38:19 UTC (rev 91791)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.CarbonInternal/Dnd.cs
    2007-12-21 21:55:30 UTC (rev 91792)
@@ -37,6 +37,8 @@
 using System.Runtime.Serialization.Formatters.Binary;
 
 namespace System.Windows.Forms.CarbonInternal {
+       internal delegate void DragTrackingDelegate (short message, IntPtr 
window, IntPtr data, IntPtr dragref);
+
        internal class Dnd {
                internal const uint kEventParamDragRef = 1685217639; 
                internal const uint typeDragRef = 1685217639;
@@ -45,13 +47,21 @@
                internal const uint typeMonoSerializedObject = 1836279154;
 
                private static DragDropEffects effects = DragDropEffects.None;
+               private static DragTrackingDelegate DragTrackingHandler = new 
DragTrackingDelegate (TrackingCallback);
 
+               static Dnd () {
+                       InstallTrackingHandler (DragTrackingHandler, 
IntPtr.Zero, IntPtr.Zero);
+               }
+
                internal Dnd () {
                }
 
+               internal static void TrackingCallback (short message, IntPtr 
window, IntPtr data, IntPtr dragref) {
+                       XplatUICarbon.GetInstance ().FlushQueue ();
+               }
+       
                internal static DragDropEffects DragActionsToEffects (UInt32 
actions) {
                        DragDropEffects effects = DragDropEffects.None;
-
                        if ((actions & 1) != 0)
                                effects |= DragDropEffects.Copy;
                        if ((actions & (1 << 4)) != 0)
@@ -195,6 +205,9 @@
                }
 
                [DllImport 
("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")]
+               static extern int InstallTrackingHandler (DragTrackingDelegate 
callback, IntPtr window, IntPtr data);
+
+               [DllImport 
("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")]
                static extern int GetEventParameter (IntPtr eventref, uint 
name, uint type, IntPtr outtype, uint size, IntPtr outsize, ref IntPtr data);
                [DllImport 
("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")]
                static extern int SetEventParameter (IntPtr eventref, uint 
name, uint type, uint size, ref bool data);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to