Re-added WindowHandle property

There are projects that use reflection to access
*WindowInfo.WindowHandle directly. This change ensures we don't break
them.
This commit is contained in:
Stefanos A. 2013-11-13 18:25:49 +01:00
parent 4fd5cc30d5
commit f9fdddea64
3 changed files with 16 additions and 1 deletions

View file

@ -70,6 +70,7 @@ namespace OpenTK.Platform.MacOS
public IntPtr Handle
{
get { return this.windowRef; }
set { this.windowRef = value; }
}
internal bool GoFullScreenHack
@ -83,7 +84,6 @@ namespace OpenTK.Platform.MacOS
set { goWindowedHack = value; }
}
/// <summary>
/// Gets a value indicating whether this instance refers to a System.Windows.Forms.Control.
/// </summary>
@ -99,6 +99,11 @@ namespace OpenTK.Platform.MacOS
return String.Format("MacOS.CarbonWindowInfo: Handle {0}", this.Handle);
}
// For compatibility with whoever thought it would be
// a good idea to access internal APIs through reflection
// (e.g. MonoGame)
public IntPtr WindowHandle { get { return Handle; } set { Handle = value; } }
#endregion
#region IDisposable Members

View file

@ -89,6 +89,11 @@ namespace OpenTK.Platform.Windows
}
}
// For compatibility with whoever thought it would be
// a good idea to access internal APIs through reflection
// (e.g. MonoGame)
public IntPtr WindowHandle { get { return Handle; } set { Handle = value; } }
#region public override string ToString()
/// <summary>Returns a System.String that represents the current window.</summary>

View file

@ -91,6 +91,11 @@ namespace OpenTK.Platform.X11
/// <summary>Gets or sets the X11 EventMask.</summary>
public EventMask EventMask { get { return eventMask; } set { eventMask = value; } }
// For compatibility with whoever thought it would be
// a good idea to access internal APIs through reflection
// (e.g. MonoGame)
public IntPtr WindowHandle { get { return Handle; } set { Handle = value; } }
#endregion
#region --- IDisposable Members ---