From 25376da8de2bb891fdfa134b514940b7068780b4 Mon Sep 17 00:00:00 2001 From: Carver Harrison Date: Sat, 14 Jan 2017 14:00:16 -0800 Subject: [PATCH] Added Comments (3) Auto gen by mono --- ShiftOS.WinForms/Commands.cs | 131 ++++++++++++++++++++++++++++++++++- 1 file changed, 128 insertions(+), 3 deletions(-) diff --git a/ShiftOS.WinForms/Commands.cs b/ShiftOS.WinForms/Commands.cs index dd0dc90..a0a1692 100644 --- a/ShiftOS.WinForms/Commands.cs +++ b/ShiftOS.WinForms/Commands.cs @@ -33,24 +33,53 @@ using System.Diagnostics; using System.Runtime.InteropServices; using System.Threading; +/// +/// Coherence commands. +/// namespace ShiftOS.WinForms { [Namespace("coherence")] [RequiresUpgrade("kernel_coherence")] public static class CoherenceCommands { + /// + /// Sets the window position. + /// + /// The window position. + /// H window. + /// H window insert after. + /// X. + /// Y. + /// Cx. + /// Cy. + /// U flags. [DllImport("user32.dll")] static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags); + /// + /// The HWN d TOPMOS. + /// static readonly IntPtr HWND_TOPMOST = new IntPtr(-1); + + /// + /// The SW p SHOWWINDO. + /// const UInt32 SWP_SHOWWINDOW = 0x0040; - [DllImport("user32.dll")] + /// + /// Gets the window rect. + /// + /// The window rect. + /// H window. + /// Lp rect. [return: MarshalAs(UnmanagedType.Bool)] public static extern bool GetWindowRect(IntPtr hWnd, ref RECT lpRect); + /// + /// REC. + /// [StructLayout(LayoutKind.Sequential)] public struct RECT { @@ -62,6 +91,11 @@ namespace ShiftOS.WinForms [Command("launch", "process: \"C:\\path\\to\\process\" - The process path to launch.", "Launch a process inside kernel coherence.")] [RequiresArgument("process")] + /// + /// Launchs the app. + /// + /// The app. + /// Arguments. public static bool LaunchApp(Dictionary args) { string process = args["process"].ToString(); @@ -70,6 +104,11 @@ namespace ShiftOS.WinForms return true; } + /// + /// Starts the coherence. + /// + /// The coherence. + /// Prc. private static void StartCoherence(Process prc) { RECT rct = new RECT(); @@ -93,26 +132,112 @@ namespace ShiftOS.WinForms } + /// + /// The W s BORDE. + /// const int WS_BORDER = 8388608; + + /// + /// The W s DLGFRAM. + /// const int WS_DLGFRAME = 4194304; + + /// + /// The W s CAPTIO. + /// const int WS_CAPTION = WS_BORDER | WS_DLGFRAME; + + /// + /// The W s SYSMEN. + /// const int WS_SYSMENU = 524288; + + /// + /// The W s THICKFRAM. + /// const int WS_THICKFRAME = 262144; + + /// + /// The W s MINIMIZ. + /// const int WS_MINIMIZE = 536870912; + + /// + /// The W s MAXIMIZEBO. + /// const int WS_MAXIMIZEBOX = 65536; + + /// + /// The GW l STYL. + /// const int GWL_STYLE = -16; + + /// + /// The GW l EXSTYL. + /// const int GWL_EXSTYLE = -20; + + /// + /// The W s E x DLGMODALFRAM. + /// const int WS_EX_DLGMODALFRAME = 0x1; + + /// + /// The SW p NOMOV. + /// const int SWP_NOMOVE = 0x2; + + /// + /// The SW p NOSIZ. + /// const int SWP_NOSIZE = 0x1; + + /// + /// The SW p FRAMECHANGE. + /// const int SWP_FRAMECHANGED = 0x20; + + /// + /// The M f BYPOSITIO. + /// const uint MF_BYPOSITION = 0x400; + + /// + /// The M f REMOV. + /// const uint MF_REMOVE = 0x1000; + + /// + /// Gets the window long. + /// + /// The window long. + /// H window. + /// N index. [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)] public static extern int GetWindowLong(IntPtr hWnd, int nIndex); - [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)] + + /// + /// Sets the window long. + /// + /// The window long. + /// H window. + /// N index. + /// Dw new long. + [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)] public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); - [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)] + + /// + /// Sets the window position. + /// + /// The window position. + /// H window. + /// H window insert after. + /// X. + /// Y. + /// Cx. + /// Cy. + /// U flags. + [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)] public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags); public static void MakeExternalWindowBorderless(IntPtr MainWindowHandle) {