#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member

// most documentation obtained from Microsoft Docs
using System;

namespace Volpe.Cafe.Utils.Win32Native
{
    /// <summary>
    /// Identifies dots per inch (DPI) awareness values. DPI awareness indicates how much scaling work an application
    /// performs for DPI versus how much is done by the system.
    /// </summary>
    [Serializable]
    public enum ProcessDpiAwareness
    {
        /// <summary>
        /// DPI awareness has not been initialized for the application.
        /// </summary>
        DpiUninitialized = -1,

        /// <summary>
        /// DPI unaware. This app does not scale for DPI changes and is always assumed to have a scale factor of 100%
        /// (96 DPI). It will be automatically scaled by the system on any other DPI setting.
        /// </summary>
        DpiUnaware = 0,

        /// <summary>
        /// System DPI aware. This app does not scale for DPI changes. It will query for the DPI once and use that
        /// value for the lifetime of the app. If the DPI changes, the app will not adjust to the new DPI value. It
        /// will be automatically scaled up or down by the system when the DPI changes from the system value.
        /// </summary>
        SystemDpiAware = 1,

        /// <summary>
        /// Per monitor DPI aware. This app checks for the DPI when it is created and adjusts the scale factor whenever
        /// the DPI changes. These applications are not automatically scaled by the system.
        /// </summary>
        PerMonitorDpiAware = 2
    }

    /// <summary>
    /// Flags associated with a specific file system.
    /// </summary>
    [Serializable]
    [Flags]
    public enum FileSystemFeature
    {
        /// <summary>
        /// The specified volume supports case-sensitive file names.
        /// </summary>
        CaseSensitiveSearch = 0x1,
        /// <summary>
        /// The specified volume supports preserved case of file names when it places a name on disk.
        /// </summary>
        CasePreservedNames = 0x2,
        /// <summary>
        /// The specified volume supports Unicode in file names as they appear on disk.
        /// </summary>
        UnicodeOnDisk = 0x4,
        /// <summary>
        /// The specified volume preserves and enforces access control lists (ACL). For example, the NTFS file system
        /// preserves and enforces ACLs, and the FAT file system does not.
        /// </summary>
        PersistentACLs = 0x8,
        /// <summary>
        /// The specified volume supports file-based compression.
        /// </summary>
        FileCompression = 0x10,
        /// <summary>
        /// The specified volume supports disk quotas.
        /// </summary>
        VolumeQuotas = 0x20,
        /// <summary>
        /// The specified volume supports sparse files.
        /// </summary>
        SupportsSparseFiles = 0x40,
        /// <summary>
        /// The specified volume supports re-parse points.
        /// </summary>
        SupportsReparsePoints = 0x80,
        /// <summary>
        /// The specified volume is a compressed volume, for example, a DoubleSpace volume.
        /// </summary>
        VolumeIsCompressed = 0x8000,
        /// <summary>
        /// The specified volume supports object identifiers.
        /// </summary>
        SupportsObjectIDs = 0x10000,
        /// <summary>
        /// The specified volume supports the Encrypted File System (EFS).
        /// </summary>
        SupportsEncryption = 0x20000,
        /// <summary>
        /// The specified volume supports named streams.
        /// </summary>
        NamedStreams = 0x40000,
        /// <summary>
        /// The specified volume is read-only.
        /// </summary>
        ReadOnlyVolume = 0x80000,
        /// <summary>
        /// The specified volume supports a single sequential write.
        /// </summary>
        SequentialWriteOnce = 0x100000,
        /// <summary>
        /// The specified volume supports transactions.
        /// </summary>
        SupportsTransactions = 0x200000,
        /// <summary>
        /// The specified volume supports hard links. This value is not supported until Windows Server 2008 R2 and
        /// Windows 7.
        /// </summary>
        SupportsHardLinks = 0x400000,
        /// <summary>
        /// The specified volume supports extended attributes. An extended attribute is a piece of application-specific
        /// metadata that an application can associate with a file and is not part of the file's data. This value is
        /// not supported until Windows Server 2008 R2 and Windows 7.
        /// </summary>
        SupportsExtendedAttributes = 0x800000,
        /// <summary>
        /// The file system supports open by FileID. This value is not supported until Windows Server 2008 R2 and
        /// Windows 7.
        /// </summary>
        SupportsOpenByFileID = 0x1000000,
        /// <summary>
        /// The specified volume supports update sequence number (USN) journals. This value is not supported until
        /// Windows Server 2008 R2 and Windows 7.
        /// </summary>
        SupportsUsnJournal = 0x2000000,
        /// <summary>
        /// The specified volume supports sharing logical clusters between files on the same volume. The file system
        /// reallocates on writes to shared clusters. Indicates that FSCTL_DUPLICATE_EXTENTS_TO_FILE is a supported
        /// operation.
        /// </summary>
        SupportsBlockRefCounting = 0x8000000,
        /// <summary>
        /// The specified volume is a direct access (DAX) volume. This flag was introduced in Windows 10, version 1607.
        /// </summary>
        DaxVolume = 0x20000000
    }

    /// <summary>
    /// Windows messages defined in "winuser.h".
    /// </summary>
    [Serializable]
    public enum WM
    {
        NULL                        = 0x0000,
        CREATE                      = 0x0001,
        DESTROY                     = 0x0002,
        MOVE                        = 0x0003,
        SIZE                        = 0x0005,
        ACTIVATE                    = 0x0006,
        SETFOCUS                    = 0x0007,
        KILLFOCUS                   = 0x0008,
        ENABLE                      = 0x000A,
        SETREDRAW                   = 0x000B,
        SETTEXT                     = 0x000C,
        GETTEXT                     = 0x000D,
        GETTEXTLENGTH               = 0x000E,
        PAINT                       = 0x000F,
        CLOSE                       = 0x0010,
        QUERYENDSESSION             = 0x0011,
        QUIT                        = 0x0012,
        QUERYOPEN                   = 0x0013,
        ERASEBKGND                  = 0x0014,
        SYSCOLORCHANGE              = 0x0015,
        ENDSESSION                  = 0x0016,
        SHOWWINDOW                  = 0x0018,
        WININICHANGE                = 0x001A,
        SETTINGCHANGE               = WININICHANGE,
        DEVMODECHANGE               = 0x001B,
        ACTIVATEAPP                 = 0x001C,
        FONTCHANGE                  = 0x001D,
        TIMECHANGE                  = 0x001E,
        CANCELMODE                  = 0x001F,
        SETCURSOR                   = 0x0020,
        MOUSEACTIVATE               = 0x0021,
        CHILDACTIVATE               = 0x0022,
        QUEUESYNC                   = 0x0023,
        GETMINMAXINFO               = 0x0024,
        PAINTICON                   = 0x0026,
        ICONERASEBKGND              = 0x0027,
        NEXTDLGCTL                  = 0x0028,
        SPOOLERSTATUS               = 0x002A,
        DRAWITEM                    = 0x002B,
        MEASUREITEM                 = 0x002C,
        DELETEITEM                  = 0x002D,
        VKEYTOITEM                  = 0x002E,
        CHARTOITEM                  = 0x002F,
        SETFONT                     = 0x0030,
        GETFONT                     = 0x0031,
        SETHOTKEY                   = 0x0032,
        GETHOTKEY                   = 0x0033,
        QUERYDRAGICON               = 0x0037,
        COMPAREITEM                 = 0x0039,
        GETOBJECT                   = 0x003D,
        COMPACTING                  = 0x0041,
        COMMNOTIFY                  = 0x0044,
        WINDOWPOSCHANGING           = 0x0046,
        WINDOWPOSCHANGED            = 0x0047,
        POWER                       = 0x0048,
        COPYDATA                    = 0x004A,
        CANCELJOURNAL               = 0x004B,
        NOTIFY                      = 0x004E,
        INPUTLANGCHANGEREQUEST      = 0x0050,
        INPUTLANGCHANGE             = 0x0051,
        TCARD                       = 0x0052,
        HELP                        = 0x0053,
        USERCHANGED                 = 0x0054,
        NOTIFYFORMAT                = 0x0055,
        CONTEXTMENU                 = 0x007B,
        STYLECHANGING               = 0x007C,
        STYLECHANGED                = 0x007D,
        DISPLAYCHANGE               = 0x007E,
        GETICON                     = 0x007F,
        SETICON                     = 0x0080,
        NCCREATE                    = 0x0081,
        NCDESTROY                   = 0x0082,
        NCCALCSIZE                  = 0x0083,
        NCHITTEST                   = 0x0084,
        NCPAINT                     = 0x0085,
        NCACTIVATE                  = 0x0086,
        GETDLGCODE                  = 0x0087,
        SYNCPAINT                   = 0x0088,
        NCMOUSEMOVE                 = 0x00A0,
        NCLBUTTONDOWN               = 0x00A1,
        NCLBUTTONUP                 = 0x00A2,
        NCLBUTTONDBLCLK             = 0x00A3,
        NCRBUTTONDOWN               = 0x00A4,
        NCRBUTTONUP                 = 0x00A5,
        NCRBUTTONDBLCLK             = 0x00A6,
        NCMBUTTONDOWN               = 0x00A7,
        NCMBUTTONUP                 = 0x00A8,
        NCMBUTTONDBLCLK             = 0x00A9,
        NCXBUTTONDOWN               = 0x00AB,
        NCXBUTTONUP                 = 0x00AC,
        NCXBUTTONDBLCLK             = 0x00AD,
        INPUT_DEVICE_CHANGE         = 0x00FE,
        INPUT                       = 0x00FF,
        KEYFIRST                    = 0x0100,
        KEYDOWN                     = 0x0100,
        KEYUP                       = 0x0101,
        CHAR                        = 0x0102,
        DEADCHAR                    = 0x0103,
        SYSKEYDOWN                  = 0x0104,
        SYSKEYUP                    = 0x0105,
        SYSCHAR                     = 0x0106,
        SYSDEADCHAR                 = 0x0107,
        KEYLAST                     = 0x0108,
        UNICHAR                     = 0x0109,
        IME_STARTCOMPOSITION        = 0x010D,
        IME_ENDCOMPOSITION          = 0x010E,
        IME_COMPOSITION             = 0x010F,
        IME_KEYLAST                 = 0x010F,
        INITDIALOG                  = 0x0110,
        COMMAND                     = 0x0111,
        SYSCOMMAND                  = 0x0112,
        TIMER                       = 0x0113,
        HSCROLL                     = 0x0114,
        VSCROLL                     = 0x0115,
        INITMENU                    = 0x0116,
        INITMENUPOPUP               = 0x0117,
        SYSTIMER                    = 0x0118,
        MENUSELECT                  = 0x011F,
        MENUCHAR                    = 0x0120,
        ENTERIDLE                   = 0x0121,
        MENURBUTTONUP               = 0x0122,
        MENUDRAG                    = 0x0123,
        MENUGETOBJECT               = 0x0124,
        UNINITMENUPOPUP             = 0x0125,
        MENUCOMMAND                 = 0x0126,
        CHANGEUISTATE               = 0x0127,
        UPDATEUISTATE               = 0x0128,
        QUERYUISTATE                = 0x0129,
        CTLCOLORMSGBOX              = 0x0132,
        CTLCOLOREDIT                = 0x0133,
        CTLCOLORLISTBOX             = 0x0134,
        CTLCOLORBTN                 = 0x0135,
        CTLCOLORDLG                 = 0x0136,
        CTLCOLORSCROLLBAR           = 0x0137,
        CTLCOLORSTATIC              = 0x0138,
        MOUSEFIRST                  = 0x0200,
        MOUSEMOVE                   = 0x0200,
        LBUTTONDOWN                 = 0x0201,
        LBUTTONUP                   = 0x0202,
        LBUTTONDBLCLK               = 0x0203,
        RBUTTONDOWN                 = 0x0204,
        RBUTTONUP                   = 0x0205,
        RBUTTONDBLCLK               = 0x0206,
        MBUTTONDOWN                 = 0x0207,
        MBUTTONUP                   = 0x0208,
        MBUTTONDBLCLK               = 0x0209,
        MOUSEWHEEL                  = 0x020A,
        XBUTTONDOWN                 = 0x020B,
        XBUTTONUP                   = 0x020C,
        XBUTTONDBLCLK               = 0x020D,
        MOUSEHWHEEL                 = 0x020E,
        MOUSELAST                   = 0x020E,
        PARENTNOTIFY                = 0x0210,
        ENTERMENULOOP               = 0x0211,
        EXITMENULOOP                = 0x0212,
        NEXTMENU                    = 0x0213,
        SIZING                      = 0x0214,
        CAPTURECHANGED              = 0x0215,
        MOVING                      = 0x0216,
        POWERBROADCAST              = 0x0218,
        DEVICECHANGE                = 0x0219,
        MDICREATE                   = 0x0220,
        MDIDESTROY                  = 0x0221,
        MDIACTIVATE                 = 0x0222,
        MDIRESTORE                  = 0x0223,
        MDINEXT                     = 0x0224,
        MDIMAXIMIZE                 = 0x0225,
        MDITILE                     = 0x0226,
        MDICASCADE                  = 0x0227,
        MDIICONARRANGE              = 0x0228,
        MDIGETACTIVE                = 0x0229,
        MDISETMENU                  = 0x0230,
        ENTERSIZEMOVE               = 0x0231,
        EXITSIZEMOVE                = 0x0232,
        DROPFILES                   = 0x0233,
        MDIREFRESHMENU              = 0x0234,
        IME_SETCONTEXT              = 0x0281,
        IME_NOTIFY                  = 0x0282,
        IME_CONTROL                 = 0x0283,
        IME_COMPOSITIONFULL         = 0x0284,
        IME_SELECT                  = 0x0285,
        IME_CHAR                    = 0x0286,
        IME_REQUEST                 = 0x0288,
        IME_KEYDOWN                 = 0x0290,
        IME_KEYUP                   = 0x0291,
        NCMOUSEHOVER                = 0x02A0,
        MOUSEHOVER                  = 0x02A1,
        NCMOUSELEAVE                = 0x02A2,
        MOUSELEAVE                  = 0x02A3,
        WTSSESSION_CHANGE           = 0x02B1,
        TABLET_FIRST                = 0x02c0,
        TABLET_LAST                 = 0x02df,
        CUT                         = 0x0300,
        COPY                        = 0x0301,
        PASTE                       = 0x0302,
        CLEAR                       = 0x0303,
        UNDO                        = 0x0304,
        RENDERFORMAT                = 0x0305,
        RENDERALLFORMATS            = 0x0306,
        DESTROYCLIPBOARD            = 0x0307,
        DRAWCLIPBOARD               = 0x0308,
        PAINTCLIPBOARD              = 0x0309,
        VSCROLLCLIPBOARD            = 0x030A,
        SIZECLIPBOARD               = 0x030B,
        ASKCBFORMATNAME             = 0x030C,
        CHANGECBCHAIN               = 0x030D,
        HSCROLLCLIPBOARD            = 0x030E,
        QUERYNEWPALETTE             = 0x030F,
        PALETTEISCHANGING           = 0x0310,
        PALETTECHANGED              = 0x0311,
        HOTKEY                      = 0x0312,
        PRINT                       = 0x0317,
        PRINTCLIENT                 = 0x0318,
        APPCOMMAND                  = 0x0319,
        THEMECHANGED                = 0x031A,
        CLIPBOARDUPDATE             = 0x031D,
        DWMCOMPOSITIONCHANGED       = 0x031E,
        DWMNCRENDERINGCHANGED       = 0x031F,
        DWMCOLORIZATIONCOLORCHANGED = 0x0320,
        DWMWINDOWMAXIMIZEDCHANGE    = 0x0321,
        GETTITLEBARINFOEX           = 0x033F,
        HANDHELDFIRST               = 0x0358,
        HANDHELDLAST                = 0x035F,
        AFXFIRST                    = 0x0360,
        AFXLAST                     = 0x037F,
        PENWINFIRST                 = 0x0380,
        PENWINLAST                  = 0x038F,
        USER                        = 0x0400,
        CPL_LAUNCH                  = USER+0x1000,
        CPL_LAUNCHED                = USER+0x1001,
        APP                         = 0x8000,
    }

    /// <summary>
    /// Edit control and Rich Edit control messages.
    /// Only some messages are defined here.
    /// </summary>
    [Serializable]
    public enum EM
    {
        SETEVENTMASK = 0x0431,
        SETCUEBANNER = 0x1501,
    }

    /// <summary>
    /// Windows messages used with the "RedrawWindow" function.
    /// </summary>
    [Serializable]
    [Flags]
    public enum RDW
    {
        /// <summary>
        /// Invalidates lprcUpdate or hrgnUpdate (only one may be non-NULL). If both are NULL, the entire window is
        /// invalidated.
        /// </summary>
        INVALIDATE = 0x0001,
        /// <summary>
        /// Causes the window to receive a WM_ERASEBKGND message when the window is repainted. The INVALIDATE flag
        /// must also be specified; otherwise, ERASE has no effect.
        /// </summary>
        ERASE = 0x0004,
        /// <summary>
        /// Includes child windows, if any, in the repainting operation.
        /// </summary>
        ALLCHILDREN = 0x0080,
        /// <summary>
        /// Causes the affected windows (as specified by the ALLCHILDREN and NOCHILDREN flags) to receive
        /// WM_NCPAINT and WM_ERASEBKGND messages, if necessary, before the function returns. WM_PAINT messages are
        /// received at the ordinary time.
        /// </summary>
        ERASENOW = 0x0200,
        /// <summary>
        /// Causes the affected windows (as specified by the ALLCHILDREN and NOCHILDREN flags) to receive
        /// WM_NCPAINT, WM_ERASEBKGND, and WM_PAINT messages, if necessary, before the function returns.
        /// </summary>
        UPDATENOW = 0x0100,
        /// <summary>
        /// Causes any part of the nonclient area of the window that intersects the update region to receive a
        /// WM_NCPAINT message. The INVALIDATE flag must also be specified; otherwise, FRAME has no effect. The
        /// WM_NCPAINT message is typically not sent during the execution of RedrawWindow unless either UPDATENOW
        /// or ERASENOW is specified.
        /// </summary>
        FRAME = 0x0400

    }

    /// <summary>
    /// Windows messages used with the "SetWindowPos" function.
    /// </summary>
    [Serializable]
    [Flags]
    public enum SWP
    {
        /// <summary>
        /// Retains the current size (ignores the cx and cy parameters).
        /// </summary>
        NOSIZE = 0x0001,
        /// <summary>
        /// Retains the current position (ignores X and Y parameters).
        /// </summary>
        NOMOVE = 0x0002,
        /// <summary>
        /// Retains the current Z order (ignores the hWndInsertAfter parameter).
        /// </summary>
        NOZORDER = 0x0004,
        /// <summary>
        /// Does not redraw changes. If this flag is set, no repainting of any kind occurs. This applies to the client
        /// area, the nonclient area (including the title bar and scroll bars), and any part of the parent window
        /// uncovered as a result of the window being moved. When this flag is set, the application must explicitly
        /// invalidate or redraw any parts of the window and parent window that need redrawing.
        /// </summary>
        NOREDRAW = 0x0008,
        /// <summary>
        /// Does not activate the window. If this flag is not set, the window is activated and moved to the top of
        /// either the topmost or non-topmost group (depending on the setting of the hWndInsertAfter parameter).
        /// </summary>
        NOACTIVATE = 0x0010,
        /// <summary>
        /// Draws a frame (defined in the window's class description) around the window.
        /// </summary>
        DRAWFRAME = 0x0020,
        /// <summary>
        /// Applies new frame styles set using the SetWindowLong function. Sends a <see cref="WM.NCCALCSIZE"/> message
        /// to the window, even if the window's size is not being changed. If this flag is not specified,
        /// <see cref="WM.NCCALCSIZE"/> is sent only when the window's size is being changed.
        /// </summary>
        FRAMECHANGED = 0x0020,
        /// <summary>
        /// Displays the window.
        /// </summary>
        SHOWWINDOW = 0x0040,
        /// <summary>
        /// Hides the window.
        /// </summary>
        HIDEWINDOW = 0x0080,
        /// <summary>
        /// Discards the entire contents of the client area. If this flag is not specified, the valid contents of the
        /// client area are saved and copied back into the client area after the window is sized or repositioned.
        /// </summary>
        NOCOPYBITS = 0x0100,
        /// <summary>
        /// Does not change the owner window's position in the Z order.
        /// </summary>
        NOOWNERZORDER = 0x0200,
        /// <summary>
        /// Same as the <see cref="NOOWNERZORDER"/> flag.
        /// </summary>
        NOREPOSITION = 0x0200,
        /// <summary>
        /// Prevents the window from receiving the <see cref="WM.WINDOWPOSCHANGING"/> message.
        /// </summary>
        NOSENDCHANGING = 0x0400,
        /// <summary>
        /// Prevents generation of the <see cref="WM.SYNCPAINT"/> message.
        /// </summary>
        DEFERERASE = 0x2000,
        /// <summary>
        /// If the calling thread and the thread that owns the window are attached to different input queues, the
        /// system posts the request to the thread that owns the window. This prevents the calling thread from blocking
        /// its execution while other threads process the request.
        /// </summary>
        ASYNCWINDOWPOS = 0x4000,

    }
}
