using System.Runtime.InteropServices; using ManagedWinapi.Windows; namespace Ninjacrab.PersistentWindows.Common.WinApiBridge { [StructLayout(LayoutKind.Sequential)] public struct WindowPlacement { /// /// The length of the structure, in bytes. Before calling the GetWindowPlacement or SetWindowPlacement functions, set this member to sizeof(WINDOWPLACEMENT). /// /// GetWindowPlacement and SetWindowPlacement fail if this member is not set correctly. /// /// public int Length; /// /// Specifies flags that control the position of the minimized window and the method by which the window is restored. /// public int Flags; /// /// The current show state of the window. /// public ShowWindowCommands ShowCmd; /// /// The coordinates of the window's upper-left corner when the window is minimized. /// public POINT MinPosition; /// /// The coordinates of the window's upper-left corner when the window is maximized. /// public POINT MaxPosition; /// /// The window's coordinates when the window is in the restored position. /// public RECT NormalPosition; /// /// Gets the default (empty) value. /// public static WindowPlacement Default { get { WindowPlacement result = new WindowPlacement(); result.Length = Marshal.SizeOf(result); return result; } } } }