// This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com

/* ConsoleEvent.cs -- console event constants
   Ars Magna project, http://arsmagna.ru */

#region Using directives

using System;

using JetBrains.Annotations;

#endregion

// ReSharper disable InconsistentNaming

namespace AM.Win32
{
    /// <summary>
    /// Console event constants.
    /// </summary>
    [Flags]
    [PublicAPI]
    public enum ConsoleEvent
    {
        /// <summary>
        /// A CTRL+C signal was received, either from keyboard input 
        /// or from a signal generated by the GenerateConsoleCtrlEvent 
        /// function.
        /// </summary>
        CTRL_C_EVENT = 0,

        /// <summary>
        /// A CTRL+BREAK signal was received, either from keyboard input 
        /// or from a signal generated by GenerateConsoleCtrlEvent.
        /// </summary>
        CTRL_BREAK_EVENT = 1,

        /// <summary>
        /// A signal that the system sends to all processes attached to a 
        /// console when the user closes the console (either by clicking Close 
        /// on the console window's window menu, or by clicking the End Task 
        /// button command from Task Manager).
        /// </summary>
        CTRL_CLOSE_EVENT = 2,

        /// <summary>
        /// A signal that the system sends to all console processes when a user 
        /// is logging off. This signal does not indicate which user is logging 
        /// off, so no assumptions can be made.
        /// </summary>
        CTRL_LOGOFF_EVENT = 5,

        /// <summary>
        /// <para>A signal that the system sends to all console processes when the 
        /// system is shutting down.</para>
        /// <para>Note that this signal is received only by services. Interactive 
        /// applications are terminated at logoff, so they are not present when 
        /// the system sends this signal. Services also have their own notification 
        /// mechanism for shutdown events.</para>
        /// </summary>
        CTRL_SHUTDOWN_EVENT = 6
    }
}
