//
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005 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
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
using System.IO;
using System.Drawing.Imaging;
using System.Runtime.Serialization;
using System.Runtime.InteropServices;
using System.ComponentModel;
+using System.Security.Permissions;
namespace System.Drawing
{
}
[EditorBrowsable (EditorBrowsableState.Advanced)]
+ [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
public IntPtr GetHbitmap ()
{
return GetHbitmap(Color.Gray);
}
[EditorBrowsable (EditorBrowsableState.Advanced)]
+ [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
public IntPtr GetHbitmap (Color background)
{
IntPtr HandleBmp;
}
[EditorBrowsable (EditorBrowsableState.Advanced)]
+ [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
public IntPtr GetHicon ()
{
IntPtr HandleIcon;
+2005-09-16 Sebastien Pouliot <sebastien@ximian.com>
+
+ * gdipFunctions.cs: Add [SuppressUnmanagedCodeSecurity] attributes so
+ the JIT won't add demands for UnmanagedCode.
+ * carbonFunctions.cs: Add [SuppressUnmanagedCodeSecurity] attributes
+ so the JIT won't add demands for UnmanagedCode on Mac OSX.
+ * Bitmap.cs: Added LinkDemand for UnmanagedCode on GetHbitmap
+ (+ overloads) and GetHicon methods.
+ * Graphics.cs: Added LinkDemand for UnmanagedCode on FromHdcInternal,
+ FromHwndInternal and ReleaseHdcInternal methods (which are all public
+ despite their names).
+
2005-09-15 Konstantin Triger <kostat@mainsoft.com>
* Graphics.jvm.cs: text transform, headless session
//
// Copyright (C) 2003 Ximian, Inc. (http://www.ximian.com)
//
-// Copyright (C) 2004 Novell, Inc. (http://www.novell.com)
+// Copyright (C) 2004-2005 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
// 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 System;
+
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Drawing.Text;
using System.ComponentModel;
using System.Runtime.InteropServices;
+using System.Security.Permissions;
using System.Text;
namespace System.Drawing
}
[EditorBrowsable (EditorBrowsableState.Advanced)]
+ [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
public static Graphics FromHdcInternal (IntPtr hdc)
{
GDIPlus.Display = hdc;
}
[EditorBrowsable (EditorBrowsableState.Advanced)]
+ [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
public static Graphics FromHwndInternal (IntPtr hwnd)
{
return FromHwnd (hwnd);
[MonoTODO]
[EditorBrowsable (EditorBrowsableState.Advanced)]
+ [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
public void ReleaseHdcInternal (IntPtr hdc)
{
throw new NotImplementedException ();
//
using System.Runtime.InteropServices;
+using System.Security;
namespace System.Drawing {
+
+ [SuppressUnmanagedCodeSecurity]
internal class Carbon {
internal static CarbonContext GetCGContextForNSView (IntPtr hwnd) {
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Drawing.Text;
+using System.Security;
#if NET_2_0
using System.Runtime.InteropServices.ComTypes;
#else
/// <summary>
/// GDI+ API Functions
/// </summary>
+ [SuppressUnmanagedCodeSecurity]
internal class GDIPlus
{
public const int FACESIZE = 32;