From 69a1168f3d91552539f00f061c1d28b34c29ff28 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Thu, 24 Jan 2008 21:18:23 +0000 Subject: [PATCH] Public X11 classes made internal. --- Source/OpenTK/GLControl.cs | 2 +- Source/OpenTK/Platform/WindowInfo.cs | 16 ++++++++-------- Source/OpenTK/Platform/X11/Functions.cs | 2 +- Source/OpenTK/Platform/X11/WindowInfo.cs | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Source/OpenTK/GLControl.cs b/Source/OpenTK/GLControl.cs index 1feae21c..73fb1d39 100644 --- a/Source/OpenTK/GLControl.cs +++ b/Source/OpenTK/GLControl.cs @@ -272,7 +272,7 @@ namespace OpenTK public X11PlatformIdle(WindowInfo info) { - display = ((OpenTK.Platform.X11.WindowInfo)info).Display; + display = new OpenTK.Platform.X11.WindowInfo(info).Display;//((OpenTK.Platform.X11.WindowInfo)info).Display; } #region IPlatformIdle Members diff --git a/Source/OpenTK/Platform/WindowInfo.cs b/Source/OpenTK/Platform/WindowInfo.cs index 3652f5b9..fccaa528 100644 --- a/Source/OpenTK/Platform/WindowInfo.cs +++ b/Source/OpenTK/Platform/WindowInfo.cs @@ -137,15 +137,15 @@ namespace OpenTK.Platform implementation.CopyInfoFrom(info); } - public static explicit operator Windows.WindowInfo(WindowInfo info) - { - return (Windows.WindowInfo)info.implementation; - } + //public static explicit operator Windows.WindowInfo(WindowInfo info) + //{ + // return (Windows.WindowInfo)info.implementation; + //} - public static explicit operator X11.WindowInfo(WindowInfo info) - { - return (X11.WindowInfo)info.implementation; - } + //public static explicit operator X11.WindowInfo(WindowInfo info) + //{ + // return (X11.WindowInfo)info.implementation; + //} #endregion } diff --git a/Source/OpenTK/Platform/X11/Functions.cs b/Source/OpenTK/Platform/X11/Functions.cs index 7ccd0932..f8906940 100644 --- a/Source/OpenTK/Platform/X11/Functions.cs +++ b/Source/OpenTK/Platform/X11/Functions.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; namespace OpenTK.Platform.X11 { - public static partial class Functions + internal static partial class Functions { [DllImport("libX11", EntryPoint = "XOpenDisplay")] public extern static IntPtr XOpenDisplay(IntPtr display); diff --git a/Source/OpenTK/Platform/X11/WindowInfo.cs b/Source/OpenTK/Platform/X11/WindowInfo.cs index 8463116d..7d2fb4c1 100644 --- a/Source/OpenTK/Platform/X11/WindowInfo.cs +++ b/Source/OpenTK/Platform/X11/WindowInfo.cs @@ -15,7 +15,7 @@ namespace OpenTK.Platform.X11 /// Describes a Windows.Form.Control, Windows.Forms.NativeWindow or OpenTK.GameWindow on the X11 platform. /// This class supports OpenTK, and is not intended for use by OpenTK programs. /// - public sealed class WindowInfo : IMutableWindowInfo + internal sealed class WindowInfo : IMutableWindowInfo { private IntPtr handle, topLevelWindow; private IntPtr rootWindow, display; @@ -117,7 +117,7 @@ namespace OpenTK.Platform.X11 // X11.WindowInfo winfo = info as X11.WindowInfo ?? (X11.WindowInfo)(info as Platform.WindowInfo); X11.WindowInfo winfo = info as X11.WindowInfo; if (winfo == null) - winfo = (X11.WindowInfo)(info as Platform.WindowInfo); + winfo = new WindowInfo(info);//(X11.WindowInfo)(info as Platform.WindowInfo); this.RootWindow = winfo.RootWindow; this.TopLevelWindow = winfo.TopLevelWindow;