Author: miguel
Date: 2007-06-12 18:57:51 -0400 (Tue, 12 Jun 2007)
New Revision: 79352
Modified:
trunk/olive/class/agclr/Mono/Hosting.cs
trunk/olive/class/agclr/Mono/NativeMethods.cs
trunk/olive/class/agclr/System.Windows/UIElement.cs
trunk/olive/class/agclr/agclr.dll.sources
Log:
First pass at the events
Modified: trunk/olive/class/agclr/Mono/Hosting.cs
===================================================================
--- trunk/olive/class/agclr/Mono/Hosting.cs 2007-06-12 22:57:41 UTC (rev
79351)
+++ trunk/olive/class/agclr/Mono/Hosting.cs 2007-06-12 22:57:51 UTC (rev
79352)
@@ -28,6 +28,7 @@
//
using System;
using System.Windows;
+using System.Windows.Controls;
namespace Mono {
public class Hosting {
@@ -39,5 +40,11 @@
return obj.native;
}
+
+ internal static void SurfaceAttach (IntPtr raw, Canvas c)
+ {
+ NativeMethods.surface_attach (raw, c.native);
+ Events.InitSurface (raw);
+ }
}
}
Modified: trunk/olive/class/agclr/Mono/NativeMethods.cs
===================================================================
--- trunk/olive/class/agclr/Mono/NativeMethods.cs 2007-06-12 22:57:41 UTC
(rev 79351)
+++ trunk/olive/class/agclr/Mono/NativeMethods.cs 2007-06-12 22:57:51 UTC
(rev 79352)
@@ -35,7 +35,20 @@
[DllImport("moon")]
internal extern static void runtime_init ();
-
+
+ [DllImport("moon")]
+ internal extern static void register_events (IntPtr surface,
+ CallbackMouseEvent
motion,
+ CallbackMouseEvent
down,
+ CallbackMouseEvent
up,
+ CallbackMouseEvent
enter,
+ PlainEvent
got_focus,
+ PlainEvent
lost_focus,
+ PlainEvent loaded,
+ PlainEvent
mouse_leave,
+ KeyboardEvent
keydown,
+ KeyboardEvent
keyup);
+
#region Base
[DllImport("moon")]
internal extern static void base_ref (IntPtr ptr);
@@ -190,5 +203,8 @@
internal extern static IntPtr begin_storyboard_new ();
#endregion
+
+ [DllImport ("moon")]
+ internal extern static IntPtr surface_attach (IntPtr surface,
IntPtr toplevel);
}
}
Modified: trunk/olive/class/agclr/System.Windows/UIElement.cs
===================================================================
--- trunk/olive/class/agclr/System.Windows/UIElement.cs 2007-06-12 22:57:41 UTC
(rev 79351)
+++ trunk/olive/class/agclr/System.Windows/UIElement.cs 2007-06-12 22:57:51 UTC
(rev 79352)
@@ -32,6 +32,7 @@
using Mono;
namespace System.Windows {
+
public abstract class UIElement : Visual {
public static readonly DependencyProperty OpacityProperty;
public static readonly DependencyProperty ClipProperty;
@@ -162,14 +163,14 @@
SetValue (VisibilityProperty, value);
}
}
-
+
public event EventHandler GotFocus;
public event EventHandler LostFocus;
public event EventHandler Loaded;
public event KeyboardEventHandler KeyDown;
public event KeyboardEventHandler KeyUp;
-
+
public event MouseEventHandler MouseEnter;
public event EventHandler MouseLeave;
Modified: trunk/olive/class/agclr/agclr.dll.sources
===================================================================
--- trunk/olive/class/agclr/agclr.dll.sources 2007-06-12 22:57:41 UTC (rev
79351)
+++ trunk/olive/class/agclr/agclr.dll.sources 2007-06-12 22:57:51 UTC (rev
79352)
@@ -2,6 +2,7 @@
Assembly/AssemblyInfo.cs
../../build/common/Consts.cs
../../build/common/MonoTODOAttribute.cs
+Mono/Events.cs
Mono/Hosting.cs
Mono/Kind.cs
Mono/NativeMethods.cs
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches