Author: toshok
Date: 2007-06-25 17:25:42 -0400 (Mon, 25 Jun 2007)
New Revision: 80728
Added:
trunk/olive/class/WindowsBase/System.Windows/DependencyPropertyChangedEventArgs.cs
trunk/olive/class/WindowsBase/System.Windows/DependencyPropertyChangedEventHandler.cs
trunk/olive/class/WindowsBase/System.Windows/Size.cs
Removed:
trunk/olive/class/WindowsBase/System.Windows/RoutedEvent.cs
Modified:
trunk/olive/class/WindowsBase/System.Windows/DependencyObject.cs
trunk/olive/class/WindowsBase/System.Windows/DependencyProperty.cs
trunk/olive/class/WindowsBase/WindowsBase.dll.sources
Log:
new stuff
Modified: trunk/olive/class/WindowsBase/System.Windows/DependencyObject.cs
===================================================================
--- trunk/olive/class/WindowsBase/System.Windows/DependencyObject.cs
2007-06-25 21:21:09 UTC (rev 80727)
+++ trunk/olive/class/WindowsBase/System.Windows/DependencyObject.cs
2007-06-25 21:25:42 UTC (rev 80728)
@@ -3,8 +3,10 @@
//
// Author:
// Iain McCoy ([EMAIL PROTECTED])
+// Chris Toshok ([EMAIL PROTECTED])
//
// (C) 2005 Iain McCoy
+// (C) 2007 Novell, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -33,25 +35,42 @@
public class DependencyObject : DispatcherObject {
private static Hashtable propertyDeclarations = new Hashtable();
private Hashtable properties = new Hashtable();
-
private DependencyObjectType dependencyObjectType;
+
+ [MonoTODO]
+ public bool IsSealed {
+ get { throw new NotImplementedException (); }
+ }
+
public DependencyObjectType DependencyObjectType {
get { return dependencyObjectType; }
}
- [MonoTODO()]
public void ClearValue(DependencyProperty dp)
{
- throw new
NotImplementedException("ClearValue(DependencyProperty dp)");
+ if (IsSealed)
+ throw new InvalidOperationException ("Cannot
manipulate property values on a sealed DependencyObject");
+
+ properties[dp] = null;
}
- [MonoTODO()]
+ [MonoTODO]
public void ClearValue(DependencyPropertyKey key)
{
- throw new
NotImplementedException("ClearValue(DependencyPropertyKey key)");
+ ClearValue (key.DependencyProperty);
}
-
- [MonoTODO()]
+
+ public sealed override bool Equals (object obj)
+ {
+ throw new NotImplementedException("Equals");
+ }
+
+ public sealed override int GetHashCode ()
+ {
+ throw new NotImplementedException("GetHashCode");
+ }
+
+ [MonoTODO]
public LocalValueEnumerator GetLocalValueEnumerator()
{
return new LocalValueEnumerator(properties);
@@ -60,44 +79,35 @@
public object GetValue(DependencyProperty dp)
{
object val = properties[dp];
- if (val == null)
- val = dp.DefaultMetadata.DefaultValue;
- return val;
+ return val == null ? dp.DefaultMetadata.DefaultValue :
val;
}
- [MonoTODO()]
- public object GetValueBase(DependencyProperty dp)
- {
- throw new
NotImplementedException("GetValueBase(DependencyProperty dp)");
- }
-
- [MonoTODO()]
- protected virtual object GetValueCore(DependencyProperty dp,
object baseValue, PropertyMetadata metadata)
- {
- throw new
NotImplementedException("GetValueCore(DependencyProperty dp, object baseValue,
PropertyMetadata metadata)");
- }
-
- [MonoTODO()]
+ [MonoTODO]
public void InvalidateProperty(DependencyProperty dp)
{
throw new
NotImplementedException("InvalidateProperty(DependencyProperty dp)");
}
- [MonoTODO()]
- protected virtual void OnPropertyInvalidated(DependencyProperty
dp, PropertyMetadata metadata)
+ [MonoTODO]
+ protected virtual void
OnPropertyChanged(DependencyPropertyChangedEventArgs e)
{
- throw new
NotImplementedException("OnPropertyInvalidated(DependencyProperty dp,
PropertyMetadata metadata)");
+ throw new NotImplementedException();
}
- [MonoTODO()]
public object ReadLocalValue(DependencyProperty dp)
{
- throw new
NotImplementedException("ReadLocalValue(DependencyProperty dp)");
+ object val = properties[dp];
+ return val == null ? DependencyProperty.UnsetValue :
val;
}
public void SetValue(DependencyProperty dp, object value)
{
+ if (IsSealed)
+ throw new InvalidOperationException ("Cannot
manipulate property values on a sealed DependencyObject");
+ if (!dp.IsValidType (value))
+ throw new ArgumentException ("value not of the
correct type for this DependencyProperty");
+
ValidateValueCallback validate =
dp.ValidateValueCallback;
if (validate != null && !validate(value))
throw new Exception("Value does not validate");
@@ -105,23 +115,12 @@
properties[dp] = value;
}
- [MonoTODO()]
+ [MonoTODO]
public void SetValue(DependencyPropertyKey key, object value)
{
- throw new
NotImplementedException("SetValue(DependencyPropertyKey key, object value)");
+ SetValue (key.DependencyProperty, value);
}
- [MonoTODO()]
- public void SetValueBase(DependencyProperty dp, object value)
- {
- throw new
NotImplementedException("SetValueBase(DependencyProperty dp, object value)");
- }
-
- [MonoTODO()]
- public void SetValueBase(DependencyPropertyKey key, object
value)
- {
- throw new
NotImplementedException("SetValueBase(DependencyPropertyKey key, object
value)");
- }
internal static DependencyProperty lookup(Type t, string name)
{
Modified: trunk/olive/class/WindowsBase/System.Windows/DependencyProperty.cs
===================================================================
--- trunk/olive/class/WindowsBase/System.Windows/DependencyProperty.cs
2007-06-25 21:21:09 UTC (rev 80727)
+++ trunk/olive/class/WindowsBase/System.Windows/DependencyProperty.cs
2007-06-25 21:25:42 UTC (rev 80728)
@@ -37,6 +37,8 @@
private bool isAttached;
internal bool IsAttached { get { return isAttached; } }
+ public static readonly object UnsetValue = new object ();
+
private DependencyProperty (bool isAttached, string name, Type
propertyType, Type ownerType, PropertyMetadata defaultMetadata,
ValidateValueCallback validateValueCallback)
{
this.isAttached = isAttached;
Added:
trunk/olive/class/WindowsBase/System.Windows/DependencyPropertyChangedEventArgs.cs
===================================================================
---
trunk/olive/class/WindowsBase/System.Windows/DependencyPropertyChangedEventArgs.cs
2007-06-25 21:21:09 UTC (rev 80727)
+++
trunk/olive/class/WindowsBase/System.Windows/DependencyPropertyChangedEventArgs.cs
2007-06-25 21:25:42 UTC (rev 80728)
@@ -0,0 +1,32 @@
+//
+// DependencyPropertyChangedEventArgs.cs
+//
+// Author:
+// Chris Toshok ([EMAIL PROTECTED])
+//
+// (C) 2007 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Windows {
+ public struct DependencyPropertyChangedEventArgs {
+ }
+}
Added:
trunk/olive/class/WindowsBase/System.Windows/DependencyPropertyChangedEventHandler.cs
===================================================================
---
trunk/olive/class/WindowsBase/System.Windows/DependencyPropertyChangedEventHandler.cs
2007-06-25 21:21:09 UTC (rev 80727)
+++
trunk/olive/class/WindowsBase/System.Windows/DependencyPropertyChangedEventHandler.cs
2007-06-25 21:25:42 UTC (rev 80728)
@@ -0,0 +1,31 @@
+//
+// DependencyPropertyChangedEventHandler.cs
+//
+// Author:
+// Chris Toshok ([EMAIL PROTECTED])
+//
+// (C) 2007 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Windows {
+ public delegate void DependencyPropertyChangedEventHandler (object
sender, DependencyPropertyChangedEventArgs e);
+}
Deleted: trunk/olive/class/WindowsBase/System.Windows/RoutedEvent.cs
===================================================================
--- trunk/olive/class/WindowsBase/System.Windows/RoutedEvent.cs 2007-06-25
21:21:09 UTC (rev 80727)
+++ trunk/olive/class/WindowsBase/System.Windows/RoutedEvent.cs 2007-06-25
21:25:42 UTC (rev 80728)
@@ -1,32 +0,0 @@
-//
-// RoutedEvent.cs
-//
-// Author:
-// Iain McCoy ([EMAIL PROTECTED])
-//
-// (C) 2005 Iain McCoy
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Windows {
- public sealed class RoutedEvent {
- }
-}
Added: trunk/olive/class/WindowsBase/System.Windows/Size.cs
===================================================================
--- trunk/olive/class/WindowsBase/System.Windows/Size.cs 2007-06-25
21:21:09 UTC (rev 80727)
+++ trunk/olive/class/WindowsBase/System.Windows/Size.cs 2007-06-25
21:25:42 UTC (rev 80728)
@@ -0,0 +1,44 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007 Novell, Inc. (http://www.novell.com)
+//
+// Authors:
+// Chris Toshok ([EMAIL PROTECTED])
+//
+
+using System;
+using System.Windows.Markup;
+
+namespace System.Windows {
+
+ [TypeConverter (typeof (SizeConverter))]
+ // [ValueSerializer (...)]
+ [Serializable]
+ public struct Size : IFormattable
+ {
+ public Size (double width, double height)
+ {
+ }
+
+ public static Size Empty {
+ get { return new Size (0, 0); }
+ }
+ }
+}
Modified: trunk/olive/class/WindowsBase/WindowsBase.dll.sources
===================================================================
--- trunk/olive/class/WindowsBase/WindowsBase.dll.sources 2007-06-25
21:21:09 UTC (rev 80727)
+++ trunk/olive/class/WindowsBase/WindowsBase.dll.sources 2007-06-25
21:25:42 UTC (rev 80728)
@@ -2,11 +2,12 @@
System.Windows/DependencyObject.cs
System.Windows/DependencyObjectType.cs
System.Windows/DependencyProperty.cs
+System.Windows/DependencyPropertyChangedEventArgs.cs
+System.Windows/DependencyPropertyChangedEventHandler.cs
System.Windows/DependencyPropertyKey.cs
System.Windows/LocalValueEntry.cs
System.Windows/LocalValueEnumerator.cs
System.Windows/PropertyMetadata.cs
-System.Windows/RoutedEvent.cs
System.Windows.Threading/Dispatcher.cs
System.Windows.Threading/DispatcherFrame.cs
System.Windows.Threading/DispatcherObject.cs
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches