// Structs.cs
// Copyright (c) 2016 Bentley Systems, Incorporated. All Rights Reserved.

using System;
using System.Runtime.InteropServices;

namespace Haestad.Framework.UI.Integration
{
    #region Public Structs
    // Note: <whar> See previous P4 versions of this file for details of why this pragma is in place.
#pragma warning disable 0649
    [StructLayout(LayoutKind.Sequential)]
    public struct RECT
    {
        public int Left, Top, Right, Bottom;
    }
#pragma warning restore 0649
    #endregion

    #region Internal Structs
    internal struct RETURN_VALUES
    {
        public const int FALSE = 0;
        public const int TRUE = 1; 
    }

// Note: <whar> See previous P4 versions of this file for details of why this pragma is in place.
#pragma warning disable 0649
    internal struct NCCALCSIZE_PARAMS
    {
        public RECT rcNewWindow;
        public RECT rcOldWindow;
        public RECT rcOldClient;
        public IntPtr lppos;
    }

    [StructLayout(LayoutKind.Sequential)]
    internal struct WINDOWPOS
    {
        public IntPtr hwnd;
        public IntPtr hwndInsertAfter;
        public int x;
        public int y;
        public int cx;
        public int cy;
        public uint flags;
    }
#pragma warning restore 0649

    [StructLayout(LayoutKind.Sequential)]
    internal struct MINMAXINFO
    {
        public POINT ptReserved;
        public POINT ptMaxSize;
        public POINT ptMaxPosition;
        public POINT ptMinTrackSize;
        public POINT ptMaxTrackSize;
    };


    [StructLayout(LayoutKind.Sequential)]
    internal struct POINT
    {
        public int x;
        public int y;
    }

    internal struct WINDOWS_MESSAGES
    {
        public const int WM_ACTIVATEAPP = 0x001C;
        public const int WM_ENTERMENULOOP = 0x0211;
        public const int WM_ERASEBKGND = 0x0014;
        public const int WM_EXITSIZEMOVE = 0x0232;
        public const int WM_GETMINMAXINFO = 0x0024;
        public const int WM_LBUTTONUP = 0x0202;
        public const int WM_LBUTTONDBLCLICK = 0x0203;
        public const int WM_MOVE = 0x0003;
        public const int WM_NCLBUTTONDBLCLK = 0x00A3;
        public const int WM_NCPAINT = 0x0085;
        public const int WM_NCACTIVATE = 0x0086;
        public const int WM_NCCALCSIZE = 0x0083;
        public const int WM_NCRBUTTONDOWN = 0x00A4;
        public const int WM_NCRBUTTONUP = 0x00A5;
        public const int WM_PAINT = 0x000F;
        public const int WM_PARENTNOTIFY = 0x0210;
        public const int WM_RBUTTONDOWN = 0x0204;
        public const int WM_SIZE = 0x0005;
        public const int WM_SIZING = 0x0214;
        public const int WM_SYSCHAR = 0x0106;
        public const int WM_SYSCOMMAND = 0x0112;
        public const int WM_SYSKEYDOWN = 0x0104;
        public const int WM_SYSKEYUP = 0x0105;
        public const int WM_UNINITMENUPOPUP = 0x0125;
        public const int WM_WINDOWPOSCHANGED = 0x047;
        public const int WM_WINDOWPOSCHANGING = 0x046;
    }

    internal struct NCHITTEST_CONSTANTS
    {
        public const int LET_SYSTEM_DECIDE = Int32.MinValue;

        public const int HTTRANSPARENT = -1;
        public const int HTCLIENT = 1;
        public const int HTCAPTION = 2;
        public const int HYSYSMENU = 3;
        public const int HTLEFT = 10;
        public const int HTRIGHT = 11;
        public const int HTTOP = 12;
        public const int HTTOPLEFT = 13;
        public const int HTTOPRIGHT = 14;
        public const int HTBOTTOM = 15;
        public const int HTBOTTOMLEFT = 16;
        public const int HTBOTTOMRIGHT = 17;
    }

    internal struct SYSTEM_COMMAND_CONSTANTS
    {
        public const uint SC_CLOSE = 0xF060;
        public const uint SC_MAXIMIZE = 0xF030;
        public const uint SC_MINIMIZE = 0xF020;
        public const uint SC_MOVE = 0xF010;
        public const uint SC_KEYMENU = 0xF100;
        public const uint SC_RESTORE = 0xF120;
        public const uint SC_SIZE = 0xF000;
    }

    internal struct SHOW_WINDOW_CONSTANTS
    {
        public const int SW_HIDE = 0;
        public const int SW_SHOWNORMAL = 1;
        public const int SW_SHOWMINIMIZED = 2;
        public const int SW_SHOWMAXIMIZED = 3;
        public const int SW_SHOWNOACTIVATE = 4;
        public const int SW_SHOW = 5;
    }

    internal struct WMSIZE_CONSTANTS
    {
        public const int SIZE_RESTORED = 0;
        public const int SIZE_MINIMIZED = 1;
        public const int SIZE_MAXIMIZED = 2;
    }

    internal struct HOTKEY_CONSTANTS
    {
        public const int MOD_ALT = 0x1;
        public const int MOD_CONTROL = 0x2;
        public const int MOD_SHIFT = 0x4;
        public const int MOD_WIN = 0x8;
        public const uint WM_HOTKEY = 0x312;
    }

    #region Ribbon Customization
    internal struct RibbonCommandCustomizationStorageElementIDs
    {
        public const int QuickAccessToolBar = 1;
        public const int GlobalUserSettings = 2;
        public const int DropDownToggleSettings = 3;
    }

    internal struct RibbonCommandCustomizationStorageElementNames
    {
        public const string QuickAccessToolBar = "QuickAccessToolBar"; // DO NOT LOCALIZE <whar>
        public const string GlobalUserSettings = "GlobalUserSettings"; // DO NOT LOCALIZE <whar>
        public const string DropDownToggleSettings = "DropDownToggleSettings"; // DO NOT LOCALIZE <whar>
    }

    internal struct RibbonCommandCustomizationStorageElementVersions
    {
        public const int QuickAccessToolBar = 1;
        public const int GlobalUserSettings = 1;
        public const int DropDownToggleSettings = 1;
    }
    #endregion

    #endregion
}
