* First steps of ConPty support * Added resize functionality * fix cwd, args, hide console window * Handle shell process exited * Make ConPTY optional
24 lines
740 B
C#
24 lines
740 B
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace FluentTerminal.SystemTray.Native
|
|
{
|
|
public static class WindowApi
|
|
{
|
|
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_MINIMIZE = 6;
|
|
public const int SW_RESTORE = 9;
|
|
public const int SW_SHOWDEFAULT = 10;
|
|
|
|
[DllImport("user32.dll")]
|
|
public static extern IntPtr GetWindowThreadProcessId(IntPtr hWnd, out uint ProcessId);
|
|
|
|
[DllImport("user32.dll")]
|
|
public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
|
|
}
|
|
}
|