From 69e2f3672553ce871a09675872e088d39dc46059 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Tue, 19 May 2015 20:09:04 +0100 Subject: [PATCH] Removed NO_SYSDRAWING in favour of just MINUMAL Reverted changes to GLControl.cs Updated sln to not build OpenTK.GLControl in MINIMAL mode --- OpenTK.sln | 11 ----- Source/GLControl/GLControl.cs | 2 - Source/OpenTK/INativeWindow.cs | 2 +- Source/OpenTK/Input/MouseEventArgs.cs | 2 +- Source/OpenTK/Math/Point.cs | 43 ------------------ Source/OpenTK/Math/Rectangle.cs | 45 +------------------ Source/OpenTK/Math/Size.cs | 42 ----------------- Source/OpenTK/Minimal.cs | 4 +- .../Platform/Linux/LinuxDisplayDriver.cs | 2 +- Source/OpenTK/Platform/Linux/LinuxInput.cs | 2 +- .../Platform/Linux/LinuxNativeWindow.cs | 2 +- Source/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs | 2 +- Source/OpenTK/Platform/MacOS/Cocoa/NSFloat.cs | 2 +- .../Platform/MacOS/CocoaNativeWindow.cs | 2 +- Source/OpenTK/Platform/NativeWindowBase.cs | 2 +- .../Platform/SDL2/Sdl2DisplayDeviceDriver.cs | 2 +- Source/OpenTK/Platform/SDL2/Sdl2Mouse.cs | 2 +- .../OpenTK/Platform/SDL2/Sdl2NativeWindow.cs | 2 +- Source/OpenTK/Platform/X11/Functions.cs | 2 +- 19 files changed, 16 insertions(+), 157 deletions(-) diff --git a/OpenTK.sln b/OpenTK.sln index a7ef0161..33299241 100644 --- a/OpenTK.sln +++ b/OpenTK.sln @@ -115,14 +115,12 @@ Global {62C0DB35-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {62C0DB35-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU {62C0DB35-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.ActiveCfg = Debug|Any CPU - {62C0DB35-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.Build.0 = Debug|Any CPU {62C0DB35-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU {62C0DB35-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU {62C0DB35-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU {62C0DB35-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU {62C0DB35-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU {62C0DB35-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU - {62C0DB35-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.Build.0 = ReleaseMinimal|Any CPU {650C6F3D-33B5-4216-9536-956AB42C0624}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {650C6F3D-33B5-4216-9536-956AB42C0624}.DebugMinimal|Any CPU.ActiveCfg = DebugMinimal|Any CPU {650C6F3D-33B5-4216-9536-956AB42C0624}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU @@ -144,14 +142,12 @@ Global {868E37B3-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {868E37B3-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU {868E37B3-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.ActiveCfg = Debug|Any CPU - {868E37B3-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.Build.0 = Debug|Any CPU {868E37B3-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU {868E37B3-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU {868E37B3-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU {868E37B3-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU {868E37B3-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU {868E37B3-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU - {868E37B3-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.Build.0 = ReleaseMinimal|Any CPU {A37A7E14-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A37A7E14-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU {A37A7E14-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.ActiveCfg = DebugMinimal|Any CPU @@ -166,14 +162,12 @@ Global {A625BE88-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A625BE88-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU {A625BE88-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.ActiveCfg = Debug|Any CPU - {A625BE88-0000-0000-0000-000000000000}.DebugMinimal|Any CPU.Build.0 = Debug|Any CPU {A625BE88-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU {A625BE88-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU {A625BE88-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU {A625BE88-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU {A625BE88-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU {A625BE88-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU - {A625BE88-0000-0000-0000-000000000000}.ReleaseMinimal|Any CPU.Build.0 = ReleaseMinimal|Any CPU {ADC34399-7613-44D2-90B2-19250F06FE7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ADC34399-7613-44D2-90B2-19250F06FE7A}.DebugMinimal|Any CPU.ActiveCfg = DebugMinimal|Any CPU {ADC34399-7613-44D2-90B2-19250F06FE7A}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU @@ -209,7 +203,6 @@ Global {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Debug|Any CPU.Build.0 = Debug|Any CPU {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.DebugMinimal|Any CPU.ActiveCfg = Debug|Any CPU - {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.DebugMinimal|Any CPU.Build.0 = Debug|Any CPU {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Documentation|Any CPU.ActiveCfg = Debug|Any CPU {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Documentation|Any CPU.Build.0 = Debug|Any CPU {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Nsis|Any CPU.ActiveCfg = Release|Any CPU @@ -217,12 +210,8 @@ Global {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Release|Any CPU.ActiveCfg = Release|Any CPU {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Release|Any CPU.Build.0 = Release|Any CPU {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.ReleaseMinimal|Any CPU.ActiveCfg = ReleaseMinimal|Any CPU - {C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.ReleaseMinimal|Any CPU.Build.0 = ReleaseMinimal|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution - StartupItem = Source\Examples\OpenTK.Examples.csproj - EndGlobalSection EndGlobal diff --git a/Source/GLControl/GLControl.cs b/Source/GLControl/GLControl.cs index b5073312..ecf5e947 100644 --- a/Source/GLControl/GLControl.cs +++ b/Source/GLControl/GLControl.cs @@ -500,7 +500,6 @@ namespace OpenTK ValidateContext("GrabScreenshot()"); Bitmap bmp = new Bitmap(this.ClientSize.Width, this.ClientSize.Height); - /* System.Drawing.Imaging.BitmapData data = bmp.LockBits(this.ClientRectangle, System.Drawing.Imaging.ImageLockMode.WriteOnly, System.Drawing.Imaging.PixelFormat.Format24bppRgb); @@ -508,7 +507,6 @@ namespace OpenTK data.Scan0); bmp.UnlockBits(data); bmp.RotateFlip(RotateFlipType.RotateNoneFlipY); -*/ return bmp; } diff --git a/Source/OpenTK/INativeWindow.cs b/Source/OpenTK/INativeWindow.cs index 765ba672..2e915da4 100644 --- a/Source/OpenTK/INativeWindow.cs +++ b/Source/OpenTK/INativeWindow.cs @@ -28,7 +28,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; -#if !NO_SYSDRAWING +#if !MINIMAL using System.Drawing; #endif using System.Text; diff --git a/Source/OpenTK/Input/MouseEventArgs.cs b/Source/OpenTK/Input/MouseEventArgs.cs index 274d05df..9fd96810 100644 --- a/Source/OpenTK/Input/MouseEventArgs.cs +++ b/Source/OpenTK/Input/MouseEventArgs.cs @@ -28,7 +28,7 @@ #endregion using System; -#if !NO_SYSDRAWING +#if !MINIMAL using System.Drawing; #endif diff --git a/Source/OpenTK/Math/Point.cs b/Source/OpenTK/Math/Point.cs index 682bd02d..dff7c67d 100644 --- a/Source/OpenTK/Math/Point.cs +++ b/Source/OpenTK/Math/Point.cs @@ -142,49 +142,6 @@ namespace OpenTK return !left.Equals(right); } -#if !NO_SYSDRAWING - /// - /// Converts an OpenTK.Point instance to a System.Drawing.Point. - /// - /// - /// The instance to convert. - /// - /// - /// A instance equivalent to point. - /// - public static implicit operator System.Drawing.Point(Point point) - { - return new System.Drawing.Point(point.X, point.Y); - } - - /// - /// Converts a System.Drawing.Point instance to an OpenTK.Point. - /// - /// - /// The instance to convert. - /// - /// - /// A instance equivalent to point. - /// - public static implicit operator Point(System.Drawing.Point point) - { - return new Point(point.X, point.Y); - } - - /// - /// Converts an OpenTK.Point instance to a System.Drawing.PointF. - /// - /// - /// The instance to convert. - /// - /// - /// A instance equivalent to point. - /// - public static implicit operator System.Drawing.PointF(Point point) - { - return new System.Drawing.PointF(point.X, point.Y); - } -#endif /// /// Indicates whether this instance is equal to the specified object. /// diff --git a/Source/OpenTK/Math/Rectangle.cs b/Source/OpenTK/Math/Rectangle.cs index afc4269b..f7d73302 100644 --- a/Source/OpenTK/Math/Rectangle.cs +++ b/Source/OpenTK/Math/Rectangle.cs @@ -31,7 +31,7 @@ using System.Text; namespace OpenTK { -#if MINIMAL + #if MINIMAL /// /// Represents a rectangular region on a two-dimensional plane. /// @@ -257,49 +257,6 @@ namespace OpenTK return new Rectangle(x1, y1, x2 - x1, y2 - y1); } -#if !NO_SYSDRAWING - /// - /// Converts an OpenTK.Rectangle instance to a System.Drawing.Rectangle. - /// - /// - /// The instance to convert. - /// - /// - /// A instance equivalent to rect. - /// - public static implicit operator System.Drawing.Rectangle(Rectangle rect) - { - return new System.Drawing.Rectangle(rect.Location, rect.Size); - } - - /// - /// Converts a System.Drawing.Rectangle instance to an OpenTK.Rectangle. - /// - /// - /// The instance to convert. - /// - /// - /// A instance equivalent to point. - /// - public static implicit operator Rectangle(System.Drawing.Rectangle rect) - { - return new Rectangle(rect.Location, rect.Size); - } - - /// - /// Converts an OpenTK.Rectangle instance to a System.Drawing.RectangleF. - /// - /// - /// The instance to convert. - /// - /// - /// A instance equivalent to rect. - /// - public static implicit operator System.Drawing.RectangleF(Rectangle rect) - { - return new System.Drawing.RectangleF(rect.Location, rect.Size); - } -#endif /// /// Indicates whether this instance is equal to the specified object. /// diff --git a/Source/OpenTK/Math/Size.cs b/Source/OpenTK/Math/Size.cs index ca552449..014ec765 100644 --- a/Source/OpenTK/Math/Size.cs +++ b/Source/OpenTK/Math/Size.cs @@ -128,49 +128,7 @@ namespace OpenTK { return !left.Equals(right); } -#if !NO_SYSDRAWING - /// - /// Converts an OpenTK.Size instance to a System.Drawing.Size. - /// - /// - /// The instance to convert. - /// - /// - /// A instance equivalent to size. - /// - public static implicit operator System.Drawing.Size(Size size) -{ - return new System.Drawing.Size(size.Width, size.Height); - } - /// - /// Converts a System.Drawing.Size instance to an OpenTK.Size. - /// - /// - /// The instance to convert. - /// - /// - /// A instance equivalent to size. - /// - public static implicit operator Size(System.Drawing.Size size) - { - return new Size(size.Width, size.Height); - } - - /// - /// Converts an OpenTK.Point instance to a System.Drawing.SizeF. - /// - /// - /// The instance to convert. - /// - /// - /// A instance equivalent to size. - /// - public static implicit operator System.Drawing.SizeF(Size size) - { - return new System.Drawing.SizeF(size.Width, size.Height); - } -#endif /// /// Indicates whether this instance is equal to the specified object. /// diff --git a/Source/OpenTK/Minimal.cs b/Source/OpenTK/Minimal.cs index 7ef93022..1bc9ea33 100644 --- a/Source/OpenTK/Minimal.cs +++ b/Source/OpenTK/Minimal.cs @@ -1,6 +1,6 @@ using System; using System.Collections.Generic; -#if !NO_SYSDRAWING +#if !MINIMAL using System.Drawing; #endif using System.Text; @@ -706,7 +706,7 @@ namespace OpenTK public void Dispose() { } - internal static Icon ExtractAssociatedIcon (string location) + public static Icon ExtractAssociatedIcon (string location) { return null; } diff --git a/Source/OpenTK/Platform/Linux/LinuxDisplayDriver.cs b/Source/OpenTK/Platform/Linux/LinuxDisplayDriver.cs index 459b8ac7..0a861d3d 100644 --- a/Source/OpenTK/Platform/Linux/LinuxDisplayDriver.cs +++ b/Source/OpenTK/Platform/Linux/LinuxDisplayDriver.cs @@ -32,7 +32,7 @@ using System.Collections.Generic; using System.Diagnostics; using OpenTK; using OpenTK.Graphics; -#if !NO_SYSDRAWING +#if !MINIMAL using System.Drawing; #endif diff --git a/Source/OpenTK/Platform/Linux/LinuxInput.cs b/Source/OpenTK/Platform/Linux/LinuxInput.cs index a88d48a0..8b7a02ee 100644 --- a/Source/OpenTK/Platform/Linux/LinuxInput.cs +++ b/Source/OpenTK/Platform/Linux/LinuxInput.cs @@ -30,7 +30,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -#if !NO_SYSDRAWING +#if !MINIMAL using System.Drawing; #endif using System.Runtime.InteropServices; diff --git a/Source/OpenTK/Platform/Linux/LinuxNativeWindow.cs b/Source/OpenTK/Platform/Linux/LinuxNativeWindow.cs index b00cfad7..81c20a53 100644 --- a/Source/OpenTK/Platform/Linux/LinuxNativeWindow.cs +++ b/Source/OpenTK/Platform/Linux/LinuxNativeWindow.cs @@ -29,7 +29,7 @@ using System; using System.Diagnostics; -#if !NO_SYSDRAWING +#if !MINIMAL using System.Drawing; #endif using System.Runtime.InteropServices; diff --git a/Source/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs b/Source/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs index 93810dc0..b2b9d285 100644 --- a/Source/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs +++ b/Source/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs @@ -29,7 +29,7 @@ using System.Runtime.InteropServices; using System; -#if !NO_SYSDRAWING +#if !MINIMAL using System.Drawing; using System.Drawing.Imaging; #endif diff --git a/Source/OpenTK/Platform/MacOS/Cocoa/NSFloat.cs b/Source/OpenTK/Platform/MacOS/Cocoa/NSFloat.cs index d702fd04..09c7fa39 100644 --- a/Source/OpenTK/Platform/MacOS/Cocoa/NSFloat.cs +++ b/Source/OpenTK/Platform/MacOS/Cocoa/NSFloat.cs @@ -28,7 +28,7 @@ #endregion using System; -#if !NO_SYSDRAWING +#if !MINIMAL using System.Drawing; #endif using System.Runtime.InteropServices; diff --git a/Source/OpenTK/Platform/MacOS/CocoaNativeWindow.cs b/Source/OpenTK/Platform/MacOS/CocoaNativeWindow.cs index d0f824ab..0795e1cb 100644 --- a/Source/OpenTK/Platform/MacOS/CocoaNativeWindow.cs +++ b/Source/OpenTK/Platform/MacOS/CocoaNativeWindow.cs @@ -30,7 +30,7 @@ using System; using System.ComponentModel; using System.Diagnostics; -#if !NO_SYSDRAWING +#if !MINIMAL using System.Drawing; #endif using System.Runtime.InteropServices; diff --git a/Source/OpenTK/Platform/NativeWindowBase.cs b/Source/OpenTK/Platform/NativeWindowBase.cs index 071c1fca..8e1a7ef2 100644 --- a/Source/OpenTK/Platform/NativeWindowBase.cs +++ b/Source/OpenTK/Platform/NativeWindowBase.cs @@ -30,7 +30,7 @@ using System; using System.ComponentModel; using System.Diagnostics; -#if !NO_SYSDRAWING +#if !MINIMAL using System.Drawing; #endif using OpenTK.Input; diff --git a/Source/OpenTK/Platform/SDL2/Sdl2DisplayDeviceDriver.cs b/Source/OpenTK/Platform/SDL2/Sdl2DisplayDeviceDriver.cs index 94500bb8..4216781c 100644 --- a/Source/OpenTK/Platform/SDL2/Sdl2DisplayDeviceDriver.cs +++ b/Source/OpenTK/Platform/SDL2/Sdl2DisplayDeviceDriver.cs @@ -28,7 +28,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -#if !NO_SYSDRAWING +#if !MINIMAL using System.Drawing; #endif diff --git a/Source/OpenTK/Platform/SDL2/Sdl2Mouse.cs b/Source/OpenTK/Platform/SDL2/Sdl2Mouse.cs index 9fbf5f84..cbccd7eb 100644 --- a/Source/OpenTK/Platform/SDL2/Sdl2Mouse.cs +++ b/Source/OpenTK/Platform/SDL2/Sdl2Mouse.cs @@ -28,7 +28,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -#if !NO_SYSDRAWING +#if !MINIMAL using System.Drawing; #endif using OpenTK.Input; diff --git a/Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs b/Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs index f19ed6e2..14bb2dc9 100644 --- a/Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs +++ b/Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs @@ -28,7 +28,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -#if !NO_SYSDRAWING +#if !MINIMAL using System.Drawing; #endif #if ANDROID || IPHONE || MINIMAL diff --git a/Source/OpenTK/Platform/X11/Functions.cs b/Source/OpenTK/Platform/X11/Functions.cs index dffaf349..3b10cf4d 100644 --- a/Source/OpenTK/Platform/X11/Functions.cs +++ b/Source/OpenTK/Platform/X11/Functions.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -#if !NO_SYSDRAWING +#if !MINIMAL using System.Drawing; #endif #if ANDROID || IPHONE || MINIMAL