From: Rolf Bjarne Kvinge Date: Fri, 20 Nov 2015 11:20:01 +0000 (+0100) Subject: [System.Drawing] Add ifdefs to source code used by Xamarin.iOS/Mac to make it compile... X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=2ade2231b4d4d6e3142aedb585d13b26b45f8469 [System.Drawing] Add ifdefs to source code used by Xamarin.iOS/Mac to make it compile there. --- diff --git a/mcs/class/System.Drawing/System.Drawing/Color.cs b/mcs/class/System.Drawing/System.Drawing/Color.cs index df8cc18a6f8..6e72b0ecb69 100644 --- a/mcs/class/System.Drawing/System.Drawing/Color.cs +++ b/mcs/class/System.Drawing/System.Drawing/Color.cs @@ -38,8 +38,10 @@ using System.Runtime.InteropServices; namespace System.Drawing { +#if !MONOTOUCH && !MONOMAC [TypeConverter(typeof(ColorConverter))] [Editor ("System.Drawing.Design.ColorEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))] +#endif [Serializable] public struct Color { diff --git a/mcs/class/System.Drawing/System.Drawing/KnownColors.cs b/mcs/class/System.Drawing/System.Drawing/KnownColors.cs index 46fda2a4243..0440d8e3059 100644 --- a/mcs/class/System.Drawing/System.Drawing/KnownColors.cs +++ b/mcs/class/System.Drawing/System.Drawing/KnownColors.cs @@ -210,6 +210,7 @@ namespace System.Drawing { 0xFF316AC5, /* 174 - MenuHighlight */ }; +#if !MONOTOUCH && !MONOMAC static KnownColors () { if (GDIPlus.RunningOnWindows ()) { @@ -264,6 +265,7 @@ namespace System.Drawing { ArgbValues [(int)KnownColor.MenuBar] = GetSysColor (GetSysColorIndex.COLOR_MENUBAR); ArgbValues [(int)KnownColor.MenuHighlight] = GetSysColor (GetSysColorIndex.COLOR_MENUHIGHLIGHT); } +#endif public static Color FromKnownColor (KnownColor kc) { diff --git a/mcs/class/System.Drawing/System.Drawing/Point.cs b/mcs/class/System.Drawing/System.Drawing/Point.cs index 4737c4f1d45..88a8390b564 100644 --- a/mcs/class/System.Drawing/System.Drawing/Point.cs +++ b/mcs/class/System.Drawing/System.Drawing/Point.cs @@ -40,7 +40,9 @@ namespace System.Drawing { [Serializable] [ComVisible (true)] +#if !MONOTOUCH && !MONOMAC [TypeConverter (typeof (PointConverter))] +#endif public struct Point { // Private x and y coordinate fields. diff --git a/mcs/class/System.Drawing/System.Drawing/Rectangle.cs b/mcs/class/System.Drawing/System.Drawing/Rectangle.cs index c8b3f6c7282..c2ffbc80e5e 100644 --- a/mcs/class/System.Drawing/System.Drawing/Rectangle.cs +++ b/mcs/class/System.Drawing/System.Drawing/Rectangle.cs @@ -39,7 +39,9 @@ namespace System.Drawing { [Serializable] [ComVisible (true)] +#if !MONOTOUCH && !MONOMAC [TypeConverter (typeof (RectangleConverter))] +#endif public struct Rectangle { private int x, y, width, height; diff --git a/mcs/class/System.Drawing/System.Drawing/Size.cs b/mcs/class/System.Drawing/System.Drawing/Size.cs index 6e78072aa7d..be8fda0ea8e 100644 --- a/mcs/class/System.Drawing/System.Drawing/Size.cs +++ b/mcs/class/System.Drawing/System.Drawing/Size.cs @@ -40,7 +40,9 @@ namespace System.Drawing { [Serializable] [ComVisible (true)] +#if !MONOTOUCH && !MONOMAC [TypeConverter (typeof (SizeConverter))] +#endif public struct Size { diff --git a/mcs/class/System.Drawing/System.Drawing/SizeF.cs b/mcs/class/System.Drawing/System.Drawing/SizeF.cs index 4c1c87f29aa..38714d1c996 100644 --- a/mcs/class/System.Drawing/System.Drawing/SizeF.cs +++ b/mcs/class/System.Drawing/System.Drawing/SizeF.cs @@ -40,7 +40,9 @@ namespace System.Drawing { [Serializable] [ComVisible (true)] +#if !MONOTOUCH && !MONOMAC [TypeConverter (typeof (SizeFConverter))] +#endif public struct SizeF { // Private height and width fields.