using System.Runtime.InteropServices;
namespace Vanara.PInvoke
{
public static partial class UxTheme
{
/// Must be called on a window to use the UpdatePanningFeedback method for boundary feedback.
/// A handle to the window that will have boundary feedback on it.
/// Indicates whether the function was successful.
// BOOL WINAPI BeginPanningFeedback(_In_ HWND hwnd); https://msdn.microsoft.com/en-us/library/windows/desktop/dd317331(v=vs.85).aspx
[DllImport(Lib.UxTheme, SetLastError = false, ExactSpelling = true)]
[PInvokeData("Uxtheme.h", MSDNShortId = "dd317331", MinClient = PInvokeClient.Windows7)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool BeginPanningFeedback(HWND hwnd);
/// Initializes the window position information for window panning.
/// A handle to the window to end boundary feedback on.
/// Indicates whether the window positioning reset should incorporate a smooth animation.
/// Indicates whether the function succeeded. Returns TRUE on success; otherwise, returns FALSE.
// BOOL WINAPI EndPanningFeedback( _In_ HWND hwnd, BOOL fAnimateBack); https://msdn.microsoft.com/en-us/library/windows/desktop/dd317327(v=vs.85).aspx
[DllImport(Lib.UxTheme, SetLastError = false, ExactSpelling = true)]
[PInvokeData("Uxtheme.h", MSDNShortId = "dd317327", MinClient = PInvokeClient.Windows7)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool EndPanningFeedback(HWND hwnd, [MarshalAs(UnmanagedType.Bool)] bool fAnimateBack);
/// Triggers repositioning on a window's position when a user pans past a boundary.
/// A handle to the window that will have boundary feedback on it.
/// Indicates how far past the horizontal end of the pannable region the pan has gone.
/// Indicates how far past the vertical end of the pannable region the pan has gone.
/// A flag indicating whether the boundary feedback incorporates inertia.
///
/// If the function succeeds, the return value is nonzero.
/// If the function fails, the return value is zero. To get extended error information, use the GetLastError function.
///
// BOOL WINAPI UpdatePanningFeedback( _In_ HWND hwnd, _In_ LONG lTotalOverpanOffsetX, _In_ LONG lTotalOverpanOffsetY, _In_ BOOL
// fInInertia); https://msdn.microsoft.com/en-us/library/windows/desktop/dd317336(v=vs.85).aspx
[DllImport(Lib.UxTheme, SetLastError = true, ExactSpelling = true)]
[PInvokeData("Uxtheme.h", MSDNShortId = "dd317336", MinClient = PInvokeClient.Windows7)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool UpdatePanningFeedback(HWND hwnd, int lTotalOverpanOffsetX, int lTotalOverpanOffsetY, [MarshalAs(UnmanagedType.Bool)] bool fInInertia);
}
}