Author: toshok
Date: 2007-06-20 18:14:29 -0400 (Wed, 20 Jun 2007)
New Revision: 80373
Modified:
trunk/olive/class/agclr/Mono/ChangeLog
trunk/olive/class/agclr/Mono/NativeMethods.cs
trunk/olive/class/agclr/System.Windows.Controls/ChangeLog
trunk/olive/class/agclr/System.Windows.Controls/Control.cs
trunk/olive/class/agclr/System.Windows/ChangeLog
trunk/olive/class/agclr/System.Windows/XamlReader.cs
Log:
In System.Windows.Controls:
* Control.cs: pass the XamlReader callbacks to
control_initialize_from_xaml.
2007-06-20 Chris Toshok <[EMAIL PROTECTED]>
In Mono:
2007-06-20 Chris Toshok <[EMAIL PROTECTED]>
* NativeMethods.cs: add the callbacks to
control_initialize_from_xaml's signature.
In System.Windows:
2007-06-20 Chris Toshok <[EMAIL PROTECTED]>
* XamlReader.cs: make the callbacks internal so we can use the
from FrameworkElement.InitializeFromXaml.
Modified: trunk/olive/class/agclr/Mono/ChangeLog
===================================================================
--- trunk/olive/class/agclr/Mono/ChangeLog 2007-06-20 22:13:13 UTC (rev
80372)
+++ trunk/olive/class/agclr/Mono/ChangeLog 2007-06-20 22:14:29 UTC (rev
80373)
@@ -1,3 +1,8 @@
+2007-06-20 Chris Toshok <[EMAIL PROTECTED]>
+
+ * NativeMethods.cs: add the callbacks to
+ control_initialize_from_xaml's signature.
+
2007-06-20 Jeffrey Stedfast <[EMAIL PROTECTED]>
* NativeMethods.cs: Bind to dependency_object_get_kind() (this
Modified: trunk/olive/class/agclr/Mono/NativeMethods.cs
===================================================================
--- trunk/olive/class/agclr/Mono/NativeMethods.cs 2007-06-20 22:13:13 UTC
(rev 80372)
+++ trunk/olive/class/agclr/Mono/NativeMethods.cs 2007-06-20 22:14:29 UTC
(rev 80373)
@@ -528,7 +528,11 @@
internal extern static void text_block_set_font_source (IntPtr
textblock, IntPtr downloader);
[DllImport ("moon")]
- internal extern static IntPtr control_initialize_from_xaml
(IntPtr control, string xaml, out Kind kind);
+ internal extern static IntPtr control_initialize_from_xaml
(IntPtr control, string xaml,
+
Mono.CreateCustomXamlElementCallback ccecb,
+
Mono.SetCustomXamlAttributeCallback scacb,
+
Mono.XamlHookupEventCallback hue,
+ out
Kind kind);
#region EventObject
Modified: trunk/olive/class/agclr/System.Windows/ChangeLog
===================================================================
--- trunk/olive/class/agclr/System.Windows/ChangeLog 2007-06-20 22:13:13 UTC
(rev 80372)
+++ trunk/olive/class/agclr/System.Windows/ChangeLog 2007-06-20 22:14:29 UTC
(rev 80373)
@@ -1,3 +1,8 @@
+2007-06-20 Chris Toshok <[EMAIL PROTECTED]>
+
+ * XamlReader.cs: make the callbacks internal so we can use the
+ from FrameworkElement.InitializeFromXaml.
+
2007-06-20 Jeffrey Stedfast <[EMAIL PROTECTED]>
* DependencyObject.cs: Add VISUAL to the "NotImplemented" abstract
Modified: trunk/olive/class/agclr/System.Windows/XamlReader.cs
===================================================================
--- trunk/olive/class/agclr/System.Windows/XamlReader.cs 2007-06-20
22:13:13 UTC (rev 80372)
+++ trunk/olive/class/agclr/System.Windows/XamlReader.cs 2007-06-20
22:14:29 UTC (rev 80373)
@@ -38,9 +38,9 @@
public static class XamlReader {
- static CreateCustomXamlElementCallback custom_el_cb = new
CreateCustomXamlElementCallback (create_element);
- static SetCustomXamlAttributeCallback custom_at_cb = new
SetCustomXamlAttributeCallback (set_attribute);
- static XamlHookupEventCallback hookup_event_cb = new
XamlHookupEventCallback (hookup_event);
+ internal static CreateCustomXamlElementCallback custom_el_cb =
new CreateCustomXamlElementCallback (create_element);
+ internal static SetCustomXamlAttributeCallback custom_at_cb =
new SetCustomXamlAttributeCallback (set_attribute);
+ internal static XamlHookupEventCallback hookup_event_cb = new
XamlHookupEventCallback (hookup_event);
public static DependencyObject Load (string xaml)
{
@@ -75,6 +75,8 @@
return IntPtr.Zero;
}
+ Console.WriteLine ("Loading assembly from {0}",
asm_path);
+
// TODO: Use a downloader here
Assembly clientlib = Assembly.LoadFile (asm_path);
if (clientlib == null) {
@@ -100,7 +102,7 @@
}
- private static void set_attribute (IntPtr target_ptr, string
name, string value)
+ internal static void set_attribute (IntPtr target_ptr, string
name, string value)
{
MethodInfo m = typeof (DependencyObject).GetMethod
("Lookup",
BindingFlags.Static |
BindingFlags.NonPublic, null, new Type [] { typeof (IntPtr) }, null);
Modified: trunk/olive/class/agclr/System.Windows.Controls/ChangeLog
===================================================================
--- trunk/olive/class/agclr/System.Windows.Controls/ChangeLog 2007-06-20
22:13:13 UTC (rev 80372)
+++ trunk/olive/class/agclr/System.Windows.Controls/ChangeLog 2007-06-20
22:14:29 UTC (rev 80373)
@@ -1,5 +1,10 @@
2007-06-20 Chris Toshok <[EMAIL PROTECTED]>
+ * Control.cs: pass the XamlReader callbacks to
+ control_initialize_from_xaml.
+
+2007-06-20 Chris Toshok <[EMAIL PROTECTED]>
+
* MediaBase.cs: the property is named Source, not Uri.
2007-06-18 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
Modified: trunk/olive/class/agclr/System.Windows.Controls/Control.cs
===================================================================
--- trunk/olive/class/agclr/System.Windows.Controls/Control.cs 2007-06-20
22:13:13 UTC (rev 80372)
+++ trunk/olive/class/agclr/System.Windows.Controls/Control.cs 2007-06-20
22:14:29 UTC (rev 80373)
@@ -44,7 +44,11 @@
protected FrameworkElement InitializeFromXaml (string xaml)
{
Kind kind;
- IntPtr native_child =
NativeMethods.control_initialize_from_xaml (native, xaml, out kind);
+ IntPtr native_child =
NativeMethods.control_initialize_from_xaml (native, xaml,
+
XamlReader.custom_el_cb,
+
XamlReader.custom_at_cb,
+
XamlReader.hookup_event_cb,
+
out kind);
DependencyObject o = DependencyObject.Lookup (kind,
native_child);
return (FrameworkElement) o;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches