using Mindmagma.Curses; namespace SCI.CursesWrapper; public class CursesWrapper { /// /// Initializes NCurses and creates a screen /// public static nint InitNCurses () { var screen = NCurses.InitScreen (); NCurses.SetCursor (0); NCurses.NoEcho (); if (NCurses.HasColors ()) { NCurses.StartColor (); ColorSchemes.InitAll (); } return screen; } /// /// Get the total width of a window /// /// Window to query /// Width of window in columns public static int GetWidth (nint window) { NCurses.GetMaxYX (window, out int _, out int width); return width; } /// /// Get the total height of a window /// /// Window to query /// Height of window in rows public static int GetHeight (nint window) { NCurses.GetMaxYX (window, out int height, out int _); return height; } }