using System;
///
/// Copyright © 2003-2008 JetBrains s.r.o.
/// You may distribute under the terms of the GNU General Public License, as published by the Free Software Foundation, version 2 (see License.txt in the repository root folder).
///
namespace JetBrains.UI.Interop
{
///
/// Contains several interop helper functions
///
public static class Helpers
{
///
/// Performs all the checks of the function, but does not actually apply the effect.
/// Allows to tell with a high probability whether the function will succeed.
///
public static bool CanGlassify(IntPtr handle)
{
if(handle == IntPtr.Zero)
throw new ArgumentNullException("handle");
// Is the glass effect available?
if(!((Environment.OSVersion.Platform == PlatformID.Win32NT) && (Environment.OSVersion.Version >= new Version(6, 0)) && (Win32Declarations.DwmIsCompositionEnabled())))
return false;
return true;
}
}
}