mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-11 04:38:24 -06:00
As VS 2022 doesn't seem to store files with UTF-8 BOM as often anymore, we've been getting more and more pull requests which seemingly randomly change files. This cleans the situation up by removing the BOM from all files that have one. Additionally, `Host.Tests.Feature.rc` was converted from UTF-16 to UTF-8.
24 lines
654 B
C#
24 lines
654 B
C#
using System.Runtime.InteropServices;
|
|
|
|
namespace GUIConsole.ConPTY.Native
|
|
{
|
|
/// <summary>
|
|
/// PInvoke signatures for Win32's Console API.
|
|
/// </summary>
|
|
static class ConsoleApi
|
|
{
|
|
[DllImport("kernel32.dll", SetLastError = true)]
|
|
internal static extern bool SetConsoleCtrlHandler(ConsoleEventDelegate callback, bool add);
|
|
internal delegate bool ConsoleEventDelegate(CtrlTypes ctrlType);
|
|
|
|
internal enum CtrlTypes : uint
|
|
{
|
|
CTRL_C_EVENT = 0,
|
|
CTRL_BREAK_EVENT,
|
|
CTRL_CLOSE_EVENT,
|
|
CTRL_LOGOFF_EVENT = 5,
|
|
CTRL_SHUTDOWN_EVENT
|
|
}
|
|
}
|
|
}
|