//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//
// UserWin satellite library | Author: Sergei Y.Kitáev
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

using CommonHelpers;

namespace UserWin {

//**************************************************************************************************
static partial class Win32 {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public const int
   SM_CXFULLSCREEN      = 16,
   SM_CYFULLSCREEN      = 17,
   SW_RESTORE           = 9;

public const uint
   SC_CLOSE             = 0xF060,
   SWP_NOZORDER         = 0x0004,
   PM_REMOVE            = 0x0001,
   MF_BYCOMMAND         = 0x0000,
   MF_ENABLED           = 0x0000,
   MF_GRAYED            = 0x0001,
   WM_CLOSE             = 0x0010,
   WM_SYSCOMMAND        = 0x0112,
   WM_TIMER             = 0x0113,
   WM_KEYFIRST          = 0x0100,
   WM_KEYLAST           = 0x0108,
   WM_MOUSEFIRST        = 0x0200,
   WM_MOUSELAST         = 0x020E,
   WM_MOUSEMOVE         = 0x0200,
   WM_NCLBUTTONDOWN     = 0x00A1;
// WM_DWMCOMPOSITIONCHANGED= 0x031E;

//==================================================================================================

[DllImport("User32.dll",ExactSpelling=true,SetLastError=true)]
public static extern int GetSystemMetrics(int nIndex);

[DllImport("User32.dll",ExactSpelling=true,SetLastError=true)]
public static extern IntPtr GetSystemMenu(IntPtr hWnd,bool bRevert);

[DllImport("User32.dll",ExactSpelling=true,SetLastError=true)]
public static extern uint EnableMenuItem(IntPtr hMenu,uint uIDEnableItem,uint uEnable);

[DllImport("User32.dll",ExactSpelling=true,SetLastError=true)]
public static extern bool ShowWindow(IntPtr hWnd,int nCmdShow);

[DllImport("User32.dll",ExactSpelling=true,SetLastError=true)]
public static extern bool SetWindowPos( IntPtr hWnd, IntPtr hWndInsertAfter,
                                        int x, int y, int cx, int cy,
                                        uint uFlags );

[DllImport("User32.dll",ExactSpelling=true,SetLastError=true)]
public static extern bool GetWindowRect(IntPtr hWnd,out Win32_RECT rect);

[DllImport("User32.dll",CharSet=CharSet.Unicode,SetLastError=true)]
public static extern IntPtr SendMessage(IntPtr hWnd,uint msg,UIntPtr wParam,IntPtr lParam);

[DllImport("User32.dll",CharSet=CharSet.Unicode,SetLastError=true)]
public static extern bool PostMessage(IntPtr hWnd,uint msg,UIntPtr wParam,IntPtr lParam);

[DllImport("User32.dll",CharSet=CharSet.Unicode)]
public static extern int GetMessage
(
   out Win32_MSG msg,
   IntPtr hWnd,
   uint wMsgFilterMin,
   uint wMsgFilterMax
);

[DllImport("User32.dll",CharSet=CharSet.Unicode)]
public static extern bool PeekMessage
(
   out Win32_MSG msg,
   IntPtr hWnd,
   uint wMsgFilterMin,
   uint wMsgFilterMax,
   uint wRemoveMsg
);

[DllImport("User32.dll",ExactSpelling=true)]
public static extern uint GetQueueStatus(uint flags);

[DllImport("User32.dll",ExactSpelling=true)]
public static extern bool GetInputState();

[DllImport("User32.dll",ExactSpelling=true)]
public static extern bool TranslateMessage([In]ref Win32_MSG msg);

[DllImport("User32.dll",CharSet=CharSet.Unicode)]
public static extern IntPtr DispatchMessage([In]ref Win32_MSG msg);

[DllImport("User32.dll",CharSet=CharSet.Unicode)]
public static extern bool WaitMessage();

[DllImport("User32.dll",ExactSpelling=true)]
public static extern bool SetForegroundWindow(IntPtr hWnd);

[DllImport("User32.dll",ExactSpelling=true)]
public static extern IntPtr GetCapture();

[DllImport("User32.dll",ExactSpelling=true,SetLastError=true)]
public static extern bool ReleaseCapture();

//--------------------------------------------------------------------------------------------------
/*
[DllImport("DwmApi.dll",ExactSpelling=true,SetLastError=true)]
public static extern int DwmExtendFrameIntoClientArea(IntPtr hWnd,[In] ref Win32_MARGINS marInset);

[DllImport("DwmApi.dll",ExactSpelling=true,SetLastError=true)]
public static extern int DwmIsCompositionEnabled(out int nEnabled);
*/
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // Win32
//**************************************************************************************************

} // UserWin
