From 4152583a12298fc64630de6b581e561910c40747 Mon Sep 17 00:00:00 2001 From: toshok Date: Tue, 1 Dec 2009 06:03:46 +0000 Subject: [PATCH] stub out the Projection classes as well as duplicating the disgusting hack used for Matrix to implement Matrix3D. add the UIElement.Projection field as well. regenerate everything else. git-svn-id: svn+ssh://mono-cvs.ximian.com/source/trunk/moon@147177 e3ebcda4-bce8-0310-ba0a-eca2169e7518 --- class/System.Windows/Makefile.am | 13 +- class/System.Windows/Mono/GeneratedPInvokes.cs | 24 + class/System.Windows/Mono/Kind.cs | 5 + .../Mono/NativeDependencyObjectHelper.cs | 3 + class/System.Windows/Mono/Types.g.cs | 8 + class/System.Windows/Mono/Value.cs | 6 + .../System.Windows.Media/Matrix3DProjection.cs | 32 + .../System.Windows.Media/PlaneProjection.cs | 32 + .../System.Windows.Media/Projection.cs | 32 + .../System.Windows.Media3D/Matrix3D.cs | 427 +++++++++++ .../System.Windows.Media3D/UnmanagedMatrix3D.cs | 75 ++ .../System.Windows/DependencyObject.g.cs | 23 + .../System.Windows/DependencyProperty.g.cs | 97 +++ .../automatic/System.Windows.auto.sc | 20 +- .../automatic/System.Windows.auto.ssc | 7 +- plugin/cbinding.h | 10 + src/Makefile.am | 6 +- src/cbinding.cpp | 62 ++ src/cbinding.h | 43 ++ src/dependencyproperty.g.cpp | 832 ++++++++++++++++----- src/projection.cpp | 77 ++ src/projection.h | 248 ++++++ src/type-generated.cpp | 6 + src/type.h | 5 + src/uielement.h | 5 + src/value.h | 10 + src/xaml.cpp | 80 ++ tools/generators/Generator.cs | 2 + 28 files changed, 1999 insertions(+), 191 deletions(-) create mode 100644 class/System.Windows/System.Windows.Media/Matrix3DProjection.cs create mode 100644 class/System.Windows/System.Windows.Media/PlaneProjection.cs create mode 100644 class/System.Windows/System.Windows.Media/Projection.cs create mode 100644 class/System.Windows/System.Windows.Media3D/Matrix3D.cs create mode 100644 class/System.Windows/System.Windows.Media3D/UnmanagedMatrix3D.cs create mode 100644 src/projection.cpp create mode 100644 src/projection.h diff --git a/class/System.Windows/Makefile.am b/class/System.Windows/Makefile.am index c22f6387c..3ef09c3aa 100644 --- a/class/System.Windows/Makefile.am +++ b/class/System.Windows/Makefile.am @@ -415,8 +415,10 @@ system_windows_sources = \ $(srcdir)/System.Windows.Markup/XamlReader.cs \ $(srcdir)/System.Windows.Markup/XmlLanguage.cs \ $(srcdir)/System.Windows.Markup/XmlnsDefinitionAttribute.cs \ - $(srcdir)/System.Windows.Markup/XmlnsPrefixAttribute.cs \ + $(srcdir)/System.Windows.Markup/XmlnsPrefixAttribute.cs \ $(srcdir)/System.Windows.Markup/ContentPropertyAttribute.cs \ + $(srcdir)/System.Windows.Media3D/Matrix3D.cs \ + $(srcdir)/System.Windows.Media3D/UnmanagedMatrix3D.cs \ $(srcdir)/System.Windows.Media/AlignmentX.cs \ $(srcdir)/System.Windows.Media/AlignmentY.cs \ $(srcdir)/System.Windows.Media/ArcSegment.cs \ @@ -448,9 +450,10 @@ system_windows_sources = \ $(srcdir)/System.Windows.Media/LinearGradientBrush.cs \ $(srcdir)/System.Windows.Media/LineGeometry.cs \ $(srcdir)/System.Windows.Media/LineSegment.cs \ - $(srcdir)/System.Windows.Media/LogReadyRoutedEventArgs.cs \ - $(srcdir)/System.Windows.Media/LogReadyRoutedEventHandler.cs\ - $(srcdir)/System.Windows.Media/LogSource.cs \ + $(srcdir)/System.Windows.Media/LogReadyRoutedEventArgs.cs \ + $(srcdir)/System.Windows.Media/LogReadyRoutedEventHandler.cs \ + $(srcdir)/System.Windows.Media/LogSource.cs \ + $(srcdir)/System.Windows.Media/Matrix3DProjection.cs \ $(srcdir)/System.Windows.Media/MatrixTransform.cs \ $(srcdir)/System.Windows.Media/Matrix.cs \ $(srcdir)/System.Windows.Media/MediaAttribute.cs \ @@ -475,10 +478,12 @@ system_windows_sources = \ $(srcdir)/System.Windows.Media/PixelFormat.cs \ $(srcdir)/System.Windows.Media/PixelFormats.cs \ $(srcdir)/System.Windows.Media/PixelFormatKind.cs \ + $(srcdir)/System.Windows.Media/PlaneProjection.cs \ $(srcdir)/System.Windows.Media/PointCollection.cs \ $(srcdir)/System.Windows.Media/PolyBezierSegment.cs \ $(srcdir)/System.Windows.Media/PolyLineSegment.cs \ $(srcdir)/System.Windows.Media/PolyQuadraticBezierSegment.cs \ + $(srcdir)/System.Windows.Media/Projection.cs \ $(srcdir)/System.Windows.Media/QuadraticBezierSegment.cs \ $(srcdir)/System.Windows.Media/RadialGradientBrush.cs \ $(srcdir)/System.Windows.Media/RectangleGeometry.cs \ diff --git a/class/System.Windows/Mono/GeneratedPInvokes.cs b/class/System.Windows/Mono/GeneratedPInvokes.cs index 736918143..1f8abb0c2 100644 --- a/class/System.Windows/Mono/GeneratedPInvokes.cs +++ b/class/System.Windows/Mono/GeneratedPInvokes.cs @@ -1303,6 +1303,18 @@ namespace Mono { public extern static IntPtr matrix_new (); [DllImport ("moon")] + // gpointer matrix3_d_get_matrix_values (Matrix3D *instance); + public extern static IntPtr matrix3_d_get_matrix_values (IntPtr instance); + + [DllImport ("moon")] + // Matrix3D *matrix3_d_new (); + public extern static IntPtr matrix3_d_new (); + + [DllImport ("moon")] + // Matrix3DProjection *matrix3_dprojection_new (); + public extern static IntPtr matrix3_dprojection_new (); + + [DllImport ("moon")] // MatrixTransform *matrix_transform_new (); public extern static IntPtr matrix_transform_new (); @@ -1496,6 +1508,10 @@ namespace Mono { public extern static IntPtr pixel_shader_new (); [DllImport ("moon")] + // PlaneProjection *plane_projection_new (); + public extern static IntPtr plane_projection_new (); + + [DllImport ("moon")] // PointAnimation *point_animation_new (); public extern static IntPtr point_animation_new (); @@ -1548,6 +1564,10 @@ namespace Mono { public extern static IntPtr power_ease_new (); [DllImport ("moon")] + // Projection *projection_new (); + public extern static IntPtr projection_new (); + + [DllImport ("moon")] // int property_changed_event_args_get_id (PropertyChangedEventArgs *instance); public extern static int property_changed_event_args_get_id (IntPtr instance); @@ -2247,6 +2267,10 @@ namespace Mono { public extern static IntPtr unmanaged_matrix_new (); [DllImport ("moon")] + // UnmanagedMatrix3D *unmanaged_matrix3_d_new (); + public extern static IntPtr unmanaged_matrix3_d_new (); + + [DllImport ("moon")] // void uri_free (Uri *instance); public extern static void uri_free (IntPtr instance); diff --git a/class/System.Windows/Mono/Kind.cs b/class/System.Windows/Mono/Kind.cs index bf3a2268b..58a610dfa 100644 --- a/class/System.Windows/Mono/Kind.cs +++ b/class/System.Windows/Mono/Kind.cs @@ -189,6 +189,8 @@ namespace Mono { MANUALTIMESOURCE, MARKERSTREAM, MATRIX, + MATRIX3D, + MATRIX3DPROJECTION, MATRIXTRANSFORM, MEDIA, MEDIAATTRIBUTE, @@ -239,6 +241,7 @@ namespace Mono { PATHSEGMENT, PATHSEGMENT_COLLECTION, PIXELSHADER, + PLANEPROJECTION, PLAYLIST, PLAYLISTENTRY, PLAYLISTROOT, @@ -257,6 +260,7 @@ namespace Mono { POWEREASE, PROGRESSEVENTARGS, PROGRESSIVESOURCE, + PROJECTION, PROPERTYCHANGEDEVENTARGS, PROPERTYPATH, PULSESOURCE, @@ -332,6 +336,7 @@ namespace Mono { UINT32, UINT64, UNMANAGEDMATRIX, + UNMANAGEDMATRIX3D, URI, USERCONTROL, VIDEOBRUSH, diff --git a/class/System.Windows/Mono/NativeDependencyObjectHelper.cs b/class/System.Windows/Mono/NativeDependencyObjectHelper.cs index c0d86e1d1..bdb6bd65c 100644 --- a/class/System.Windows/Mono/NativeDependencyObjectHelper.cs +++ b/class/System.Windows/Mono/NativeDependencyObjectHelper.cs @@ -336,6 +336,7 @@ namespace Mono { case Kind.LINEARPOINTKEYFRAME: return new LinearPointKeyFrame (raw, false); case Kind.LINESEGMENT: return new LineSegment (raw, false); case Kind.MATRIXTRANSFORM: return new MatrixTransform (raw, false); + case Kind.MATRIX3DPROJECTION: return new Matrix3DProjection (raw, false); case Kind.TIMELINEMARKERROUTEDEVENTARGS : return new TimelineMarkerRoutedEventArgs (raw, false); case Kind.MEDIAATTRIBUTE: return new MediaAttribute (raw, false); case Kind.MEDIAATTRIBUTE_COLLECTION: return new MediaAttributeCollection (raw, false); @@ -356,6 +357,7 @@ namespace Mono { case Kind.PATH: return new Path (raw, false); case Kind.PATHSEGMENT_COLLECTION: return new PathSegmentCollection (raw, false); case Kind.PIXELSHADER: return new PixelShader (raw, false); + case Kind.PLANEPROJECTION: return new PlaneProjection (raw, false); case Kind.POINTANIMATION: return new PointAnimation (raw, false); case Kind.POINTANIMATIONUSINGKEYFRAMES: return new PointAnimationUsingKeyFrames (raw, false); case Kind.POINTKEYFRAME_COLLECTION: return new PointKeyFrameCollection (raw, false); @@ -432,6 +434,7 @@ namespace Mono { case Kind.TILEBRUSH: case Kind.GENERALTRANSFORM: case Kind.TRANSFORM: + case Kind.PROJECTION: case Kind.SHAPE: case Kind.GEOMETRY: case Kind.SETTERBASE: diff --git a/class/System.Windows/Mono/Types.g.cs b/class/System.Windows/Mono/Types.g.cs index c851abdcf..2ac020f29 100644 --- a/class/System.Windows/Mono/Types.g.cs +++ b/class/System.Windows/Mono/Types.g.cs @@ -193,6 +193,8 @@ namespace Mono { types.Add (t, new ManagedType (t, Kind.LINEGEOMETRY)); t = typeof (System.Windows.Media.LineSegment); types.Add (t, new ManagedType (t, Kind.LINESEGMENT)); + t = typeof (System.Windows.Media.Matrix3DProjection); + types.Add (t, new ManagedType (t, Kind.MATRIX3DPROJECTION)); t = typeof (System.Windows.Media.MatrixTransform); types.Add (t, new ManagedType (t, Kind.MATRIXTRANSFORM)); t = typeof (System.Windows.Media.MediaAttribute); @@ -211,6 +213,8 @@ namespace Mono { types.Add (t, new ManagedType (t, Kind.PATHSEGMENT)); t = typeof (System.Windows.Media.PathSegmentCollection); types.Add (t, new ManagedType (t, Kind.PATHSEGMENT_COLLECTION)); + t = typeof (System.Windows.Media.PlaneProjection); + types.Add (t, new ManagedType (t, Kind.PLANEPROJECTION)); t = typeof (System.Windows.Media.PointCollection); types.Add (t, new ManagedType (t, Kind.POINT_COLLECTION)); t = typeof (System.Windows.Media.PolyBezierSegment); @@ -219,6 +223,8 @@ namespace Mono { types.Add (t, new ManagedType (t, Kind.POLYLINESEGMENT)); t = typeof (System.Windows.Media.PolyQuadraticBezierSegment); types.Add (t, new ManagedType (t, Kind.POLYQUADRATICBEZIERSEGMENT)); + t = typeof (System.Windows.Media.Projection); + types.Add (t, new ManagedType (t, Kind.PROJECTION)); t = typeof (System.Windows.Media.QuadraticBezierSegment); types.Add (t, new ManagedType (t, Kind.QUADRATICBEZIERSEGMENT)); t = typeof (System.Windows.Media.RadialGradientBrush); @@ -363,6 +369,8 @@ namespace Mono { types.Add (t, new ManagedType (t, Kind.BITMAPSOURCE)); t = typeof (System.Windows.Media.Imaging.WriteableBitmap); types.Add (t, new ManagedType (t, Kind.WRITEABLEBITMAP)); + t = typeof (System.Windows.Media3D.UnmanagedMatrix3D); + types.Add (t, new ManagedType (t, Kind.UNMANAGEDMATRIX3D)); t = typeof (System.Windows.Shapes.Ellipse); types.Add (t, new ManagedType (t, Kind.ELLIPSE)); t = typeof (System.Windows.Shapes.Line); diff --git a/class/System.Windows/Mono/Value.cs b/class/System.Windows/Mono/Value.cs index 658b3a42d..fb509d419 100644 --- a/class/System.Windows/Mono/Value.cs +++ b/class/System.Windows/Mono/Value.cs @@ -31,6 +31,7 @@ using System.Windows.Data; using System.Windows.Input; using System.Windows.Markup; using System.Windows.Media; +using System.Windows.Media3D; using System.Windows.Documents; using System.Windows.Media.Animation; using System.Runtime.InteropServices; @@ -324,6 +325,11 @@ namespace Mono { return new Matrix (value->u.p); } + case Kind.MATRIX3D: + case Kind.UNMANAGEDMATRIX3D: { + return new Matrix3D (value->u.p); + } + case Kind.DURATION: { Duration* duration = (Duration*)value->u.p; return (duration == null) ? Duration.Automatic : *duration; diff --git a/class/System.Windows/System.Windows.Media/Matrix3DProjection.cs b/class/System.Windows/System.Windows.Media/Matrix3DProjection.cs new file mode 100644 index 000000000..c11c7772e --- /dev/null +++ b/class/System.Windows/System.Windows.Media/Matrix3DProjection.cs @@ -0,0 +1,32 @@ +// +// +// Contact: +// Moonlight List (moonlight-list@lists.ximian.com) +// +// Copyright 2009 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. +// +using Mono; +namespace System.Windows.Media { + public partial class Matrix3DProjection : Projection { + + } +} diff --git a/class/System.Windows/System.Windows.Media/PlaneProjection.cs b/class/System.Windows/System.Windows.Media/PlaneProjection.cs new file mode 100644 index 000000000..4f8d99bcf --- /dev/null +++ b/class/System.Windows/System.Windows.Media/PlaneProjection.cs @@ -0,0 +1,32 @@ +// +// +// Contact: +// Moonlight List (moonlight-list@lists.ximian.com) +// +// Copyright 2009 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. +// +using Mono; +namespace System.Windows.Media { + public partial class PlaneProjection : Projection { + + } +} diff --git a/class/System.Windows/System.Windows.Media/Projection.cs b/class/System.Windows/System.Windows.Media/Projection.cs new file mode 100644 index 000000000..86bbe5266 --- /dev/null +++ b/class/System.Windows/System.Windows.Media/Projection.cs @@ -0,0 +1,32 @@ +// +// +// Contact: +// Moonlight List (moonlight-list@lists.ximian.com) +// +// Copyright 2009 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. +// +using Mono; +namespace System.Windows.Media { + public abstract partial class Projection : DependencyObject { + + } +} diff --git a/class/System.Windows/System.Windows.Media3D/Matrix3D.cs b/class/System.Windows/System.Windows.Media3D/Matrix3D.cs new file mode 100644 index 000000000..a8b127f2b --- /dev/null +++ b/class/System.Windows/System.Windows.Media3D/Matrix3D.cs @@ -0,0 +1,427 @@ +// +// System.Windows.Media3D.Matrix3D struct +// +// Contact: +// Moonlight List (moonlight-list@lists.ximian.com) +// +// Copyright (C) 2009 Novell, Inc (http://www.novell.com) +// +// 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. +// + +using Mono; + +namespace System.Windows.Media3D { + + public unsafe struct Matrix3D : IFormattable { + + private double m_11; + private double m_12; + private double m_13; + private double m_14; + private double m_21; + private double m_22; + private double m_23; + private double m_24; + private double m_31; + private double m_32; + private double m_33; + private double m_34; + private double offset_x; + private double offset_y; + private double offset_z; + private double m_44; + + // we can't have an empty ctor for a struct (CS0568) but the default matrix is identity + private bool init; + + + internal unsafe Matrix3D (IntPtr native) + { + if (native == IntPtr.Zero) + throw new ArgumentNullException ("native"); + + // FIXME: the generator butchers this pinvoke's name.. + double *dp = (double*) NativeMethods.matrix3_d_get_matrix_values (native); + m_11 = dp [0]; + m_12 = dp [1]; + m_13 = dp [2]; + m_14 = dp [3]; + m_21 = dp [4]; + m_22 = dp [5]; + m_23 = dp [6]; + m_24 = dp [7]; + m_31 = dp [8]; + m_32 = dp [9]; + m_33 = dp [10]; + m_34 = dp [11]; + offset_x = dp [12]; + offset_y = dp [13]; + offset_z = dp [14]; + m_44 = dp [15]; + init = true; + } + + public Matrix3D (double m11, double m12, double m13, double m14, + double m21, double m22, double m23, double m24, + double m31, double m32, double m33, double m34, + double offsetX, double offsetY, double offsetZ, double m44) + { + m_11 = m11; + m_12 = m12; + m_13 = m13; + m_14 = m14; + m_21 = m21; + m_22 = m22; + m_23 = m23; + m_24 = m24; + m_31 = m31; + m_32 = m32; + m_33 = m33; + m_34 = m34; + offset_x = offsetX; + offset_y = offsetY; + offset_z = offsetZ; + m_44 = m44; + init = true; + } + + + public double M11 { + get { + if (!init) SetIdentity (); + return m_11; + } + set { + if (!init) SetIdentity (); + m_11 = value; + } + } + + public double M12 { + get { + if (!init) SetIdentity (); + return m_12; + } + set { + if (!init) SetIdentity (); + m_12 = value; + } + } + + public double M13 { + get { + if (!init) SetIdentity (); + return m_13; + } + set { + if (!init) SetIdentity (); + m_13 = value; + } + } + + public double M14 { + get { + if (!init) SetIdentity (); + return m_14; + } + set { + if (!init) SetIdentity (); + m_14 = value; + } + } + + public double M21 { + get { + if (!init) SetIdentity (); + return m_21; + } + set { + if (!init) SetIdentity (); + m_21 = value; + } + } + + public double M22 { + get { + if (!init) SetIdentity (); + return m_22; + } + set { + if (!init) SetIdentity (); + m_22 = value; + } + } + + public double M23 { + get { + if (!init) SetIdentity (); + return m_23; + } + set { + if (!init) SetIdentity (); + m_23 = value; + } + } + + public double M24 { + get { + if (!init) SetIdentity (); + return m_24; + } + set { + if (!init) SetIdentity (); + m_24 = value; + } + } + + public double M31 { + get { + if (!init) SetIdentity (); + return m_31; + } + set { + if (!init) SetIdentity (); + m_31 = value; + } + } + + public double M32 { + get { + if (!init) SetIdentity (); + return m_32; + } + set { + if (!init) SetIdentity (); + m_32 = value; + } + } + + public double M33 { + get { + if (!init) SetIdentity (); + return m_33; + } + set { + if (!init) SetIdentity (); + m_33 = value; + } + } + + public double M34 { + get { + if (!init) SetIdentity (); + return m_34; + } + set { + if (!init) SetIdentity (); + m_34 = value; + } + } + + public double OffsetX { + get { + if (!init) SetIdentity (); + return offset_x; + } + set { + if (!init) SetIdentity (); + offset_x = value; + } + } + + public double OffsetY { + get { + if (!init) SetIdentity (); + return offset_y; + } + set { + if (!init) SetIdentity (); + offset_y = value; + } + } + + public double OffsetZ { + get { + if (!init) SetIdentity (); + return offset_z; + } + set { + if (!init) SetIdentity (); + offset_z = value; + } + } + + public double M44 { + get { + if (!init) SetIdentity (); + return m_44; + } + set { + if (!init) SetIdentity (); + m_44 = value; + } + } + + public bool IsIdentity { + get { + if (!init) + return true; + + return ((m_11 == 1.0 && m_12 == 0.0 && m_13 == 0.0 && m_14 == 0.0) && + (m_21 == 0.0 && m_22 == 1.0 && m_23 == 0.0 && m_24 == 0.0) && + (m_31 == 0.0 && m_32 == 0.0 && m_33 == 1.0 && m_34 == 0.0) && + (offset_x == 0.0 && offset_y == 0.0 && offset_z == 0.0 && m_44 == 1.0)); + } + } + + + private void SetIdentity () + { + m_11 = 1.0; + m_12 = 0.0; + m_13 = 0.0; + m_14 = 0.0; + m_21 = 0.0; + m_22 = 1.0; + m_23 = 0.0; + m_24 = 0.0; + m_31 = 0.0; + m_32 = 0.0; + m_33 = 1.0; + m_34 = 0.0; + offset_x = 0.0; + offset_y = 0.0; + offset_z = 0.0; + m_44 = 1.0; + init = true; + } + + + public override int GetHashCode () + { + if (IsIdentity) + return 0; + + return (m_11.GetHashCode () ^ m_12.GetHashCode () ^ m_13.GetHashCode () ^ m_14.GetHashCode () ^ + m_21.GetHashCode () ^ m_22.GetHashCode () ^ m_23.GetHashCode () ^ m_24.GetHashCode () ^ + m_31.GetHashCode () ^ m_32.GetHashCode () ^ m_33.GetHashCode () ^ m_34.GetHashCode () ^ + offset_x.GetHashCode () ^ offset_y.GetHashCode () ^ offset_z.GetHashCode () ^ m_44.GetHashCode ()); + } + + public override string ToString () + { + if (IsIdentity) + return "Identity"; + + return String.Format ("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13},{14},{15}", + m_11, m_12, m_13, m_14, + m_21, m_22, m_23, m_24, + m_31, m_32, m_33, m_34, + offset_x, offset_y, offset_z, m_44); + } + + public string ToString (IFormatProvider provider) + { + return (this as IFormattable).ToString (null, provider); + } + + string IFormattable.ToString (string value, IFormatProvider formatProvider) + { + if (IsIdentity) + return "Identity"; + + if (String.IsNullOrEmpty (value)) + value = null; + + if (formatProvider != null) { + ICustomFormatter cp = (ICustomFormatter) formatProvider.GetFormat (typeof (ICustomFormatter)); + if (cp != null) { + string comma = cp.Format (null, ',', formatProvider); + return String.Format ("{1}{0}{2}{0}{3}{0}{4}{0}{5}{0}{6}{0}{7}{0}{8}{0}{9}{0}{10}{0}{11}{0}{12}{0}{13}{0}{14}{0}{15}{0}{16}", + comma, + cp.Format (value, m_11, formatProvider), + cp.Format (value, m_12, formatProvider), + cp.Format (value, m_13, formatProvider), + cp.Format (value, m_14, formatProvider), + cp.Format (value, m_21, formatProvider), + cp.Format (value, m_22, formatProvider), + cp.Format (value, m_23, formatProvider), + cp.Format (value, m_24, formatProvider), + cp.Format (value, m_31, formatProvider), + cp.Format (value, m_32, formatProvider), + cp.Format (value, m_33, formatProvider), + cp.Format (value, m_34, formatProvider), + cp.Format (value, offset_x, formatProvider), + cp.Format (value, offset_y, formatProvider), + cp.Format (value, offset_z, formatProvider), + cp.Format (value, m_44, formatProvider)); + } + } + + return String.Format ("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13},{14},{15}", + m_11.ToString (value, formatProvider), m_12.ToString (value, formatProvider), m_13.ToString (value, formatProvider), m_14.ToString (value, formatProvider), + m_21.ToString (value, formatProvider), m_22.ToString (value, formatProvider), m_23.ToString (value, formatProvider), m_24.ToString (value, formatProvider), + m_31.ToString (value, formatProvider), m_32.ToString (value, formatProvider), m_33.ToString (value, formatProvider), m_34.ToString (value, formatProvider), + offset_x.ToString (value, formatProvider), offset_y.ToString (value, formatProvider), offset_z.ToString (value, formatProvider), m_44.ToString (value, formatProvider)); + } + + // TODO comparing double is problematic, review MS precision + + public override bool Equals (object o) + { + if ((o == null) || (!(o is Matrix3D))) + return false; + return Equals ((Matrix3D)o); + } + + public bool Equals (Matrix3D value) + { + return (this == value); + } + + public static bool operator == (Matrix3D matrix1, Matrix3D matrix2) + { + if (!matrix1.init) { + if (!matrix2.init) + return true; + matrix1.SetIdentity (); + } + if (!matrix2.init) { + matrix2.SetIdentity (); + } + + return (matrix1.m_11 == matrix2.m_11 && matrix1.m_12 == matrix2.m_12 && matrix1.m_13 == matrix2.m_13 && matrix1.m_14 == matrix2.m_14 && + matrix1.m_21 == matrix2.m_21 && matrix1.m_22 == matrix2.m_22 && matrix1.m_23 == matrix2.m_23 && matrix1.m_24 == matrix2.m_24 && + matrix1.m_31 == matrix2.m_31 && matrix1.m_32 == matrix2.m_32 && matrix1.m_33 == matrix2.m_33 && matrix1.m_34 == matrix2.m_34 && + matrix1.offset_x == matrix2.offset_x && matrix1.offset_y == matrix2.offset_y && matrix1.offset_z == matrix2.offset_z && matrix1.m_44 == matrix2.m_44); + } + + public static bool operator != (Matrix3D matrix1, Matrix3D matrix2) + { + return !(matrix1 == matrix2); + } + + + public static Matrix3D Identity { + get { return new Matrix3D (); } + } + } +} diff --git a/class/System.Windows/System.Windows.Media3D/UnmanagedMatrix3D.cs b/class/System.Windows/System.Windows.Media3D/UnmanagedMatrix3D.cs new file mode 100644 index 000000000..6c96a321a --- /dev/null +++ b/class/System.Windows/System.Windows.Media3D/UnmanagedMatrix3D.cs @@ -0,0 +1,75 @@ +// +// System.Windows.Media.UnmanagedMatrix DO +// +// Contact: +// Moonlight List (moonlight-list@lists.ximian.com) +// +// Copyright (C) 2009 Novell, Inc (http://www.novell.com) +// +// 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. +// + +using Mono; + +namespace System.Windows.Media3D { + + // the unmanaged Matrix3D is a DependencyObject so we can set it's value from JScript + internal partial class UnmanagedMatrix3D : DependencyObject { + + // FIXME: introduce a private DP that allows us to set all values in a single SetValue call + public static readonly DependencyProperty M11Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M11", typeof (double)); + public static readonly DependencyProperty M12Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M12", typeof (double)); + public static readonly DependencyProperty M13Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M13", typeof (double)); + public static readonly DependencyProperty M14Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M14", typeof (double)); + public static readonly DependencyProperty M21Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M21", typeof (double)); + public static readonly DependencyProperty M22Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M22", typeof (double)); + public static readonly DependencyProperty M23Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M23", typeof (double)); + public static readonly DependencyProperty M24Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M24", typeof (double)); + public static readonly DependencyProperty M31Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M31", typeof (double)); + public static readonly DependencyProperty M32Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M32", typeof (double)); + public static readonly DependencyProperty M33Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M33", typeof (double)); + public static readonly DependencyProperty M34Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M34", typeof (double)); + public static readonly DependencyProperty OffsetXProperty = DependencyProperty.Lookup (Kind.MATRIX3D, "OffsetX", typeof (double)); + public static readonly DependencyProperty OffsetYProperty = DependencyProperty.Lookup (Kind.MATRIX3D, "OffsetY", typeof (double)); + public static readonly DependencyProperty OffsetZProperty = DependencyProperty.Lookup (Kind.MATRIX3D, "OffsetZ", typeof (double)); + public static readonly DependencyProperty M44Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M44", typeof (double)); + + public UnmanagedMatrix3D (Matrix3D m) : + this () + { + SetValue (UnmanagedMatrix3D.M11Property, m.M11); + SetValue (UnmanagedMatrix3D.M12Property, m.M12); + SetValue (UnmanagedMatrix3D.M13Property, m.M13); + SetValue (UnmanagedMatrix3D.M14Property, m.M14); + SetValue (UnmanagedMatrix3D.M21Property, m.M21); + SetValue (UnmanagedMatrix3D.M22Property, m.M22); + SetValue (UnmanagedMatrix3D.M23Property, m.M23); + SetValue (UnmanagedMatrix3D.M24Property, m.M24); + SetValue (UnmanagedMatrix3D.M31Property, m.M31); + SetValue (UnmanagedMatrix3D.M32Property, m.M32); + SetValue (UnmanagedMatrix3D.M33Property, m.M33); + SetValue (UnmanagedMatrix3D.M34Property, m.M34); + SetValue (UnmanagedMatrix3D.OffsetXProperty, m.OffsetX); + SetValue (UnmanagedMatrix3D.OffsetYProperty, m.OffsetY); + SetValue (UnmanagedMatrix3D.OffsetZProperty, m.OffsetZ); + SetValue (UnmanagedMatrix3D.M44Property, m.M44); + } + } +} diff --git a/class/System.Windows/System.Windows/DependencyObject.g.cs b/class/System.Windows/System.Windows/DependencyObject.g.cs index e4e5fad44..40a527706 100644 --- a/class/System.Windows/System.Windows/DependencyObject.g.cs +++ b/class/System.Windows/System.Windows/DependencyObject.g.cs @@ -12,6 +12,7 @@ using System.Windows.Ink; using System.Windows.Input; using System.Windows.Markup; using System.Windows.Media; +using System.Windows.Media3D; using System.Windows.Media.Animation; using System.Windows.Shapes; @@ -497,6 +498,11 @@ namespace System.Windows.Media { internal LineSegment (IntPtr raw, bool dropref) : base (raw, dropref) {} } + partial class Matrix3DProjection { + public Matrix3DProjection () : base (NativeMethods.matrix3_dprojection_new (), true) {} + internal Matrix3DProjection (IntPtr raw, bool dropref) : base (raw, dropref) {} + } + partial class MatrixTransform { public MatrixTransform () : base (NativeMethods.matrix_transform_new (), true) {} internal MatrixTransform (IntPtr raw, bool dropref) : base (raw, dropref) {} @@ -550,6 +556,11 @@ namespace System.Windows.Media { internal PathSegmentCollection (IntPtr raw, bool dropref) : base (raw, dropref) {} } + partial class PlaneProjection { + public PlaneProjection () : base (NativeMethods.plane_projection_new (), true) {} + internal PlaneProjection (IntPtr raw, bool dropref) : base (raw, dropref) {} + } + partial class PointCollection { public PointCollection () : base (NativeMethods.point_collection_new (), true) {} internal PointCollection (IntPtr raw, bool dropref) : base (raw, dropref) {} @@ -570,6 +581,11 @@ namespace System.Windows.Media { internal PolyQuadraticBezierSegment (IntPtr raw, bool dropref) : base (raw, dropref) {} } + partial class Projection { + public Projection () : base (NativeMethods.projection_new (), true) {} + internal Projection (IntPtr raw, bool dropref) : base (raw, dropref) {} + } + partial class QuadraticBezierSegment { public QuadraticBezierSegment () : base (NativeMethods.quadratic_bezier_segment_new (), true) {} internal QuadraticBezierSegment (IntPtr raw, bool dropref) : base (raw, dropref) {} @@ -935,6 +951,13 @@ namespace System.Windows.Media.Imaging { } } +namespace System.Windows.Media3D { + partial class UnmanagedMatrix3D { + public UnmanagedMatrix3D () : base (NativeMethods.unmanaged_matrix3_d_new (), true) {} + internal UnmanagedMatrix3D (IntPtr raw, bool dropref) : base (raw, dropref) {} + } +} + namespace System.Windows.Shapes { partial class Ellipse { public Ellipse () : base (NativeMethods.ellipse_new (), true) {} diff --git a/class/System.Windows/System.Windows/DependencyProperty.g.cs b/class/System.Windows/System.Windows/DependencyProperty.g.cs index c7bcbb0d8..20c759bb7 100644 --- a/class/System.Windows/System.Windows/DependencyProperty.g.cs +++ b/class/System.Windows/System.Windows/DependencyProperty.g.cs @@ -12,6 +12,7 @@ using System.Windows.Ink; using System.Windows.Input; using System.Windows.Markup; using System.Windows.Media; +using System.Windows.Media3D; using System.Windows.Media.Animation; using System.Windows.Media.Effects; using System.Windows.Shapes; @@ -319,6 +320,7 @@ namespace System.Windows { public static readonly DependencyProperty IsHitTestVisibleProperty = DependencyProperty.Lookup (Kind.UIELEMENT, "IsHitTestVisible", typeof (bool)); public static readonly DependencyProperty OpacityMaskProperty = DependencyProperty.Lookup (Kind.UIELEMENT, "OpacityMask", typeof (Brush)); public static readonly DependencyProperty OpacityProperty = DependencyProperty.Lookup (Kind.UIELEMENT, "Opacity", typeof (double)); + public static readonly DependencyProperty ProjectionProperty = DependencyProperty.Lookup (Kind.UIELEMENT, "Projection", typeof (Projection)); public static readonly DependencyProperty RenderTransformOriginProperty = DependencyProperty.Lookup (Kind.UIELEMENT, "RenderTransformOrigin", typeof (Point)); public static readonly DependencyProperty RenderTransformProperty = DependencyProperty.Lookup (Kind.UIELEMENT, "RenderTransform", typeof (Transform)); public static readonly DependencyProperty UseLayoutRoundingProperty = DependencyProperty.Lookup (Kind.UIELEMENT, "UseLayoutRounding", typeof (bool)); @@ -354,6 +356,11 @@ namespace System.Windows { set { SetValue (OpacityProperty, value); } } + public Projection Projection { + get { return (Projection) GetValue (ProjectionProperty); } + set { SetValue (ProjectionProperty, value); } + } + public Point RenderTransformOrigin { get { return (Point) GetValue (RenderTransformOriginProperty); } set { SetValue (RenderTransformOriginProperty, value); } @@ -1601,6 +1608,15 @@ namespace System.Windows.Media { } } + partial class Matrix3DProjection { + public static readonly DependencyProperty ProjectionMatrixProperty = DependencyProperty.Lookup (Kind.MATRIX3DPROJECTION, "ProjectionMatrix", typeof (Matrix3D)); + + public Matrix3D ProjectionMatrix { + get { return (Matrix3D) GetValue (ProjectionMatrixProperty); } + set { SetValue (ProjectionMatrixProperty, value); } + } + } + partial class MatrixTransform { public static readonly DependencyProperty MatrixProperty = DependencyProperty.Lookup (Kind.MATRIXTRANSFORM, "Matrix", typeof (Matrix)); @@ -1700,6 +1716,87 @@ namespace System.Windows.Media { } } + partial class PlaneProjection { + public static readonly DependencyProperty CenterOfRotationXProperty = DependencyProperty.Lookup (Kind.PLANEPROJECTION, "CenterOfRotationX", typeof (double)); + public static readonly DependencyProperty CenterOfRotationYProperty = DependencyProperty.Lookup (Kind.PLANEPROJECTION, "CenterOfRotationY", typeof (double)); + public static readonly DependencyProperty CenterOfRotationZProperty = DependencyProperty.Lookup (Kind.PLANEPROJECTION, "CenterOfRotationZ", typeof (double)); + public static readonly DependencyProperty GlobalOffsetXProperty = DependencyProperty.Lookup (Kind.PLANEPROJECTION, "GlobalOffsetX", typeof (double)); + public static readonly DependencyProperty GlobalOffsetYProperty = DependencyProperty.Lookup (Kind.PLANEPROJECTION, "GlobalOffsetY", typeof (double)); + public static readonly DependencyProperty GlobalOffsetZProperty = DependencyProperty.Lookup (Kind.PLANEPROJECTION, "GlobalOffsetZ", typeof (double)); + public static readonly DependencyProperty LocalOffsetXProperty = DependencyProperty.Lookup (Kind.PLANEPROJECTION, "LocalOffsetX", typeof (double)); + public static readonly DependencyProperty LocalOffsetYProperty = DependencyProperty.Lookup (Kind.PLANEPROJECTION, "LocalOffsetY", typeof (double)); + public static readonly DependencyProperty LocalOffsetZProperty = DependencyProperty.Lookup (Kind.PLANEPROJECTION, "LocalOffsetZ", typeof (double)); + public static readonly DependencyProperty ProjectionMatrixProperty = DependencyProperty.Lookup (Kind.PLANEPROJECTION, "ProjectionMatrix", typeof (Matrix3D)); + public static readonly DependencyProperty RotationXProperty = DependencyProperty.Lookup (Kind.PLANEPROJECTION, "RotationX", typeof (double)); + public static readonly DependencyProperty RotationYProperty = DependencyProperty.Lookup (Kind.PLANEPROJECTION, "RotationY", typeof (double)); + public static readonly DependencyProperty RotationZProperty = DependencyProperty.Lookup (Kind.PLANEPROJECTION, "RotationZ", typeof (double)); + + public double CenterOfRotationX { + get { return (double) GetValue (CenterOfRotationXProperty); } + set { SetValue (CenterOfRotationXProperty, value); } + } + + public double CenterOfRotationY { + get { return (double) GetValue (CenterOfRotationYProperty); } + set { SetValue (CenterOfRotationYProperty, value); } + } + + public double CenterOfRotationZ { + get { return (double) GetValue (CenterOfRotationZProperty); } + set { SetValue (CenterOfRotationZProperty, value); } + } + + public double GlobalOffsetX { + get { return (double) GetValue (GlobalOffsetXProperty); } + set { SetValue (GlobalOffsetXProperty, value); } + } + + public double GlobalOffsetY { + get { return (double) GetValue (GlobalOffsetYProperty); } + set { SetValue (GlobalOffsetYProperty, value); } + } + + public double GlobalOffsetZ { + get { return (double) GetValue (GlobalOffsetZProperty); } + set { SetValue (GlobalOffsetZProperty, value); } + } + + public double LocalOffsetX { + get { return (double) GetValue (LocalOffsetXProperty); } + set { SetValue (LocalOffsetXProperty, value); } + } + + public double LocalOffsetY { + get { return (double) GetValue (LocalOffsetYProperty); } + set { SetValue (LocalOffsetYProperty, value); } + } + + public double LocalOffsetZ { + get { return (double) GetValue (LocalOffsetZProperty); } + set { SetValue (LocalOffsetZProperty, value); } + } + + public Matrix3D ProjectionMatrix { + get { return (Matrix3D) GetValue (ProjectionMatrixProperty); } + internal set { SetValue (ProjectionMatrixProperty, value); } + } + + public double RotationX { + get { return (double) GetValue (RotationXProperty); } + set { SetValue (RotationXProperty, value); } + } + + public double RotationY { + get { return (double) GetValue (RotationYProperty); } + set { SetValue (RotationYProperty, value); } + } + + public double RotationZ { + get { return (double) GetValue (RotationZProperty); } + set { SetValue (RotationZProperty, value); } + } + } + partial class PolyBezierSegment { public static readonly DependencyProperty PointsProperty = DependencyProperty.Lookup (Kind.POLYBEZIERSEGMENT, "Points", typeof (PointCollection)); diff --git a/class/tuning/SecurityAttributes/automatic/System.Windows.auto.sc b/class/tuning/SecurityAttributes/automatic/System.Windows.auto.sc index 7088d90fc..37dad5662 100644 --- a/class/tuning/SecurityAttributes/automatic/System.Windows.auto.sc +++ b/class/tuning/SecurityAttributes/automatic/System.Windows.auto.sc @@ -1,5 +1,5 @@ # [SecurityCritical] needed to execute code inside 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. -# 575 methods needs to be decorated. +# 581 methods needs to be decorated. # p/invoke declaration +SC-M: Mono.Kind Mono.NativeMethods::collection_get_element_type(System.IntPtr) @@ -779,6 +779,15 @@ +SC-M: System.IntPtr Mono.NativeMethods::matrix_transform_new() # p/invoke declaration ++SC-M: System.IntPtr Mono.NativeMethods::matrix3_d_get_matrix_values(System.IntPtr) + +# p/invoke declaration ++SC-M: System.IntPtr Mono.NativeMethods::matrix3_d_new() + +# p/invoke declaration ++SC-M: System.IntPtr Mono.NativeMethods::matrix3_dprojection_new() + +# p/invoke declaration +SC-M: System.IntPtr Mono.NativeMethods::media_attribute_collection_get_item_by_name(System.IntPtr,System.String) # p/invoke declaration @@ -887,6 +896,9 @@ +SC-M: System.IntPtr Mono.NativeMethods::pixel_shader_new() # p/invoke declaration ++SC-M: System.IntPtr Mono.NativeMethods::plane_projection_new() + +# p/invoke declaration +SC-M: System.IntPtr Mono.NativeMethods::plugin_instance_evaluate(System.IntPtr,System.String) # p/invoke declaration @@ -947,6 +959,9 @@ +SC-M: System.IntPtr Mono.NativeMethods::power_ease_new() # p/invoke declaration ++SC-M: System.IntPtr Mono.NativeMethods::projection_new() + +# p/invoke declaration +SC-M: System.IntPtr Mono.NativeMethods::property_changed_event_args_get_new_value(System.IntPtr) # p/invoke declaration @@ -1178,6 +1193,9 @@ +SC-M: System.IntPtr Mono.NativeMethods::unmanaged_matrix_new() # p/invoke declaration ++SC-M: System.IntPtr Mono.NativeMethods::unmanaged_matrix3_d_new() + +# p/invoke declaration +SC-M: System.IntPtr Mono.NativeMethods::user_control_new() # p/invoke declaration diff --git a/class/tuning/SecurityAttributes/automatic/System.Windows.auto.ssc b/class/tuning/SecurityAttributes/automatic/System.Windows.auto.ssc index 837233ee9..827952a96 100644 --- a/class/tuning/SecurityAttributes/automatic/System.Windows.auto.ssc +++ b/class/tuning/SecurityAttributes/automatic/System.Windows.auto.ssc @@ -1,5 +1,5 @@ # [SecuritySafeCritical] needed inside System.Windows to call all [SecurityCritical] methods -# 419 methods +# 424 methods +SSC-M: System.Void Microsoft.Internal.TextBoxView::.ctor() +SSC-M: System.Void Mono.A11yHelper::Initialize() @@ -296,6 +296,7 @@ +SSC-M: System.Void System.Windows.Media.LineGeometry::.ctor() +SSC-M: System.Void System.Windows.Media.LineSegment::.ctor() +SSC-M: System.Void System.Windows.Media.Matrix::.ctor(System.IntPtr) ++SSC-M: System.Void System.Windows.Media.Matrix3DProjection::.ctor() +SSC-M: System.Void System.Windows.Media.MatrixTransform::.ctor() +SSC-M: System.Void System.Windows.Media.MediaAttribute::.ctor() +SSC-M: System.Void System.Windows.Media.MediaAttributeCollection::.ctor() @@ -317,10 +318,12 @@ +SSC-M: System.Void System.Windows.Media.PathGeometry::.ctor() +SSC-M: System.Void System.Windows.Media.PathSegment::.ctor() +SSC-M: System.Void System.Windows.Media.PathSegmentCollection::.ctor() ++SSC-M: System.Void System.Windows.Media.PlaneProjection::.ctor() +SSC-M: System.Void System.Windows.Media.PointCollection::.ctor() +SSC-M: System.Void System.Windows.Media.PolyBezierSegment::.ctor() +SSC-M: System.Void System.Windows.Media.PolyLineSegment::.ctor() +SSC-M: System.Void System.Windows.Media.PolyQuadraticBezierSegment::.ctor() ++SSC-M: System.Void System.Windows.Media.Projection::.ctor() +SSC-M: System.Void System.Windows.Media.QuadraticBezierSegment::.ctor() +SSC-M: System.Void System.Windows.Media.RadialGradientBrush::.ctor() +SSC-M: System.Void System.Windows.Media.RectangleGeometry::.ctor() @@ -345,6 +348,8 @@ +SSC-M: System.Windows.DependencyObject System.Windows.Media.VisualTreeHelper::GetParent(System.Windows.DependencyObject) +SSC-M: System.Collections.Generic.IEnumerable`1 System.Windows.Media.VisualTreeHelper::FindElementsInHostCoordinates(System.Windows.Point,System.Windows.UIElement) +SSC-M: System.Collections.Generic.IEnumerable`1 System.Windows.Media.VisualTreeHelper::FindElementsInHostCoordinates(System.Windows.Rect,System.Windows.UIElement) ++SSC-M: System.Void System.Windows.Media3D.Matrix3D::.ctor(System.IntPtr) ++SSC-M: System.Void System.Windows.Media3D.UnmanagedMatrix3D::.ctor() +SSC-M: System.Windows.MessageBoxResult System.Windows.MessageBox::Show(System.String,System.String,System.Windows.MessageBoxButton) +SSC-M: System.Void System.Windows.OutOfBrowserSettings::.ctor() +SSC-M: System.Collections.IEnumerator System.Windows.PresentationFrameworkCollection`1::System.Collections.IEnumerable.GetEnumerator() diff --git a/plugin/cbinding.h b/plugin/cbinding.h index 7f7cdc241..f180c23b5 100644 --- a/plugin/cbinding.h +++ b/plugin/cbinding.h @@ -146,6 +146,8 @@ class ManagedStreamSource; class ManualTimeSource; class MarkerStream; class Matrix; +class Matrix3D; +class Matrix3DProjection; class MatrixTransform; class Media; class MediaAttribute; @@ -194,6 +196,7 @@ class PathGeometry; class PathSegment; class PathSegmentCollection; class PixelShader; +class PlaneProjection; class Playlist; class PlaylistEntry; class PlaylistRoot; @@ -211,6 +214,7 @@ class Popup; class PowerEase; class ProgressEventArgs; class ProgressiveSource; +class Projection; class PropertyChangedEventArgs; class PulseSource; class QuadraticBezierSegment; @@ -277,6 +281,7 @@ class TriggerBase; class UIElement; class UIElementCollection; class UnmanagedMatrix; +class UnmanagedMatrix3D; class UserControl; class VideoBrush; class VideoStream; @@ -464,6 +469,8 @@ class ManagedStreamSource; class ManualTimeSource; class MarkerStream; class Matrix; +class Matrix3D; +class Matrix3DProjection; class MatrixTransform; class Media; class MediaAttribute; @@ -529,6 +536,7 @@ class PathGeometry; class PathSegment; class PathSegmentCollection; class PixelShader; +class PlaneProjection; class Playlist; class PlaylistEntry; class PlaylistKind; @@ -553,6 +561,7 @@ class Popup; class PowerEase; class ProgressEventArgs; class ProgressiveSource; +class Projection; class PropertyChangedEventArgs; class PropertyValueProvider; class PulsePlayer; @@ -636,6 +645,7 @@ class UIElement; class UIElementCollection; class UIElementNode; class UnmanagedMatrix; +class UnmanagedMatrix3D; class UserControl; class Validators; class VideoBrush; diff --git a/src/Makefile.am b/src/Makefile.am index c1a346055..685538e85 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -85,9 +85,10 @@ libmoon_include_headers = \ playlist.h \ point.h \ popup.h \ - propertypath.h \ + projection.h \ + propertypath.h \ provider.h \ - ptr.h \ + ptr.h \ rect.h \ region.h \ resources.h \ @@ -193,6 +194,7 @@ libmoon_la_SOURCES = \ playlist.cpp \ point.cpp \ popup.cpp \ + projection.cpp \ provider.cpp \ rect.cpp \ region.cpp \ diff --git a/src/cbinding.cpp b/src/cbinding.cpp index 52ac35eb0..7b1764fec 100644 --- a/src/cbinding.cpp +++ b/src/cbinding.cpp @@ -42,6 +42,7 @@ #include "panel.h" #include "pipeline.h" #include "popup.h" +#include "projection.h" #include "resources.h" #include "runtime.h" #include "shape.h" @@ -2976,6 +2977,37 @@ matrix_new (void) /** + * Matrix3D + **/ +gpointer +matrix3_d_get_matrix_values (Matrix3D *instance) +{ + if (instance == NULL) + // Need to find a proper way to get the default value for the specified type and return that if instance is NULL. + return (gpointer) 0; + + return instance->GetMatrixValues (); +} + + +Matrix3D * +matrix3_d_new (void) +{ + return new Matrix3D (); +} + + +/** + * Matrix3DProjection + **/ +Matrix3DProjection * +matrix3_dprojection_new (void) +{ + return new Matrix3DProjection (); +} + + +/** * MatrixTransform **/ MatrixTransform * @@ -3725,6 +3757,16 @@ pixel_shader_new (void) /** + * PlaneProjection + **/ +PlaneProjection * +plane_projection_new (void) +{ + return new PlaneProjection (); +} + + +/** * PointAnimation **/ PointAnimation * @@ -3866,6 +3908,16 @@ power_ease_new (void) /** + * Projection + **/ +Projection * +projection_new (void) +{ + return new Projection (); +} + + +/** * PropertyChangedEventArgs **/ int @@ -5471,6 +5523,16 @@ unmanaged_matrix_new (void) /** + * UnmanagedMatrix3D + **/ +UnmanagedMatrix3D * +unmanaged_matrix3_d_new (void) +{ + return new UnmanagedMatrix3D (); +} + + +/** * Uri **/ bool diff --git a/src/cbinding.h b/src/cbinding.h index caf0adbf6..2c8952275 100644 --- a/src/cbinding.h +++ b/src/cbinding.h @@ -146,6 +146,8 @@ class ManagedStreamSource; class ManualTimeSource; class MarkerStream; class Matrix; +class Matrix3D; +class Matrix3DProjection; class MatrixTransform; class Media; class MediaAttribute; @@ -194,6 +196,7 @@ class PathGeometry; class PathSegment; class PathSegmentCollection; class PixelShader; +class PlaneProjection; class Playlist; class PlaylistEntry; class PlaylistRoot; @@ -211,6 +214,7 @@ class Popup; class PowerEase; class ProgressEventArgs; class ProgressiveSource; +class Projection; class PropertyChangedEventArgs; class PulseSource; class QuadraticBezierSegment; @@ -277,6 +281,7 @@ class TriggerBase; class UIElement; class UIElementCollection; class UnmanagedMatrix; +class UnmanagedMatrix3D; class UserControl; class VideoBrush; class VideoStream; @@ -464,6 +469,8 @@ class ManagedStreamSource; class ManualTimeSource; class MarkerStream; class Matrix; +class Matrix3D; +class Matrix3DProjection; class MatrixTransform; class Media; class MediaAttribute; @@ -529,6 +536,7 @@ class PathGeometry; class PathSegment; class PathSegmentCollection; class PixelShader; +class PlaneProjection; class Playlist; class PlaylistEntry; class PlaylistKind; @@ -553,6 +561,7 @@ class Popup; class PowerEase; class ProgressEventArgs; class ProgressiveSource; +class Projection; class PropertyChangedEventArgs; class PropertyValueProvider; class PulsePlayer; @@ -636,6 +645,7 @@ class UIElement; class UIElementCollection; class UIElementNode; class UnmanagedMatrix; +class UnmanagedMatrix3D; class UserControl; class Validators; class VideoBrush; @@ -1990,6 +2000,21 @@ cairo_matrix_t *matrix_get_matrix_values (Matrix *instance); Matrix *matrix_new (void); /** + * Matrix3D + **/ +/* @GeneratePInvoke */ +gpointer matrix3_d_get_matrix_values (Matrix3D *instance); + +/* @GeneratePInvoke */ +Matrix3D *matrix3_d_new (void); + +/** + * Matrix3DProjection + **/ +/* @GeneratePInvoke */ +Matrix3DProjection *matrix3_dprojection_new (void); + +/** * MatrixTransform **/ /* @GeneratePInvoke */ @@ -2279,6 +2304,12 @@ PathSegmentCollection *path_segment_collection_new (void); PixelShader *pixel_shader_new (void); /** + * PlaneProjection + **/ +/* @GeneratePInvoke */ +PlaneProjection *plane_projection_new (void); + +/** * PointAnimation **/ /* @GeneratePInvoke */ @@ -2356,6 +2387,12 @@ double power_ease_ease_in_core (PowerEase *instance, double normalizedTime); PowerEase *power_ease_new (void); /** + * Projection + **/ +/* @GeneratePInvoke */ +Projection *projection_new (void); + +/** * PropertyChangedEventArgs **/ /* @GeneratePInvoke */ @@ -3008,6 +3045,12 @@ UIElementCollection *uielement_collection_new (void); UnmanagedMatrix *unmanaged_matrix_new (void); /** + * UnmanagedMatrix3D + **/ +/* @GeneratePInvoke */ +UnmanagedMatrix3D *unmanaged_matrix3_d_new (void); + +/** * Uri **/ bool uri_equals (const Uri *left, const Uri *right); diff --git a/src/dependencyproperty.g.cpp b/src/dependencyproperty.g.cpp index f01387c04..5db396115 100644 --- a/src/dependencyproperty.g.cpp +++ b/src/dependencyproperty.g.cpp @@ -38,6 +38,7 @@ #include "panel.h" #include "plugin-accessibility.h" #include "popup.h" +#include "projection.h" #include "provider.h" #include "resources.h" #include "shape.h" @@ -301,6 +302,22 @@ Types::RegisterNativeProperties () DependencyProperty::Register (this, Type::MULTISCALESUBIMAGE, "Opacity", false, new Value (1.0), Type::DOUBLE); DependencyProperty::RegisterFull (this, Type::MULTISCALESUBIMAGE, "AspectRatio", false, new Value (1.0), Type::DOUBLE, false, true, false, NULL, NULL, NULL, false); DependencyProperty::Register (this, Type::MEDIAATTRIBUTE, "Value", false, Type::STRING); + DependencyProperty::Register (this, Type::MATRIX3D, "OffsetZ", false, new Value (0.0), Type::DOUBLE); + DependencyProperty::Register (this, Type::MATRIX3D, "OffsetY", false, new Value (0.0), Type::DOUBLE); + DependencyProperty::Register (this, Type::MATRIX3D, "OffsetX", false, new Value (0.0), Type::DOUBLE); + DependencyProperty::Register (this, Type::MATRIX3D, "M44", false, new Value (1.0), Type::DOUBLE); + DependencyProperty::Register (this, Type::MATRIX3D, "M34", false, new Value (0.0), Type::DOUBLE); + DependencyProperty::Register (this, Type::MATRIX3D, "M33", false, new Value (1.0), Type::DOUBLE); + DependencyProperty::Register (this, Type::MATRIX3D, "M32", false, new Value (0.0), Type::DOUBLE); + DependencyProperty::Register (this, Type::MATRIX3D, "M31", false, new Value (0.0), Type::DOUBLE); + DependencyProperty::Register (this, Type::MATRIX3D, "M24", false, new Value (0.0), Type::DOUBLE); + DependencyProperty::Register (this, Type::MATRIX3D, "M23", false, new Value (0.0), Type::DOUBLE); + DependencyProperty::Register (this, Type::MATRIX3D, "M22", false, new Value (1.0), Type::DOUBLE); + DependencyProperty::Register (this, Type::MATRIX3D, "M21", false, new Value (0.0), Type::DOUBLE); + DependencyProperty::Register (this, Type::MATRIX3D, "M14", false, new Value (0.0), Type::DOUBLE); + DependencyProperty::Register (this, Type::MATRIX3D, "M13", false, new Value (0.0), Type::DOUBLE); + DependencyProperty::Register (this, Type::MATRIX3D, "M12", false, new Value (0.0), Type::DOUBLE); + DependencyProperty::Register (this, Type::MATRIX3D, "M11", false, new Value (1.0), Type::DOUBLE); DependencyProperty::Register (this, Type::MATRIX, "OffsetY", false, new Value (0.0), Type::DOUBLE); DependencyProperty::Register (this, Type::MATRIX, "OffsetX", false, new Value (0.0), Type::DOUBLE); DependencyProperty::Register (this, Type::MATRIX, "M22", false, new Value (1.0), Type::DOUBLE); @@ -358,6 +375,7 @@ Types::RegisterNativeProperties () DependencyProperty::RegisterFull (this, Type::UIELEMENT, "Resources", false, NULL, Type::RESOURCE_DICTIONARY, false, false, false, NULL, NULL, AutoCreators::default_autocreator, false); DependencyProperty::Register (this, Type::UIELEMENT, "RenderTransform", false, Type::TRANSFORM); DependencyProperty::Register (this, Type::UIELEMENT, "RenderTransformOrigin", false, new Value (Point (0,0)), Type::POINT); + DependencyProperty::Register (this, Type::UIELEMENT, "Projection", false, Type::PROJECTION); DependencyProperty::Register (this, Type::UIELEMENT, "Opacity", false, new Value (1.0), Type::DOUBLE); DependencyProperty::Register (this, Type::UIELEMENT, "OpacityMask", false, Type::BRUSH); DependencyProperty::Register (this, Type::UIELEMENT, "IsHitTestVisible", false, new Value (true), Type::BOOL); @@ -426,6 +444,19 @@ Types::RegisterNativeProperties () DependencyProperty::RegisterFull (this, Type::POINTANIMATION, "From", false, NULL, Type::POINT, false, false, false, NULL, NULL, NULL, true); DependencyProperty::Register (this, Type::POINTANIMATION, "EasingFunction", false, Type::EASINGFUNCTIONBASE); DependencyProperty::RegisterFull (this, Type::POINTANIMATION, "By", false, NULL, Type::POINT, false, false, false, NULL, NULL, NULL, true); + DependencyProperty::Register (this, Type::PLANEPROJECTION, "RotationZ", false, Type::DOUBLE); + DependencyProperty::Register (this, Type::PLANEPROJECTION, "RotationY", false, Type::DOUBLE); + DependencyProperty::Register (this, Type::PLANEPROJECTION, "RotationX", false, Type::DOUBLE); + DependencyProperty::Register (this, Type::PLANEPROJECTION, "ProjectionMatrix", false, Type::MATRIX3D); + DependencyProperty::Register (this, Type::PLANEPROJECTION, "LocalOffsetZ", false, Type::DOUBLE); + DependencyProperty::Register (this, Type::PLANEPROJECTION, "LocalOffsetY", false, Type::DOUBLE); + DependencyProperty::Register (this, Type::PLANEPROJECTION, "LocalOffsetX", false, Type::DOUBLE); + DependencyProperty::Register (this, Type::PLANEPROJECTION, "GlobalOffsetZ", false, Type::DOUBLE); + DependencyProperty::Register (this, Type::PLANEPROJECTION, "GlobalOffsetY", false, Type::DOUBLE); + DependencyProperty::Register (this, Type::PLANEPROJECTION, "GlobalOffsetX", false, Type::DOUBLE); + DependencyProperty::Register (this, Type::PLANEPROJECTION, "CenterOfRotationZ", false, new Value (0.5), Type::DOUBLE); + DependencyProperty::Register (this, Type::PLANEPROJECTION, "CenterOfRotationY", false, new Value (0.5), Type::DOUBLE); + DependencyProperty::Register (this, Type::PLANEPROJECTION, "CenterOfRotationX", false, new Value (0.5), Type::DOUBLE); DependencyProperty::RegisterFull (this, Type::PASSWORDBOX, "SelectionStart", false, new Value (0), Type::INT32, false, false, false, NULL, Validators::PositiveIntValidator, NULL, false); DependencyProperty::RegisterFull (this, Type::PASSWORDBOX, "SelectionLength", false, new Value (0), Type::INT32, false, false, false, NULL, Validators::PositiveIntValidator, NULL, false); DependencyProperty::Register (this, Type::PASSWORDBOX, "SelectionForeground", false, Type::BRUSH); @@ -441,6 +472,7 @@ Types::RegisterNativeProperties () DependencyProperty::Register (this, Type::OBJECTKEYFRAME, "ConvertedValue", false, Type::OBJECT); DependencyProperty::RegisterFull (this, Type::OBJECTANIMATIONUSINGKEYFRAMES, "KeyFrames", false, NULL, Type::OBJECTKEYFRAME_COLLECTION, false, false, false, NULL, NULL, AutoCreators::default_autocreator, false); DependencyProperty::Register (this, Type::MATRIXTRANSFORM, "Matrix", false, Type::MATRIX); + DependencyProperty::Register (this, Type::MATRIX3DPROJECTION, "ProjectionMatrix", false, Type::MATRIX3D); DependencyProperty::Register (this, Type::LINESEGMENT, "Point", false, Type::POINT); DependencyProperty::RegisterFull (this, Type::LAYOUTINFORMATION, "VisualOffset", false, NULL, Type::POINT, true, false, false, NULL, NULL, NULL, false); DependencyProperty::RegisterFull (this, Type::LAYOUTINFORMATION, "PreviousConstraint", false, NULL, Type::SIZE, true, false, false, NULL, NULL, NULL, false); @@ -729,189 +761,220 @@ const int MultiScaleSubImage::ViewportOriginProperty = 239; const int MultiScaleSubImage::OpacityProperty = 240; const int MultiScaleSubImage::AspectRatioProperty = 241; const int MediaAttribute::ValueProperty = 242; -const int Matrix::OffsetYProperty = 243; -const int Matrix::OffsetXProperty = 244; -const int Matrix::M22Property = 245; -const int Matrix::M21Property = 246; -const int Matrix::M12Property = 247; -const int Matrix::M11Property = 248; -const int KeySpline::ControlPoint2Property = 249; -const int KeySpline::ControlPoint1Property = 250; -const int InputMethod::IsInputMethodEnabledProperty = 251; -const int Inline::TextDecorationsProperty = 252; -const int Inline::LanguageProperty = 253; -const int Inline::ForegroundProperty = 254; -const int Inline::FontWeightProperty = 255; -const int Inline::FontStyleProperty = 256; -const int Inline::FontStretchProperty = 257; -const int Inline::FontSourceProperty = 258; -const int Inline::FontSizeProperty = 259; -const int Inline::FontFamilyProperty = 260; -const int Icon::SourceProperty = 261; -const int Icon::SizeProperty = 262; -const int GradientStop::OffsetProperty = 263; -const int GradientStop::ColorProperty = 264; -const int Geometry::TransformProperty = 265; -const int DrawingAttributes::WidthProperty = 266; -const int DrawingAttributes::OutlineColorProperty = 267; -const int DrawingAttributes::HeightProperty = 268; -const int DrawingAttributes::ColorProperty = 269; -const int Downloader::UriProperty = 270; -const int Downloader::StatusTextProperty = 271; -const int Downloader::StatusProperty = 272; -const int Downloader::ResponseTextProperty = 273; -const int Downloader::DownloadProgressProperty = 274; -const int Deployment::RuntimeVersionProperty = 275; -const int Deployment::PartsProperty = 276; -const int Deployment::OutOfBrowserSettingsProperty = 277; -const int Deployment::ExternalPartsProperty = 278; -const int Deployment::ExternalCallersFromCrossDomainProperty = 279; -const int Deployment::EntryPointTypeProperty = 280; -const int Deployment::EntryPointAssemblyProperty = 281; -const int MultiScaleTileSource::TileWidthProperty = 282; -const int MultiScaleTileSource::TileOverlapProperty = 283; -const int MultiScaleTileSource::TileHeightProperty = 284; -const int MultiScaleTileSource::TileBlendTimeProperty = 285; -const int MultiScaleTileSource::ImageWidthProperty = 286; -const int MultiScaleTileSource::ImageHeightProperty = 287; -const int ColumnDefinition::WidthProperty = 288; -const int ColumnDefinition::MinWidthProperty = 289; -const int ColumnDefinition::MaxWidthProperty = 290; -const int ColumnDefinition::ActualWidthProperty = 291; -const int Collection::CountProperty = 292; -const int UIElement::VisibilityProperty = 293; -const int UIElement::UseLayoutRoundingProperty = 294; -const int UIElement::TriggersProperty = 295; -const int UIElement::TagProperty = 296; -const int UIElement::ResourcesProperty = 297; -const int UIElement::RenderTransformProperty = 298; -const int UIElement::RenderTransformOriginProperty = 299; -const int UIElement::OpacityProperty = 300; -const int UIElement::OpacityMaskProperty = 301; -const int UIElement::IsHitTestVisibleProperty = 302; -const int UIElement::EffectProperty = 303; -const int UIElement::CursorProperty = 304; -const int UIElement::ClipProperty = 305; -const int UIElement::CacheModeProperty = 306; -const int EasingFunctionBase::EasingModeProperty = 307; -const int AssemblyPart::SourceProperty = 308; -const int Application::ResourcesProperty = 309; -const int Accessibility::TitleProperty = 310; -const int Accessibility::DescriptionProperty = 311; -const int Accessibility::ActionDescriptionProperty = 312; -const int SplineColorKeyFrame::KeySplineProperty = 313; -const int EasingColorKeyFrame::EasingFunctionProperty = 314; -const int ColorAnimationUsingKeyFrames::KeyFramesProperty = 315; -const int BitmapImage::UriSourceProperty = 316; -const int BitmapImage::ProgressProperty = 317; -const int TranslateTransform::YProperty = 318; -const int TranslateTransform::XProperty = 319; -const int TransformGroup::ChildrenProperty = 320; -const int TextOptions::TextHintingModeProperty = 321; -const int TextBox::VerticalScrollBarVisibilityProperty = 322; -const int TextBox::TextWrappingProperty = 323; -const int TextBox::TextProperty = 324; -const int TextBox::TextAlignmentProperty = 325; -const int TextBox::SelectionStartProperty = 326; -const int TextBox::SelectionLengthProperty = 327; -const int TextBox::SelectionForegroundProperty = 328; -const int TextBox::SelectionBackgroundProperty = 329; -const int TextBox::SelectedTextProperty = 330; -const int TextBox::MaxLengthProperty = 331; -const int TextBox::IsReadOnlyProperty = 332; -const int TextBox::HorizontalScrollBarVisibilityProperty = 333; -const int TextBox::FontSourceProperty = 334; -const int TextBox::CaretBrushProperty = 335; -const int TextBox::AcceptsReturnProperty = 336; -const int Storyboard::TargetPropertyProperty = 337; -const int Storyboard::TargetNameProperty = 338; -const int SkewTransform::CenterYProperty = 339; -const int SkewTransform::CenterXProperty = 340; -const int SkewTransform::AngleYProperty = 341; -const int SkewTransform::AngleXProperty = 342; -const int ShaderEffect::PixelShaderProperty = 343; -const int ShaderEffect::PaddingTopProperty = 344; -const int ShaderEffect::PaddingRightProperty = 345; -const int ShaderEffect::PaddingLeftProperty = 346; -const int ShaderEffect::PaddingBottomProperty = 347; -const int ShaderEffect::DdxUvDdyUvRegisterIndexProperty = 348; -const int SetterBaseCollection::IsSealedProperty = 349; -const int ScaleTransform::ScaleYProperty = 350; -const int ScaleTransform::ScaleXProperty = 351; -const int ScaleTransform::CenterYProperty = 352; -const int ScaleTransform::CenterXProperty = 353; -const int RotateTransform::CenterYProperty = 354; -const int RotateTransform::CenterXProperty = 355; -const int RotateTransform::AngleProperty = 356; -const int QuadraticBezierSegment::Point2Property = 357; -const int QuadraticBezierSegment::Point1Property = 358; -const int PolyQuadraticBezierSegment::PointsProperty = 359; -const int PolyLineSegment::PointsProperty = 360; -const int PolyBezierSegment::PointsProperty = 361; -const int PointKeyFrame::ValueProperty = 362; -const int PointKeyFrame::KeyTimeProperty = 363; -const int PointAnimation::ToProperty = 364; -const int PointAnimation::FromProperty = 365; -const int PointAnimation::EasingFunctionProperty = 366; -const int PointAnimation::ByProperty = 367; -const int PasswordBox::SelectionStartProperty = 368; -const int PasswordBox::SelectionLengthProperty = 369; -const int PasswordBox::SelectionForegroundProperty = 370; -const int PasswordBox::SelectionBackgroundProperty = 371; -const int PasswordBox::SelectedTextProperty = 372; -const int PasswordBox::PasswordProperty = 373; -const int PasswordBox::PasswordCharProperty = 374; -const int PasswordBox::MaxLengthProperty = 375; -const int PasswordBox::FontSourceProperty = 376; -const int PasswordBox::CaretBrushProperty = 377; -const int ObjectKeyFrame::ValueProperty = 378; -const int ObjectKeyFrame::KeyTimeProperty = 379; -const int ObjectKeyFrame::ConvertedValueProperty = 380; -const int ObjectAnimationUsingKeyFrames::KeyFramesProperty = 381; -const int MatrixTransform::MatrixProperty = 382; -const int LineSegment::PointProperty = 383; -const int LayoutInformation::VisualOffsetProperty = 384; -const int LayoutInformation::PreviousConstraintProperty = 385; -const int LayoutInformation::LayoutSlotProperty = 386; -const int LayoutInformation::LayoutClipProperty = 387; -const int LayoutInformation::LastRenderSizeProperty = 388; -const int LayoutInformation::FinalRectProperty = 389; -const int ExtensionPart::SourceProperty = 390; -const int EventTrigger::RoutedEventProperty = 391; -const int EventTrigger::ActionsProperty = 392; -const int DropShadowEffect::ShadowDepthProperty = 393; -const int DropShadowEffect::OpacityProperty = 394; -const int DropShadowEffect::DirectionProperty = 395; -const int DropShadowEffect::ColorProperty = 396; -const int DropShadowEffect::BlurRadiusProperty = 397; -const int DoubleKeyFrame::ValueProperty = 398; -const int DoubleKeyFrame::KeyTimeProperty = 399; -const int DoubleAnimation::ToProperty = 400; -const int DoubleAnimation::FromProperty = 401; -const int DoubleAnimation::EasingFunctionProperty = 402; -const int DoubleAnimation::ByProperty = 403; -const int DependencyObject::NameProperty = 404; -const int ControlTemplate::TargetTypeProperty = 405; -const int ColorKeyFrame::ValueProperty = 406; -const int ColorKeyFrame::KeyTimeProperty = 407; -const int ColorAnimation::ToProperty = 408; -const int ColorAnimation::FromProperty = 409; -const int ColorAnimation::EasingFunctionProperty = 410; -const int ColorAnimation::ByProperty = 411; -const int BlurEffect::RadiusProperty = 412; -const int BitmapSource::PixelWidthProperty = 413; -const int BitmapSource::PixelHeightProperty = 414; -const int BitmapSource::PixelFormatProperty = 415; -const int BitmapCache::RenderAtScaleProperty = 416; -const int BezierSegment::Point3Property = 417; -const int BezierSegment::Point2Property = 418; -const int BezierSegment::Point1Property = 419; -const int BeginStoryboard::StoryboardProperty = 420; -const int ArcSegment::SweepDirectionProperty = 421; -const int ArcSegment::SizeProperty = 422; -const int ArcSegment::RotationAngleProperty = 423; -const int ArcSegment::PointProperty = 424; -const int ArcSegment::IsLargeArcProperty = 425; +const int Matrix3D::OffsetZProperty = 243; +const int Matrix3D::OffsetYProperty = 244; +const int Matrix3D::OffsetXProperty = 245; +const int Matrix3D::M44Property = 246; +const int Matrix3D::M34Property = 247; +const int Matrix3D::M33Property = 248; +const int Matrix3D::M32Property = 249; +const int Matrix3D::M31Property = 250; +const int Matrix3D::M24Property = 251; +const int Matrix3D::M23Property = 252; +const int Matrix3D::M22Property = 253; +const int Matrix3D::M21Property = 254; +const int Matrix3D::M14Property = 255; +const int Matrix3D::M13Property = 256; +const int Matrix3D::M12Property = 257; +const int Matrix3D::M11Property = 258; +const int Matrix::OffsetYProperty = 259; +const int Matrix::OffsetXProperty = 260; +const int Matrix::M22Property = 261; +const int Matrix::M21Property = 262; +const int Matrix::M12Property = 263; +const int Matrix::M11Property = 264; +const int KeySpline::ControlPoint2Property = 265; +const int KeySpline::ControlPoint1Property = 266; +const int InputMethod::IsInputMethodEnabledProperty = 267; +const int Inline::TextDecorationsProperty = 268; +const int Inline::LanguageProperty = 269; +const int Inline::ForegroundProperty = 270; +const int Inline::FontWeightProperty = 271; +const int Inline::FontStyleProperty = 272; +const int Inline::FontStretchProperty = 273; +const int Inline::FontSourceProperty = 274; +const int Inline::FontSizeProperty = 275; +const int Inline::FontFamilyProperty = 276; +const int Icon::SourceProperty = 277; +const int Icon::SizeProperty = 278; +const int GradientStop::OffsetProperty = 279; +const int GradientStop::ColorProperty = 280; +const int Geometry::TransformProperty = 281; +const int DrawingAttributes::WidthProperty = 282; +const int DrawingAttributes::OutlineColorProperty = 283; +const int DrawingAttributes::HeightProperty = 284; +const int DrawingAttributes::ColorProperty = 285; +const int Downloader::UriProperty = 286; +const int Downloader::StatusTextProperty = 287; +const int Downloader::StatusProperty = 288; +const int Downloader::ResponseTextProperty = 289; +const int Downloader::DownloadProgressProperty = 290; +const int Deployment::RuntimeVersionProperty = 291; +const int Deployment::PartsProperty = 292; +const int Deployment::OutOfBrowserSettingsProperty = 293; +const int Deployment::ExternalPartsProperty = 294; +const int Deployment::ExternalCallersFromCrossDomainProperty = 295; +const int Deployment::EntryPointTypeProperty = 296; +const int Deployment::EntryPointAssemblyProperty = 297; +const int MultiScaleTileSource::TileWidthProperty = 298; +const int MultiScaleTileSource::TileOverlapProperty = 299; +const int MultiScaleTileSource::TileHeightProperty = 300; +const int MultiScaleTileSource::TileBlendTimeProperty = 301; +const int MultiScaleTileSource::ImageWidthProperty = 302; +const int MultiScaleTileSource::ImageHeightProperty = 303; +const int ColumnDefinition::WidthProperty = 304; +const int ColumnDefinition::MinWidthProperty = 305; +const int ColumnDefinition::MaxWidthProperty = 306; +const int ColumnDefinition::ActualWidthProperty = 307; +const int Collection::CountProperty = 308; +const int UIElement::VisibilityProperty = 309; +const int UIElement::UseLayoutRoundingProperty = 310; +const int UIElement::TriggersProperty = 311; +const int UIElement::TagProperty = 312; +const int UIElement::ResourcesProperty = 313; +const int UIElement::RenderTransformProperty = 314; +const int UIElement::RenderTransformOriginProperty = 315; +const int UIElement::ProjectionProperty = 316; +const int UIElement::OpacityProperty = 317; +const int UIElement::OpacityMaskProperty = 318; +const int UIElement::IsHitTestVisibleProperty = 319; +const int UIElement::EffectProperty = 320; +const int UIElement::CursorProperty = 321; +const int UIElement::ClipProperty = 322; +const int UIElement::CacheModeProperty = 323; +const int EasingFunctionBase::EasingModeProperty = 324; +const int AssemblyPart::SourceProperty = 325; +const int Application::ResourcesProperty = 326; +const int Accessibility::TitleProperty = 327; +const int Accessibility::DescriptionProperty = 328; +const int Accessibility::ActionDescriptionProperty = 329; +const int SplineColorKeyFrame::KeySplineProperty = 330; +const int EasingColorKeyFrame::EasingFunctionProperty = 331; +const int ColorAnimationUsingKeyFrames::KeyFramesProperty = 332; +const int BitmapImage::UriSourceProperty = 333; +const int BitmapImage::ProgressProperty = 334; +const int TranslateTransform::YProperty = 335; +const int TranslateTransform::XProperty = 336; +const int TransformGroup::ChildrenProperty = 337; +const int TextOptions::TextHintingModeProperty = 338; +const int TextBox::VerticalScrollBarVisibilityProperty = 339; +const int TextBox::TextWrappingProperty = 340; +const int TextBox::TextProperty = 341; +const int TextBox::TextAlignmentProperty = 342; +const int TextBox::SelectionStartProperty = 343; +const int TextBox::SelectionLengthProperty = 344; +const int TextBox::SelectionForegroundProperty = 345; +const int TextBox::SelectionBackgroundProperty = 346; +const int TextBox::SelectedTextProperty = 347; +const int TextBox::MaxLengthProperty = 348; +const int TextBox::IsReadOnlyProperty = 349; +const int TextBox::HorizontalScrollBarVisibilityProperty = 350; +const int TextBox::FontSourceProperty = 351; +const int TextBox::CaretBrushProperty = 352; +const int TextBox::AcceptsReturnProperty = 353; +const int Storyboard::TargetPropertyProperty = 354; +const int Storyboard::TargetNameProperty = 355; +const int SkewTransform::CenterYProperty = 356; +const int SkewTransform::CenterXProperty = 357; +const int SkewTransform::AngleYProperty = 358; +const int SkewTransform::AngleXProperty = 359; +const int ShaderEffect::PixelShaderProperty = 360; +const int ShaderEffect::PaddingTopProperty = 361; +const int ShaderEffect::PaddingRightProperty = 362; +const int ShaderEffect::PaddingLeftProperty = 363; +const int ShaderEffect::PaddingBottomProperty = 364; +const int ShaderEffect::DdxUvDdyUvRegisterIndexProperty = 365; +const int SetterBaseCollection::IsSealedProperty = 366; +const int ScaleTransform::ScaleYProperty = 367; +const int ScaleTransform::ScaleXProperty = 368; +const int ScaleTransform::CenterYProperty = 369; +const int ScaleTransform::CenterXProperty = 370; +const int RotateTransform::CenterYProperty = 371; +const int RotateTransform::CenterXProperty = 372; +const int RotateTransform::AngleProperty = 373; +const int QuadraticBezierSegment::Point2Property = 374; +const int QuadraticBezierSegment::Point1Property = 375; +const int PolyQuadraticBezierSegment::PointsProperty = 376; +const int PolyLineSegment::PointsProperty = 377; +const int PolyBezierSegment::PointsProperty = 378; +const int PointKeyFrame::ValueProperty = 379; +const int PointKeyFrame::KeyTimeProperty = 380; +const int PointAnimation::ToProperty = 381; +const int PointAnimation::FromProperty = 382; +const int PointAnimation::EasingFunctionProperty = 383; +const int PointAnimation::ByProperty = 384; +const int PlaneProjection::RotationZProperty = 385; +const int PlaneProjection::RotationYProperty = 386; +const int PlaneProjection::RotationXProperty = 387; +const int PlaneProjection::ProjectionMatrixProperty = 388; +const int PlaneProjection::LocalOffsetZProperty = 389; +const int PlaneProjection::LocalOffsetYProperty = 390; +const int PlaneProjection::LocalOffsetXProperty = 391; +const int PlaneProjection::GlobalOffsetZProperty = 392; +const int PlaneProjection::GlobalOffsetYProperty = 393; +const int PlaneProjection::GlobalOffsetXProperty = 394; +const int PlaneProjection::CenterOfRotationZProperty = 395; +const int PlaneProjection::CenterOfRotationYProperty = 396; +const int PlaneProjection::CenterOfRotationXProperty = 397; +const int PasswordBox::SelectionStartProperty = 398; +const int PasswordBox::SelectionLengthProperty = 399; +const int PasswordBox::SelectionForegroundProperty = 400; +const int PasswordBox::SelectionBackgroundProperty = 401; +const int PasswordBox::SelectedTextProperty = 402; +const int PasswordBox::PasswordProperty = 403; +const int PasswordBox::PasswordCharProperty = 404; +const int PasswordBox::MaxLengthProperty = 405; +const int PasswordBox::FontSourceProperty = 406; +const int PasswordBox::CaretBrushProperty = 407; +const int ObjectKeyFrame::ValueProperty = 408; +const int ObjectKeyFrame::KeyTimeProperty = 409; +const int ObjectKeyFrame::ConvertedValueProperty = 410; +const int ObjectAnimationUsingKeyFrames::KeyFramesProperty = 411; +const int MatrixTransform::MatrixProperty = 412; +const int Matrix3DProjection::ProjectionMatrixProperty = 413; +const int LineSegment::PointProperty = 414; +const int LayoutInformation::VisualOffsetProperty = 415; +const int LayoutInformation::PreviousConstraintProperty = 416; +const int LayoutInformation::LayoutSlotProperty = 417; +const int LayoutInformation::LayoutClipProperty = 418; +const int LayoutInformation::LastRenderSizeProperty = 419; +const int LayoutInformation::FinalRectProperty = 420; +const int ExtensionPart::SourceProperty = 421; +const int EventTrigger::RoutedEventProperty = 422; +const int EventTrigger::ActionsProperty = 423; +const int DropShadowEffect::ShadowDepthProperty = 424; +const int DropShadowEffect::OpacityProperty = 425; +const int DropShadowEffect::DirectionProperty = 426; +const int DropShadowEffect::ColorProperty = 427; +const int DropShadowEffect::BlurRadiusProperty = 428; +const int DoubleKeyFrame::ValueProperty = 429; +const int DoubleKeyFrame::KeyTimeProperty = 430; +const int DoubleAnimation::ToProperty = 431; +const int DoubleAnimation::FromProperty = 432; +const int DoubleAnimation::EasingFunctionProperty = 433; +const int DoubleAnimation::ByProperty = 434; +const int DependencyObject::NameProperty = 435; +const int ControlTemplate::TargetTypeProperty = 436; +const int ColorKeyFrame::ValueProperty = 437; +const int ColorKeyFrame::KeyTimeProperty = 438; +const int ColorAnimation::ToProperty = 439; +const int ColorAnimation::FromProperty = 440; +const int ColorAnimation::EasingFunctionProperty = 441; +const int ColorAnimation::ByProperty = 442; +const int BlurEffect::RadiusProperty = 443; +const int BitmapSource::PixelWidthProperty = 444; +const int BitmapSource::PixelHeightProperty = 445; +const int BitmapSource::PixelFormatProperty = 446; +const int BitmapCache::RenderAtScaleProperty = 447; +const int BezierSegment::Point3Property = 448; +const int BezierSegment::Point2Property = 449; +const int BezierSegment::Point1Property = 450; +const int BeginStoryboard::StoryboardProperty = 451; +const int ArcSegment::SweepDirectionProperty = 452; +const int ArcSegment::SizeProperty = 453; +const int ArcSegment::RotationAngleProperty = 454; +const int ArcSegment::PointProperty = 455; +const int ArcSegment::IsLargeArcProperty = 456; UIElement * VisualBrush::GetVisual () @@ -3945,6 +4008,214 @@ MediaAttribute::SetValue (const char *value) } double +Matrix3D::GetOffsetZ () +{ + Value *value = GetValue (Matrix3D::OffsetZProperty); + return value->AsDouble (); +} + +void +Matrix3D::SetOffsetZ (double value) +{ + SetValue (Matrix3D::OffsetZProperty, Value (value)); +} + +double +Matrix3D::GetOffsetY () +{ + Value *value = GetValue (Matrix3D::OffsetYProperty); + return value->AsDouble (); +} + +void +Matrix3D::SetOffsetY (double value) +{ + SetValue (Matrix3D::OffsetYProperty, Value (value)); +} + +double +Matrix3D::GetOffsetX () +{ + Value *value = GetValue (Matrix3D::OffsetXProperty); + return value->AsDouble (); +} + +void +Matrix3D::SetOffsetX (double value) +{ + SetValue (Matrix3D::OffsetXProperty, Value (value)); +} + +double +Matrix3D::GetM44 () +{ + Value *value = GetValue (Matrix3D::M44Property); + return value->AsDouble (); +} + +void +Matrix3D::SetM44 (double value) +{ + SetValue (Matrix3D::M44Property, Value (value)); +} + +double +Matrix3D::GetM34 () +{ + Value *value = GetValue (Matrix3D::M34Property); + return value->AsDouble (); +} + +void +Matrix3D::SetM34 (double value) +{ + SetValue (Matrix3D::M34Property, Value (value)); +} + +double +Matrix3D::GetM33 () +{ + Value *value = GetValue (Matrix3D::M33Property); + return value->AsDouble (); +} + +void +Matrix3D::SetM33 (double value) +{ + SetValue (Matrix3D::M33Property, Value (value)); +} + +double +Matrix3D::GetM32 () +{ + Value *value = GetValue (Matrix3D::M32Property); + return value->AsDouble (); +} + +void +Matrix3D::SetM32 (double value) +{ + SetValue (Matrix3D::M32Property, Value (value)); +} + +double +Matrix3D::GetM31 () +{ + Value *value = GetValue (Matrix3D::M31Property); + return value->AsDouble (); +} + +void +Matrix3D::SetM31 (double value) +{ + SetValue (Matrix3D::M31Property, Value (value)); +} + +double +Matrix3D::GetM24 () +{ + Value *value = GetValue (Matrix3D::M24Property); + return value->AsDouble (); +} + +void +Matrix3D::SetM24 (double value) +{ + SetValue (Matrix3D::M24Property, Value (value)); +} + +double +Matrix3D::GetM23 () +{ + Value *value = GetValue (Matrix3D::M23Property); + return value->AsDouble (); +} + +void +Matrix3D::SetM23 (double value) +{ + SetValue (Matrix3D::M23Property, Value (value)); +} + +double +Matrix3D::GetM22 () +{ + Value *value = GetValue (Matrix3D::M22Property); + return value->AsDouble (); +} + +void +Matrix3D::SetM22 (double value) +{ + SetValue (Matrix3D::M22Property, Value (value)); +} + +double +Matrix3D::GetM21 () +{ + Value *value = GetValue (Matrix3D::M21Property); + return value->AsDouble (); +} + +void +Matrix3D::SetM21 (double value) +{ + SetValue (Matrix3D::M21Property, Value (value)); +} + +double +Matrix3D::GetM14 () +{ + Value *value = GetValue (Matrix3D::M14Property); + return value->AsDouble (); +} + +void +Matrix3D::SetM14 (double value) +{ + SetValue (Matrix3D::M14Property, Value (value)); +} + +double +Matrix3D::GetM13 () +{ + Value *value = GetValue (Matrix3D::M13Property); + return value->AsDouble (); +} + +void +Matrix3D::SetM13 (double value) +{ + SetValue (Matrix3D::M13Property, Value (value)); +} + +double +Matrix3D::GetM12 () +{ + Value *value = GetValue (Matrix3D::M12Property); + return value->AsDouble (); +} + +void +Matrix3D::SetM12 (double value) +{ + SetValue (Matrix3D::M12Property, Value (value)); +} + +double +Matrix3D::GetM11 () +{ + Value *value = GetValue (Matrix3D::M11Property); + return value->AsDouble (); +} + +void +Matrix3D::SetM11 (double value) +{ + SetValue (Matrix3D::M11Property, Value (value)); +} + +double Matrix::GetOffsetY () { Value *value = GetValue (Matrix::OffsetYProperty); @@ -4635,6 +4906,19 @@ UIElement::SetRenderTransformOrigin (Point *value) SetValue (UIElement::RenderTransformOriginProperty, Value (*value)); } +Projection * +UIElement::GetProjection () +{ + Value *value = GetValue (UIElement::ProjectionProperty); + return value ? value->AsProjection () : NULL; +} + +void +UIElement::SetProjection (Projection *value) +{ + SetValue (UIElement::ProjectionProperty, Value::CreateUnrefPtr (value)); +} + double UIElement::GetOpacity () { @@ -5523,6 +5807,175 @@ PointAnimation::SetBy (Point *value) SetValue (PointAnimation::ByProperty, Value (*value)); } +double +PlaneProjection::GetRotationZ () +{ + Value *value = GetValue (PlaneProjection::RotationZProperty); + return value->AsDouble (); +} + +void +PlaneProjection::SetRotationZ (double value) +{ + SetValue (PlaneProjection::RotationZProperty, Value (value)); +} + +double +PlaneProjection::GetRotationY () +{ + Value *value = GetValue (PlaneProjection::RotationYProperty); + return value->AsDouble (); +} + +void +PlaneProjection::SetRotationY (double value) +{ + SetValue (PlaneProjection::RotationYProperty, Value (value)); +} + +double +PlaneProjection::GetRotationX () +{ + Value *value = GetValue (PlaneProjection::RotationXProperty); + return value->AsDouble (); +} + +void +PlaneProjection::SetRotationX (double value) +{ + SetValue (PlaneProjection::RotationXProperty, Value (value)); +} + +Matrix3D * +PlaneProjection::GetProjectionMatrix () +{ + Value *value = GetValue (PlaneProjection::ProjectionMatrixProperty); + return value ? value->AsMatrix3D () : NULL; +} + +void +PlaneProjection::SetProjectionMatrix (Matrix3D *value) +{ + SetValue (PlaneProjection::ProjectionMatrixProperty, Value::CreateUnrefPtr (value)); +} + +double +PlaneProjection::GetLocalOffsetZ () +{ + Value *value = GetValue (PlaneProjection::LocalOffsetZProperty); + return value->AsDouble (); +} + +void +PlaneProjection::SetLocalOffsetZ (double value) +{ + SetValue (PlaneProjection::LocalOffsetZProperty, Value (value)); +} + +double +PlaneProjection::GetLocalOffsetY () +{ + Value *value = GetValue (PlaneProjection::LocalOffsetYProperty); + return value->AsDouble (); +} + +void +PlaneProjection::SetLocalOffsetY (double value) +{ + SetValue (PlaneProjection::LocalOffsetYProperty, Value (value)); +} + +double +PlaneProjection::GetLocalOffsetX () +{ + Value *value = GetValue (PlaneProjection::LocalOffsetXProperty); + return value->AsDouble (); +} + +void +PlaneProjection::SetLocalOffsetX (double value) +{ + SetValue (PlaneProjection::LocalOffsetXProperty, Value (value)); +} + +double +PlaneProjection::GetGlobalOffsetZ () +{ + Value *value = GetValue (PlaneProjection::GlobalOffsetZProperty); + return value->AsDouble (); +} + +void +PlaneProjection::SetGlobalOffsetZ (double value) +{ + SetValue (PlaneProjection::GlobalOffsetZProperty, Value (value)); +} + +double +PlaneProjection::GetGlobalOffsetY () +{ + Value *value = GetValue (PlaneProjection::GlobalOffsetYProperty); + return value->AsDouble (); +} + +void +PlaneProjection::SetGlobalOffsetY (double value) +{ + SetValue (PlaneProjection::GlobalOffsetYProperty, Value (value)); +} + +double +PlaneProjection::GetGlobalOffsetX () +{ + Value *value = GetValue (PlaneProjection::GlobalOffsetXProperty); + return value->AsDouble (); +} + +void +PlaneProjection::SetGlobalOffsetX (double value) +{ + SetValue (PlaneProjection::GlobalOffsetXProperty, Value (value)); +} + +double +PlaneProjection::GetCenterOfRotationZ () +{ + Value *value = GetValue (PlaneProjection::CenterOfRotationZProperty); + return value->AsDouble (); +} + +void +PlaneProjection::SetCenterOfRotationZ (double value) +{ + SetValue (PlaneProjection::CenterOfRotationZProperty, Value (value)); +} + +double +PlaneProjection::GetCenterOfRotationY () +{ + Value *value = GetValue (PlaneProjection::CenterOfRotationYProperty); + return value->AsDouble (); +} + +void +PlaneProjection::SetCenterOfRotationY (double value) +{ + SetValue (PlaneProjection::CenterOfRotationYProperty, Value (value)); +} + +double +PlaneProjection::GetCenterOfRotationX () +{ + Value *value = GetValue (PlaneProjection::CenterOfRotationXProperty); + return value->AsDouble (); +} + +void +PlaneProjection::SetCenterOfRotationX (double value) +{ + SetValue (PlaneProjection::CenterOfRotationXProperty, Value (value)); +} + gint32 PasswordBox::GetSelectionStart () { @@ -5714,6 +6167,19 @@ MatrixTransform::SetMatrix (Matrix *value) SetValue (MatrixTransform::MatrixProperty, Value::CreateUnrefPtr (value)); } +Matrix3D * +Matrix3DProjection::GetProjectionMatrix () +{ + Value *value = GetValue (Matrix3DProjection::ProjectionMatrixProperty); + return value ? value->AsMatrix3D () : NULL; +} + +void +Matrix3DProjection::SetProjectionMatrix (Matrix3D *value) +{ + SetValue (Matrix3DProjection::ProjectionMatrixProperty, Value::CreateUnrefPtr (value)); +} + Point * LineSegment::GetPoint () { diff --git a/src/projection.cpp b/src/projection.cpp new file mode 100644 index 000000000..07287ceb7 --- /dev/null +++ b/src/projection.cpp @@ -0,0 +1,77 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * projection.cpp: + * + * Contact: + * Moonlight List (moonlight-list@lists.ximian.com) + * + * Copyright 2009 Novell, Inc. (http://www.novell.com) + * + * See the LICENSE file included with the distribution for details. + */ + +#include + +#include +#include + +#include "projection.h" +#include "eventargs.h" + +// +// Matrix3D +// + +Matrix3D::Matrix3D () +{ + SetObjectType (Type::MATRIX3D); + + // initialize the matrix as the identity + memset (matrix, 0, sizeof (double) * 16); + matrix[0] = matrix[5] = matrix[10] = matrix[15] = 1.0; +} + +void +Matrix3D::OnPropertyChanged (PropertyChangedEventArgs *args, MoonError *error) +{ + if (args->GetProperty ()->GetOwnerType() != Type::MATRIX3D) { + DependencyObject::OnPropertyChanged (args, error); + return; + } + + if (args->GetId () == Matrix3D::M11Property) + matrix[0] = args->GetNewValue()->AsDouble (); + else if (args->GetId () == Matrix3D::M12Property) + matrix[1] = args->GetNewValue()->AsDouble (); + else if (args->GetId () == Matrix3D::M13Property) + matrix[2] = args->GetNewValue()->AsDouble (); + else if (args->GetId () == Matrix3D::M14Property) + matrix[3] = args->GetNewValue()->AsDouble (); + else if (args->GetId () == Matrix3D::M21Property) + matrix[4] = args->GetNewValue()->AsDouble (); + else if (args->GetId () == Matrix3D::M22Property) + matrix[5] = args->GetNewValue()->AsDouble (); + else if (args->GetId () == Matrix3D::M23Property) + matrix[6] = args->GetNewValue()->AsDouble (); + else if (args->GetId () == Matrix3D::M24Property) + matrix[7] = args->GetNewValue()->AsDouble (); + else if (args->GetId () == Matrix3D::M31Property) + matrix[8] = args->GetNewValue()->AsDouble (); + else if (args->GetId () == Matrix3D::M32Property) + matrix[9] = args->GetNewValue()->AsDouble (); + else if (args->GetId () == Matrix3D::M33Property) + matrix[10] = args->GetNewValue()->AsDouble (); + else if (args->GetId () == Matrix3D::M34Property) + matrix[11] = args->GetNewValue()->AsDouble (); + else if (args->GetId () == Matrix3D::OffsetXProperty) + matrix[12] = args->GetNewValue()->AsDouble (); + else if (args->GetId () == Matrix3D::OffsetYProperty) + matrix[13] = args->GetNewValue()->AsDouble (); + else if (args->GetId () == Matrix3D::OffsetZProperty) + matrix[14] = args->GetNewValue()->AsDouble (); + else if (args->GetId () == Matrix3D::M44Property) + matrix[15] = args->GetNewValue()->AsDouble (); + + NotifyListenersOfPropertyChange (args, error); +} + diff --git a/src/projection.h b/src/projection.h new file mode 100644 index 000000000..4bba3da96 --- /dev/null +++ b/src/projection.h @@ -0,0 +1,248 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + +/* + * Contact: + * Moonlight List (moonlight-list@lists.ximian.com) + * + * Copyright 2009 Novell, Inc. (http://www.novell.com) + * + * See the LICENSE file included with the distribution for details. + */ + + +#ifndef __MOONLIGHT_PROJECTION_H__ +#define __MOONLIGHT_PROJECTION_H__ + +#include +#include "enums.h" +#include "dependencyobject.h" + +/* @Namespace=None */ // The managed Matrix3D is a struct +/* @ManagedDependencyProperties=Manual */ +/* @ManagedEvents=None */ +class Matrix3D : public DependencyObject { +private: + double matrix[16]; + +protected: + virtual ~Matrix3D () {} + +public: + /* @PropertyType=double,DefaultValue=1.0,GenerateAccessors */ + const static int M11Property; + /* @PropertyType=double,DefaultValue=0.0,GenerateAccessors */ + const static int M12Property; + /* @PropertyType=double,DefaultValue=0.0,GenerateAccessors */ + const static int M13Property; + /* @PropertyType=double,DefaultValue=0.0,GenerateAccessors */ + const static int M14Property; + /* @PropertyType=double,DefaultValue=0.0,GenerateAccessors */ + const static int M21Property; + /* @PropertyType=double,DefaultValue=1.0,GenerateAccessors */ + const static int M22Property; + /* @PropertyType=double,DefaultValue=0.0,GenerateAccessors */ + const static int M23Property; + /* @PropertyType=double,DefaultValue=0.0,GenerateAccessors */ + const static int M24Property; + /* @PropertyType=double,DefaultValue=0.0,GenerateAccessors */ + const static int M31Property; + /* @PropertyType=double,DefaultValue=0.0,GenerateAccessors */ + const static int M32Property; + /* @PropertyType=double,DefaultValue=1.0,GenerateAccessors */ + const static int M33Property; + /* @PropertyType=double,DefaultValue=0.0,GenerateAccessors */ + const static int M34Property; + /* @PropertyType=double,DefaultValue=0.0,GenerateAccessors */ + const static int OffsetXProperty; + /* @PropertyType=double,DefaultValue=0.0,GenerateAccessors */ + const static int OffsetYProperty; + /* @PropertyType=double,DefaultValue=0.0,GenerateAccessors */ + const static int OffsetZProperty; + /* @PropertyType=double,DefaultValue=1.0,GenerateAccessors */ + const static int M44Property; + + /* @GenerateCBinding,GeneratePInvoke */ + Matrix3D (); + + virtual void OnPropertyChanged (PropertyChangedEventArgs *args, MoonError *error); + + /* @GenerateCBinding,GeneratePInvoke */ + gpointer GetMatrixValues () { return matrix; } + + // + // Property Accessors + // + void SetM11 (double m11); + double GetM11 (); + + void SetM12 (double m12); + double GetM12 (); + + void SetM13 (double m13); + double GetM13 (); + + void SetM14 (double m14); + double GetM14 (); + + void SetM21 (double m21); + double GetM21 (); + + void SetM22 (double m22); + double GetM22 (); + + void SetM23 (double m23); + double GetM23 (); + + void SetM24 (double m24); + double GetM24 (); + + void SetM31 (double m31); + double GetM31 (); + + void SetM32 (double m32); + double GetM32 (); + + void SetM33 (double m33); + double GetM33 (); + + void SetM34 (double m34); + double GetM34 (); + + void SetOffsetX (double offsetX); + double GetOffsetX (); + + void SetOffsetY (double offsetY); + double GetOffsetY (); + + void SetOffsetZ (double offsetY); + double GetOffsetZ (); + + void SetM44 (double m44); + double GetM44 (); +}; + +/* @Namespace=System.Windows.Media3D */ +class UnmanagedMatrix3D : public Matrix3D { + + protected: + virtual ~UnmanagedMatrix3D () {} + + public: + /* @GenerateCBinding,GeneratePInvoke */ + UnmanagedMatrix3D () { SetObjectType (Type::UNMANAGEDMATRIX3D); } +}; + +/* @Namespace=System.Windows.Media */ +class Projection : public DependencyObject { +public: + /* @GenerateCBinding,GeneratePInvoke */ + Projection () { SetObjectType (Type::PROJECTION); } + +protected: + virtual ~Projection () {} +}; + +/* @Namespace=System.Windows.Media */ +class PlaneProjection : public Projection { +public: + /* @GenerateCBinding,GeneratePInvoke */ + PlaneProjection () { SetObjectType (Type::PLANEPROJECTION); } + + /* @PropertyType=double,DefaultValue=0.5,GenerateAccessors */ + const static int CenterOfRotationXProperty; + /* @PropertyType=double,DefaultValue=0.5,GenerateAccessors */ + const static int CenterOfRotationYProperty; + /* @PropertyType=double,DefaultValue=0.5,GenerateAccessors */ + const static int CenterOfRotationZProperty; + + /* @PropertyType=double,GenerateAccessors */ + const static int GlobalOffsetXProperty; + /* @PropertyType=double,GenerateAccessors */ + const static int GlobalOffsetYProperty; + /* @PropertyType=double,GenerateAccessors */ + const static int GlobalOffsetZProperty; + + /* @PropertyType=double,GenerateAccessors */ + const static int LocalOffsetXProperty; + /* @PropertyType=double,GenerateAccessors */ + const static int LocalOffsetYProperty; + /* @PropertyType=double,GenerateAccessors */ + const static int LocalOffsetZProperty; + + /* @PropertyType=double,GenerateAccessors */ + const static int RotationXProperty; + /* @PropertyType=double,GenerateAccessors */ + const static int RotationYProperty; + /* @PropertyType=double,GenerateAccessors */ + const static int RotationZProperty; + + /* @PropertyType=Matrix3D,GenerateAccessors,ManagedSetterAccess=Internal */ + const static int ProjectionMatrixProperty; + + // + // Property Accessors + // + double GetCenterOfRotationX (); + void SetCenterOfRotationX (double value); + + double GetCenterOfRotationY (); + void SetCenterOfRotationY (double value); + + double GetCenterOfRotationZ (); + void SetCenterOfRotationZ (double value); + + double GetGlobalOffsetX (); + void SetGlobalOffsetX (double value); + + double GetGlobalOffsetY (); + void SetGlobalOffsetY (double value); + + double GetGlobalOffsetZ (); + void SetGlobalOffsetZ (double value); + + double GetLocalOffsetX (); + void SetLocalOffsetX (double value); + + double GetLocalOffsetY (); + void SetLocalOffsetY (double value); + + double GetLocalOffsetZ (); + void SetLocalOffsetZ (double value); + + double GetRotationX (); + void SetRotationX (double value); + + double GetRotationY (); + void SetRotationY (double value); + + double GetRotationZ (); + void SetRotationZ (double value); + + Matrix3D* GetProjectionMatrix (); + void SetProjectionMatrix (Matrix3D* value); + +protected: + virtual ~PlaneProjection () {} +}; + +/* @Namespace=System.Windows.Media */ +class Matrix3DProjection : public Projection { +public: + /* @GenerateCBinding,GeneratePInvoke */ + Matrix3DProjection () { SetObjectType (Type::MATRIX3DPROJECTION); } + + /* @PropertyType=Matrix3D,GenerateAccessors */ + const static int ProjectionMatrixProperty; + + + // + // Property Accessors + // + void SetProjectionMatrix (Matrix3D *matrix); + Matrix3D *GetProjectionMatrix (); + +protected: + virtual ~Matrix3DProjection () {} +}; + +#endif diff --git a/src/type-generated.cpp b/src/type-generated.cpp index e2e30c1ac..435c9c392 100644 --- a/src/type-generated.cpp +++ b/src/type-generated.cpp @@ -54,6 +54,7 @@ #include "plugin-accessibility.h" #include "plugin-class.h" #include "popup.h" +#include "projection.h" #include "resources.h" #include "runtime.h" #include "shape.h" @@ -401,6 +402,8 @@ Types::RegisterNativeTypes () types [(int) Type::MANUALTIMESOURCE] = new Type (deployment, Type::MANUALTIMESOURCE, Type::TIMESOURCE, false, false, "ManualTimeSource", 0, 2, NULL, 0, NULL, true, NULL, NULL); types [(int) Type::MARKERSTREAM] = new Type (deployment, Type::MARKERSTREAM, Type::IMEDIASTREAM, false, false, "MarkerStream", 0, 2, NULL, 0, NULL, false, NULL, NULL); types [(int) Type::MATRIX] = new Type (deployment, Type::MATRIX, Type::DEPENDENCY_OBJECT, false, false, "Matrix", 0, 1, NULL, 0, NULL, true, (create_inst_func *) matrix_new, NULL); + types [(int) Type::MATRIX3D] = new Type (deployment, Type::MATRIX3D, Type::DEPENDENCY_OBJECT, false, false, "Matrix3D", 0, 1, NULL, 0, NULL, true, (create_inst_func *) matrix3_d_new, NULL); + types [(int) Type::MATRIX3DPROJECTION] = new Type (deployment, Type::MATRIX3DPROJECTION, Type::PROJECTION, false, false, "Matrix3DProjection", 0, 1, NULL, 0, NULL, true, (create_inst_func *) matrix3_dprojection_new, NULL); types [(int) Type::MATRIXTRANSFORM] = new Type (deployment, Type::MATRIXTRANSFORM, Type::TRANSFORM, false, false, "MatrixTransform", 0, 1, NULL, 0, NULL, true, (create_inst_func *) matrix_transform_new, NULL); types [(int) Type::MEDIA] = new Type (deployment, Type::MEDIA, Type::IMEDIAOBJECT, false, false, "Media", 8, 9, MEDIA_Events, 0, NULL, false, NULL, NULL); types [(int) Type::MEDIAATTRIBUTE] = new Type (deployment, Type::MEDIAATTRIBUTE, Type::DEPENDENCY_OBJECT, false, false, "MediaAttribute", 0, 1, NULL, 0, NULL, true, (create_inst_func *) media_attribute_new, NULL); @@ -451,6 +454,7 @@ Types::RegisterNativeTypes () types [(int) Type::PATHSEGMENT] = new Type (deployment, Type::PATHSEGMENT, Type::DEPENDENCY_OBJECT, false, false, "PathSegment", 0, 1, NULL, 0, NULL, false, (create_inst_func *) path_segment_new, NULL); types [(int) Type::PATHSEGMENT_COLLECTION] = new Type (deployment, Type::PATHSEGMENT_COLLECTION, Type::DEPENDENCY_OBJECT_COLLECTION, false, false, "PathSegmentCollection", 0, 3, NULL, 0, NULL, true, (create_inst_func *) path_segment_collection_new, NULL); types [(int) Type::PIXELSHADER] = new Type (deployment, Type::PIXELSHADER, Type::DEPENDENCY_OBJECT, false, false, "PixelShader", 0, 1, NULL, 0, NULL, true, (create_inst_func *) pixel_shader_new, NULL); + types [(int) Type::PLANEPROJECTION] = new Type (deployment, Type::PLANEPROJECTION, Type::PROJECTION, false, false, "PlaneProjection", 0, 1, NULL, 0, NULL, true, (create_inst_func *) plane_projection_new, NULL); types [(int) Type::PLAYLIST] = new Type (deployment, Type::PLAYLIST, Type::PLAYLISTENTRY, false, false, "Playlist", 0, 1, NULL, 0, NULL, false, NULL, NULL); types [(int) Type::PLAYLISTENTRY] = new Type (deployment, Type::PLAYLISTENTRY, Type::EVENTOBJECT, false, false, "PlaylistEntry", 0, 1, NULL, 0, NULL, false, NULL, NULL); types [(int) Type::PLAYLISTROOT] = new Type (deployment, Type::PLAYLISTROOT, Type::PLAYLIST, false, false, "PlaylistRoot", 14, 15, PLAYLISTROOT_Events, 0, NULL, false, NULL, NULL); @@ -469,6 +473,7 @@ Types::RegisterNativeTypes () types [(int) Type::POWEREASE] = new Type (deployment, Type::POWEREASE, Type::EASINGFUNCTIONBASE, false, false, "PowerEase", 0, 1, NULL, 0, NULL, true, (create_inst_func *) power_ease_new, NULL); types [(int) Type::PROGRESSEVENTARGS] = new Type (deployment, Type::PROGRESSEVENTARGS, Type::EVENTARGS, false, false, "ProgressEventArgs", 0, 1, NULL, 0, NULL, false, NULL, NULL); types [(int) Type::PROGRESSIVESOURCE] = new Type (deployment, Type::PROGRESSIVESOURCE, Type::FILESOURCE, false, false, "ProgressiveSource", 0, 1, NULL, 0, NULL, false, NULL, NULL); + types [(int) Type::PROJECTION] = new Type (deployment, Type::PROJECTION, Type::DEPENDENCY_OBJECT, false, false, "Projection", 0, 1, NULL, 0, NULL, true, (create_inst_func *) projection_new, NULL); types [(int) Type::PROPERTYCHANGEDEVENTARGS] = new Type (deployment, Type::PROPERTYCHANGEDEVENTARGS, Type::EVENTARGS, false, false, "PropertyChangedEventArgs", 0, 1, NULL, 0, NULL, false, NULL, NULL); types [(int) Type::PROPERTYPATH] = new Type (deployment, Type::PROPERTYPATH, Type::OBJECT, true, false, "PropertyPath", 0, 0, NULL, 0, NULL, true, NULL, NULL); types [(int) Type::PULSESOURCE] = new Type (deployment, Type::PULSESOURCE, Type::AUDIOSOURCE, false, false, "PulseSource", 0, 1, NULL, 0, NULL, false, NULL, NULL); @@ -544,6 +549,7 @@ Types::RegisterNativeTypes () types [(int) Type::UINT32] = new Type (deployment, Type::UINT32, Type::OBJECT, true, false, "guint32", 0, 0, NULL, 5, UINT32_Interfaces, true, NULL, NULL); types [(int) Type::UINT64] = new Type (deployment, Type::UINT64, Type::OBJECT, true, false, "guint64", 0, 0, NULL, 5, UINT64_Interfaces, true, NULL, NULL); types [(int) Type::UNMANAGEDMATRIX] = new Type (deployment, Type::UNMANAGEDMATRIX, Type::MATRIX, false, false, "UnmanagedMatrix", 0, 1, NULL, 0, NULL, true, (create_inst_func *) unmanaged_matrix_new, NULL); + types [(int) Type::UNMANAGEDMATRIX3D] = new Type (deployment, Type::UNMANAGEDMATRIX3D, Type::MATRIX3D, false, false, "UnmanagedMatrix3D", 0, 1, NULL, 0, NULL, true, (create_inst_func *) unmanaged_matrix3_d_new, NULL); types [(int) Type::URI] = new Type (deployment, Type::URI, Type::OBJECT, true, false, "Uri", 0, 0, NULL, 0, NULL, true, NULL, NULL); types [(int) Type::USERCONTROL] = new Type (deployment, Type::USERCONTROL, Type::CONTROL, false, false, "UserControl", 0, 20, NULL, 0, NULL, true, (create_inst_func *) user_control_new, "Content"); types [(int) Type::VIDEOBRUSH] = new Type (deployment, Type::VIDEOBRUSH, Type::TILEBRUSH, false, false, "VideoBrush", 0, 1, NULL, 0, NULL, true, (create_inst_func *) video_brush_new, NULL); diff --git a/src/type.h b/src/type.h index 7d64823f9..7e77bfe67 100644 --- a/src/type.h +++ b/src/type.h @@ -215,6 +215,8 @@ public: MANUALTIMESOURCE, MARKERSTREAM, MATRIX, + MATRIX3D, + MATRIX3DPROJECTION, MATRIXTRANSFORM, MEDIA, MEDIAATTRIBUTE, @@ -265,6 +267,7 @@ public: PATHSEGMENT, PATHSEGMENT_COLLECTION, PIXELSHADER, + PLANEPROJECTION, PLAYLIST, PLAYLISTENTRY, PLAYLISTROOT, @@ -283,6 +286,7 @@ public: POWEREASE, PROGRESSEVENTARGS, PROGRESSIVESOURCE, + PROJECTION, PROPERTYCHANGEDEVENTARGS, PROPERTYPATH, PULSESOURCE, @@ -358,6 +362,7 @@ public: UINT32, UINT64, UNMANAGEDMATRIX, + UNMANAGEDMATRIX3D, URI, USERCONTROL, VIDEOBRUSH, diff --git a/src/uielement.h b/src/uielement.h index f461b333b..0c00ecd97 100644 --- a/src/uielement.h +++ b/src/uielement.h @@ -444,6 +444,8 @@ public: const static int CacheModeProperty; /* @PropertyType=Effect,GenerateAccessors */ const static int EffectProperty; + /* @PropertyType=Projection,GenerateAccessors */ + const static int ProjectionProperty; /* @PropertyType=bool,DefaultValue=true,GenerateAccessors */ const static int IsHitTestVisibleProperty; /* @PropertyType=Brush,GenerateAccessors */ @@ -485,6 +487,9 @@ public: Effect* GetEffect (); void SetEffect (Effect *value); + Projection* GetProjection (); + void SetProjection (Projection *value); + void SetIsHitTestVisible (bool visible); bool GetIsHitTestVisible (); diff --git a/src/value.h b/src/value.h index cc7535ccc..201fde5b9 100644 --- a/src/value.h +++ b/src/value.h @@ -187,6 +187,8 @@ class ManagedStreamSource; class ManualTimeSource; class MarkerStream; class Matrix; +class Matrix3D; +class Matrix3DProjection; class MatrixTransform; class Media; class MediaAttribute; @@ -235,6 +237,7 @@ class PathGeometry; class PathSegment; class PathSegmentCollection; class PixelShader; +class PlaneProjection; class Playlist; class PlaylistEntry; class PlaylistRoot; @@ -252,6 +255,7 @@ class Popup; class PowerEase; class ProgressEventArgs; class ProgressiveSource; +class Projection; class PropertyChangedEventArgs; class PulseSource; class QuadraticBezierSegment; @@ -318,6 +322,7 @@ class TriggerBase; class UIElement; class UIElementCollection; class UnmanagedMatrix; +class UnmanagedMatrix3D; class UserControl; class VideoBrush; class VideoStream; @@ -576,6 +581,8 @@ public: ManualTimeSource* AsManualTimeSource (Types *types = NULL) { checked_get_subclass (Type::MANUALTIMESOURCE, ManualTimeSource) } MarkerStream* AsMarkerStream (Types *types = NULL) { checked_get_subclass (Type::MARKERSTREAM, MarkerStream) } Matrix* AsMatrix (Types *types = NULL) { checked_get_subclass (Type::MATRIX, Matrix) } + Matrix3D* AsMatrix3D (Types *types = NULL) { checked_get_subclass (Type::MATRIX3D, Matrix3D) } + Matrix3DProjection* AsMatrix3DProjection (Types *types = NULL) { checked_get_subclass (Type::MATRIX3DPROJECTION, Matrix3DProjection) } MatrixTransform* AsMatrixTransform (Types *types = NULL) { checked_get_subclass (Type::MATRIXTRANSFORM, MatrixTransform) } Media* AsMedia (Types *types = NULL) { checked_get_subclass (Type::MEDIA, Media) } MediaAttribute* AsMediaAttribute (Types *types = NULL) { checked_get_subclass (Type::MEDIAATTRIBUTE, MediaAttribute) } @@ -624,6 +631,7 @@ public: PathSegment* AsPathSegment (Types *types = NULL) { checked_get_subclass (Type::PATHSEGMENT, PathSegment) } PathSegmentCollection* AsPathSegmentCollection (Types *types = NULL) { checked_get_subclass (Type::PATHSEGMENT_COLLECTION, PathSegmentCollection) } PixelShader* AsPixelShader (Types *types = NULL) { checked_get_subclass (Type::PIXELSHADER, PixelShader) } + PlaneProjection* AsPlaneProjection (Types *types = NULL) { checked_get_subclass (Type::PLANEPROJECTION, PlaneProjection) } Playlist* AsPlaylist (Types *types = NULL) { checked_get_subclass (Type::PLAYLIST, Playlist) } PlaylistEntry* AsPlaylistEntry (Types *types = NULL) { checked_get_subclass (Type::PLAYLISTENTRY, PlaylistEntry) } PlaylistRoot* AsPlaylistRoot (Types *types = NULL) { checked_get_subclass (Type::PLAYLISTROOT, PlaylistRoot) } @@ -641,6 +649,7 @@ public: PowerEase* AsPowerEase (Types *types = NULL) { checked_get_subclass (Type::POWEREASE, PowerEase) } ProgressEventArgs* AsProgressEventArgs (Types *types = NULL) { checked_get_subclass (Type::PROGRESSEVENTARGS, ProgressEventArgs) } ProgressiveSource* AsProgressiveSource (Types *types = NULL) { checked_get_subclass (Type::PROGRESSIVESOURCE, ProgressiveSource) } + Projection* AsProjection (Types *types = NULL) { checked_get_subclass (Type::PROJECTION, Projection) } PropertyChangedEventArgs* AsPropertyChangedEventArgs (Types *types = NULL) { checked_get_subclass (Type::PROPERTYCHANGEDEVENTARGS, PropertyChangedEventArgs) } PulseSource* AsPulseSource (Types *types = NULL) { checked_get_subclass (Type::PULSESOURCE, PulseSource) } QuadraticBezierSegment* AsQuadraticBezierSegment (Types *types = NULL) { checked_get_subclass (Type::QUADRATICBEZIERSEGMENT, QuadraticBezierSegment) } @@ -707,6 +716,7 @@ public: UIElement* AsUIElement (Types *types = NULL) { checked_get_subclass (Type::UIELEMENT, UIElement) } UIElementCollection* AsUIElementCollection (Types *types = NULL) { checked_get_subclass (Type::UIELEMENT_COLLECTION, UIElementCollection) } UnmanagedMatrix* AsUnmanagedMatrix (Types *types = NULL) { checked_get_subclass (Type::UNMANAGEDMATRIX, UnmanagedMatrix) } + UnmanagedMatrix3D* AsUnmanagedMatrix3D (Types *types = NULL) { checked_get_subclass (Type::UNMANAGEDMATRIX3D, UnmanagedMatrix3D) } UserControl* AsUserControl (Types *types = NULL) { checked_get_subclass (Type::USERCONTROL, UserControl) } VideoBrush* AsVideoBrush (Types *types = NULL) { checked_get_subclass (Type::VIDEOBRUSH, VideoBrush) } VideoStream* AsVideoStream (Types *types = NULL) { checked_get_subclass (Type::VIDEOSTREAM, VideoStream) } diff --git a/src/xaml.cpp b/src/xaml.cpp index 3bd0507bf..933a5c3ec 100644 --- a/src/xaml.cpp +++ b/src/xaml.cpp @@ -30,6 +30,7 @@ #include "animation.h" #include "bitmapimage.h" #include "geometry.h" +#include "projection.h" #include "textblock.h" #include "glyphs.h" #include "media.h" @@ -2787,6 +2788,47 @@ matrix_from_str (const char *str) return matrix; } +Matrix3D * +matrix3d_from_str (const char *str) +{ + if (!g_ascii_strcasecmp ("Identity", str)) { + return new Matrix3D (); + } + + DoubleCollection *values = DoubleCollection::FromStr (str); + Matrix3D *matrix; + + if (!values) + return new Matrix3D (); + + if (values->GetCount () < 12) { + values->unref (); + return NULL; + } + + matrix = new Matrix3D (); + matrix->SetM11 (values->GetValueAt (0)->AsDouble ()); + matrix->SetM12 (values->GetValueAt (1)->AsDouble ()); + matrix->SetM13 (values->GetValueAt (2)->AsDouble ()); + matrix->SetM13 (values->GetValueAt (3)->AsDouble ()); + matrix->SetM21 (values->GetValueAt (4)->AsDouble ()); + matrix->SetM22 (values->GetValueAt (5)->AsDouble ()); + matrix->SetM23 (values->GetValueAt (6)->AsDouble ()); + matrix->SetM24 (values->GetValueAt (7)->AsDouble ()); + matrix->SetM31 (values->GetValueAt (8)->AsDouble ()); + matrix->SetM32 (values->GetValueAt (9)->AsDouble ()); + matrix->SetM33 (values->GetValueAt (10)->AsDouble ()); + matrix->SetM34 (values->GetValueAt (11)->AsDouble ()); + matrix->SetOffsetX (values->GetValueAt (12)->AsDouble ()); + matrix->SetOffsetY (values->GetValueAt (13)->AsDouble ()); + matrix->SetOffsetZ (values->GetValueAt (14)->AsDouble ()); + matrix->SetM44 (values->GetValueAt (15)->AsDouble ()); + + values->unref (); + + return matrix; +} + bool grid_length_from_str (const char *str, GridLength *grid_length) { @@ -3721,6 +3763,44 @@ value_from_str_with_parser (XamlParserInfo *p, Type::Kind type, const char *prop matrix->unref (); break; } + case Type::PROJECTION: + + if (!g_ascii_strcasecmp ("Identity", str)) { + *v = NULL; + *v_set = true; + break; + } + + // Intentional fall through, you can create a matrix from a PROJECTION property, but not using Identity + case Type::MATRIX3DPROJECTION: + { + if (IS_NULL_OR_EMPTY(s)) + break; + + Matrix3D *mv = matrix3d_from_str (s); + if (!mv) + break; + + Matrix3DProjection *p = new Matrix3DProjection (); + p->SetValue (Matrix3DProjection::ProjectionMatrixProperty, Value (mv)); + + *v = new Value (p); + *v_set = true; + p->unref (); + mv->unref (); + break; + } + case Type::UNMANAGEDMATRIX3D: + case Type::MATRIX3D: { + Matrix3D *matrix = matrix3d_from_str (s); + if (!matrix) + break; + + *v = new Value (matrix); + *v_set = true; + matrix->unref (); + break; + } case Type::PATHGEOMETRY: case Type::GEOMETRY: { Geometry *geometry = geometry_from_str (s); diff --git a/tools/generators/Generator.cs b/tools/generators/Generator.cs index c6adcf914..4f04d8136 100644 --- a/tools/generators/Generator.cs +++ b/tools/generators/Generator.cs @@ -518,6 +518,7 @@ class Generator { text.AppendLine ("using System.Windows.Input;"); text.AppendLine ("using System.Windows.Markup;"); text.AppendLine ("using System.Windows.Media;"); + text.AppendLine ("using System.Windows.Media3D;"); text.AppendLine ("using System.Windows.Media.Animation;"); text.AppendLine ("using System.Windows.Shapes;"); text.AppendLine (); @@ -667,6 +668,7 @@ class Generator { text.AppendLine ("using System.Windows.Input;"); text.AppendLine ("using System.Windows.Markup;"); text.AppendLine ("using System.Windows.Media;"); + text.AppendLine ("using System.Windows.Media3D;"); text.AppendLine ("using System.Windows.Media.Animation;"); text.AppendLine ("using System.Windows.Media.Effects;"); text.AppendLine ("using System.Windows.Shapes;"); -- 2.11.4.GIT