Ejemplo n.º 1
0
        /// <summary>
        /// Initializes Curses Sharp and the underlying curses implementation.
        /// </summary>
        ///
        /// <remarks>
        /// It should be the first function called as most other functions
        /// require the library be initialized.
        /// <para>
        /// The Window object returned can be later retrieved using
        /// <see cref="StdScr"/> property.
        /// </para>
        /// </remarks>
        /// <returns>The default Window object</returns>
        public static Window InitScr()
        {
            if (stdscr != null)
            {
                throw new InvalidOperationException("Curses is already initialized.");
            }

            stdscr = Window.WrapHandle(CursesMethods.initscr());
            curscr = Window.WrapHandle(CursesMethods.curscr());
            return(stdscr);
        }
Ejemplo n.º 2
0
 public static Window NewWindow()
 {
     return(Window.WrapHandle(CursesMethods.curscr()));
 }
Ejemplo n.º 3
0
 public static Window CurrentScreen()
 {
     return(Window.WrapHandle(CursesMethods.curscr()));
 }