Author: fejj
Date: 2007-11-08 12:12:51 -0500 (Thu, 08 Nov 2007)
New Revision: 89213

Removed:
   trunk/olive/class/agclr/console.log
Modified:
   trunk/olive/class/agclr/ChangeLog
   trunk/olive/class/agclr/Mono/ManagedXamlLoader.cs
   trunk/olive/class/agclr/System.Windows.Interop/BrowserHost.cs
Log:
2007-11-08  Jeffrey Stedfast  <[EMAIL PROTECTED]>

        * System.Windows.Interop/BrowserHost.cs: Implemented Resize event.



Modified: trunk/olive/class/agclr/ChangeLog
===================================================================
--- trunk/olive/class/agclr/ChangeLog   2007-11-08 17:10:23 UTC (rev 89212)
+++ trunk/olive/class/agclr/ChangeLog   2007-11-08 17:12:51 UTC (rev 89213)
@@ -1,3 +1,7 @@
+2007-11-08  Jeffrey Stedfast  <[EMAIL PROTECTED]>
+
+       * System.Windows.Interop/BrowserHost.cs: Implemented Resize event.
+
 2007-10-04  Zoltan Varga  <[EMAIL PROTECTED]>
 
        * System.IO/SimpleUnmanagedMemoryStream.cs: Fix a warning.

Modified: trunk/olive/class/agclr/Mono/ManagedXamlLoader.cs
===================================================================
--- trunk/olive/class/agclr/Mono/ManagedXamlLoader.cs   2007-11-08 17:10:23 UTC 
(rev 89212)
+++ trunk/olive/class/agclr/Mono/ManagedXamlLoader.cs   2007-11-08 17:12:51 UTC 
(rev 89213)
@@ -124,7 +124,6 @@
 
                        PluginInDomain = plugin;
                        SurfaceInDomain = surface;
-                       
                }
 
                private string get_mapping (string key)

Modified: trunk/olive/class/agclr/System.Windows.Interop/BrowserHost.cs
===================================================================
--- trunk/olive/class/agclr/System.Windows.Interop/BrowserHost.cs       
2007-11-08 17:10:23 UTC (rev 89212)
+++ trunk/olive/class/agclr/System.Windows.Interop/BrowserHost.cs       
2007-11-08 17:12:51 UTC (rev 89213)
@@ -32,6 +32,9 @@
 namespace System.Windows.Interop {
 
        public static class BrowserHost {
+               static EventHandlerList events = new EventHandlerList ();
+               static IntPtr surface = IntPtr.Zero;
+               
                // Why are ActualHeight and ActualWidth uints?
                
                public static uint ActualHeight {
@@ -66,17 +69,34 @@
                                // not yet implemented
                        }
                }
-
+               
                public static event EventHandler FullScreenChange;
-
+               
+               static object ResizeEvent = new object ();
+               
                internal static void InvokeResize ()
                {
-                       EventHandler h = Resize;
-
+                       EventHandler h = (EventHandler) events[ResizeEvent];
+                       
                        if (h != null)
                                h (null, EventArgs.Empty);
                }
                
-               public static event EventHandler Resize;
+               public static event EventHandler Resize {
+                       add {
+                               if (surface == IntPtr.Zero) {
+                                       surface = 
NativeMethods.plugin_instance_get_surface (PluginHost.Handle);
+                                       Events.InitSurface (surface);
+                               }
+                               
+                               events.AddHandler (ResizeEvent, value);
+                               
+                               InvokeResize ();
+                       }
+                       
+                       remove {
+                               events.RemoveHandler (ResizeEvent, value);
+                       }
+               }
        }
 }

Deleted: trunk/olive/class/agclr/console.log
===================================================================

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

Reply via email to