using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;

namespace Apewer.Internals.Interop
{

    internal class Constant
    {

        /// <summary></summary>
        public const byte AC_SRC_OVER = 0;

        /// <summary></summary>
        public const byte AC_SRC_ALPHA = 1;

        /// <summary>从左到右显示。</summary>
        public const Int32 AW_HOR_POSITIVE = 0x00000001;

        /// <summary>从右到左显示。</summary>
        public const Int32 AW_HOR_NEGATIVE = 0x00000002;

        /// <summary>从上到下显示。</summary>
        public const Int32 AW_VER_POSITIVE = 0x00000004;

        /// <summary>从下到上显示。</summary>
        public const Int32 AW_VER_NEGATIVE = 0x00000008;

        /// <summary>若使用了AW_HIDE标志,则使窗口向内重叠,即收缩窗口;否则使窗口向外扩展,即展开窗口。</summary>
        public const Int32 AW_CENTER = 0x00000010;

        /// <summary>隐藏窗口,缺省则显示窗口。</summary>
        public const Int32 AW_HIDE = 0x00010000;

        /// <summary>激活窗口。在使用了AW_HIDE标志后不能使用这个标志。</summary>
        public const Int32 AW_ACTIVATE = 0x00020000;

        /// <summary>使用滑动类型。缺省则为滚动动画类型。当使用AW_CENTER标志时,这个标志就被忽略。</summary>
        public const Int32 AW_SLIDE = 0x00040000;

        /// <summary>透明度从高到低。</summary>
        public const Int32 AW_BLEND = 0x00080000;

        /// <summary></summary>
        public const int CS_DROPSHADOW = 0x20000;

        /// <summary></summary>
        public const int FILE_ATTRIBUTE_NORMAL = 0x80;

        /// <summary></summary>
        public const uint FILE_FLAG_SEQUENTIAL_SCAN = 0x08000000;

        /// <summary></summary>
        public const int FILE_MAP_COPY = 1;

        /// <summary></summary>
        public const int FILE_MAP_WRITE = 2;

        /// <summary></summary>
        public const int FILE_MAP_READ = 4;

        /// <summary></summary>
        public const int GCL_STYLE = (-26);

        /// <summary></summary>
        public const uint GENERIC_READ = 0x80000000;

        /// <summary></summary>
        public const uint GENERIC_WRITE = 0x40000000;

        /// <summary></summary>
        public const int GWL_EXSTYLE = -20;

        /// <summary></summary>
        public const int INVALID_HANDLE_VALUE = -1;

        /// <summary></summary>
        public const int OPEN_EXISTING = 3;

        /// <summary></summary>
        public const uint PAGE_READWRITE = 0x04;

        /// <summary></summary>
        public const int PROCESS_ALL_ACCESS = 0x1F0FFF;

        /// <summary></summary>
        public const int PROCESS_QUERY_INFORMATION = 0x400;

        /// <summary></summary>
        public const int SC_MOVE = 0xF010;

        /// <summary>play synchronously (default)</summary>
        public const int SND_SYNC = 0x0000;

        /// <summary>play asynchronously</summary>
        public const int SND_ASYNC = 0x0001;

        /// <summary>silence (!default) if sound not found</summary>
        public const int SND_NODEFAULT = 0x0002;

        /// <summary>pszSound points to a memory file</summary>
        public const int SND_MEMORY = 0x0004;

        /// <summary>loop the sound until next sndPlaySound</summary>
        public const int SND_LOOP = 0x0008;

        /// <summary>don’t stop any currently playing sound</summary>
        public const int SND_NOSTOP = 0x0010;

        /// <summary>Stop Playing Wave</summary>
        public const int SND_PURGE = 0x0040;

        /// <summary>don’t wait if the driver is busy</summary>
        public const int SND_NOWAIT = 0x00002000;

        /// <summary>name is a registry alias</summary>
        public const int SND_ALIAS = 0x00010000;

        /// <summary>alias is a predefined id</summary>
        public const int SND_ALIAS_ID = 0x00110000;

        /// <summary>name is file name</summary>
        public const int SND_FILENAME = 0x00020000;

        /// <summary>name is resource name or atom</summary>
        public const int SND_RESOURCE = 0x00040004;

        /// <summary></summary>
        public const int STILL_ALIVE = 0x103;

        /// <summary></summary>
        public const int SW_HIDE = 0;

        /// <summary></summary>
        public const int SW_SHOWNORMAL = 1;

        /// <summary></summary>
        public const int SW_SHOWMINIMIZED = 2;

        /// <summary></summary>
        public const int SW_SHOWMAXIMIZED = 3;

        /// <summary></summary>
        public const int SW_MAXIMIZE = 3;

        /// <summary></summary>
        public const int SW_SHOWNOACTIVATE = 4;

        /// <summary></summary>
        public const int SW_SHOW = 5;

        /// <summary></summary>
        public const int SW_MINIMIZE = 6;

        /// <summary></summary>
        public const int SW_SHOWMINNOACTIVE = 7;

        /// <summary></summary>
        public const int SW_SHOWNA = 8;

        /// <summary></summary>
        public const int SW_RESTORE = 9;

        /// <summary></summary>
        public const int ULW_ALPHA = 2;

        /// <summary></summary>
        public const int WM_CLOSE = 0x0010;

        /// <summary></summary>
        public const int WM_KEYDOWN = 0X100;

        /// <summary></summary>
        public const int WM_KEYUP = 0X101;

        /// <summary></summary>
        public const int WM_SYSCHAR = 0X106;

        /// <summary></summary>
        public const int WM_SYSKEYUP = 0X105;

        /// <summary></summary>
        public const int WM_SYSKEYDOWN = 0X104;

        /// <summary></summary>
        public const int WM_CHAR = 0X102;

        /// <summary></summary>
        public const int WS_EX_TRANSPARENT = 0x00000020;

        /// <summary></summary>
        public const int WS_EX_LAYERED = 0x00080000;

        /// <summary></summary>
        public const int WS_SYSMENU = 0x00080000;

        /// <summary></summary>
        public const int WS_MINIMIZEBOX = 0x00020000;

        public const int ENUM_CURRENT_SETTINGS = -1;
        public const int CDS_UPDATEREGISTRY = 0x01;
        public const int CDS_TEST = 0x02;

        public const int DISP_CHANGE_SUCCESSFUL = 0;
        public const int DISP_CHANGE_RESTART = 1;
        public const int DISP_CHANGE_FAILED = -1;
        public const int DISP_CHANGE_BADMODE = -2;
        public const int DISP_CHANGE_NOTUPDATED = -3;
        public const int DISP_CHANGE_BADFLAGS = -4;
        public const int DISP_CHANGE_BADPARAM = -5;
        public const int DISP_CHANGE_BADDUALVIEW = -6;

        public const int DMDO_DEFAULT = 0;
        public const int DMDO_90 = 1;
        public const int DMDO_180 = 2;
        public const int DMDO_270 = 3;

        public const int SE_PRIVILEGE_ENABLED = 0x00000002;
        public const int TOKEN_QUERY = 0x00000008;
        public const int TOKEN_ADJUST_PRIVILEGES = 0x00000020;
        public const string SE_SHUTDOWN_NAME = "SeShutdownPrivilege";

        public const int EWX_LOGOFF = 0x00000000;
        public const int EWX_SHUTDOWN = 0x00000001;
        public const int EWX_REBOOT = 0x00000002;
        public const int EWX_FORCE = 0x00000004;
        public const int EWX_POWEROFF = 0x00000008;
        public const int EWX_FORCEIFHUNG = 0x00000010;

        #region Windows Hook

        /// <summary>
        /// Installs a hook procedure that monitors messages generated as a result of an input event in a dialog box, message box, menu, or scroll bar. 
        /// For more information, see the MessageProc hook procedure.
        /// </summary>
        public const int WH_MSGFILTER = -1;

        /// <summary>
        /// Installs a hook procedure that records input messages posted to the system message queue. 
        /// This hook is useful for recording macros. 
        /// For more information, see the JournalRecordProc hook procedure.
        /// </summary>
        public const int WH_JOURNALRECORD = 0;

        /// <summary>
        /// Installs a hook procedure that posts messages previously recorded by a WH_JOURNALRECORD hook procedure. 
        /// For more information, see the JournalPlaybackProc hook procedure.
        /// </summary>
        public const int WH_JOURNALPLAYBACK = 1;

        /// <summary>
        /// Installs a hook procedure that monitors keystroke messages. 
        /// For more information, see the KeyboardProc hook procedure.
        /// </summary>
        public const int WH_KEYBOARD = 2;

        /// <summary>
        /// Installs a hook procedure that monitors messages posted to a message queue. 
        /// For more information, see the GetMsgProc hook procedure.
        /// </summary>
        public const int WH_GETMESSAGE = 3;

        /// <summary>
        /// Installs a hook procedure that monitors messages before the system sends them to the destination window procedure. 
        /// For more information, see the CallWndProc hook procedure.
        /// </summary>
        public const int WH_CALLWNDPROC = 4;

        /// <summary>
        /// Installs a hook procedure that receives notifications useful to a CBT application. 
        /// For more information, see the CBTProc hook procedure.
        /// </summary>
        public const int WH_CBT = 5;

        /// <summary>
        /// Installs a hook procedure that monitors messages generated as a result of an input event in a dialog box, message box, menu, or scroll bar. 
        /// The hook procedure monitors these messages for all applications in the same desktop as the calling thread. 
        /// For more information, see the SysMsgProc hook procedure.
        /// </summary>
        public const int WH_SYSMSGFILTER = 6;

        /// <summary>
        /// Installs a hook procedure that monitors mouse messages. 
        /// For more information, see the MouseProc hook procedure.
        /// </summary>
        public const int WH_MOUSE = 7;

        /// <summary>
        /// Installs a hook procedure useful for debugging other hook procedures. 
        /// For more information, see the DebugProc hook procedure.
        /// </summary>
        public const int WH_DEBUG = 9;

        /// <summary>
        /// Installs a hook procedure that receives notifications useful to shell applications.
        /// For more information, see the ShellProc hook procedure.
        /// </summary>
        public const int WH_SHELL = 10;

        /// <summary>
        /// Installs a hook procedure that will be called when the application's foreground thread is about to become idle. 
        /// This hook is useful for performing low priority tasks during idle time. 
        /// For more information, see the ForegroundIdleProc hook procedure.
        /// </summary>
        public const int WH_FOREGROUNDIDLE = 11;

        /// <summary>
        /// Installs a hook procedure that monitors messages after they have been processed by the destination window procedure. 
        /// For more information, see the CallWndRetProc hook procedure.
        /// </summary>
        public const int WH_CALLWNDPROCRET = 12;

        /// <summary>
        /// Installs a hook procedure that monitors low-level keyboard input events. 
        /// For more information, see the LowLevelKeyboardProc hook procedure.
        /// </summary>
        public const int WH_KEYBOARD_LL = 13;

        /// <summary
        /// >Installs a hook procedure that monitors low-level mouse input events. 
        /// For more information, see the LowLevelMouseProc hook procedure.
        /// </summary>
        public const int WH_MOUSE_LL = 14;

        #endregion

    }

}