Exemple #1
0
def initscr():
    if _initialised:
        lib.wrefresh(lib.stdscr)
        return Window(lib.stdscr)

    win = _check_NULL(lib.initscr())
    globals()['_initialised_setupterm'] = True
    globals()['_initialised'] = True

    _map_acs()

    globals()["LINES"] = lib.LINES
    globals()["COLS"] = lib.COLS

    return Window(win)
Exemple #2
0
def initscr():
    if _initialised:
        lib.wrefresh(lib.stdscr)
        return Window(lib.stdscr)

    win = _check_NULL(lib.initscr())
    globals()['_initialised_setupterm'] = True
    globals()['_initialised'] = True

    _map_acs()

    globals()["LINES"] = lib.LINES
    globals()["COLS"] = lib.COLS

    return Window(win)
Exemple #3
0
 def refresh(self, *args):
     if lib._m_ispad(self._win):
         if len(args) != 6:
             raise error("noutrefresh() called for a pad requires 6 arguments")
         return _check_ERR(lib.prefresh(self._win, *args), "prefresh")
     else:
         # XXX: Better args check here? We need zero args.
         return _check_ERR(lib.wrefresh(self._win, *args), "wrefresh")
Exemple #4
0
 def refresh(self, *args):
     if lib._m_ispad(self._win):
         if len(args) != 6:
             raise error(
                 "noutrefresh() called for a pad requires 6 arguments")
         return _check_ERR(lib.prefresh(self._win, *args), "prefresh")
     else:
         # XXX: Better args check here? We need zero args.
         return _check_ERR(lib.wrefresh(self._win, *args), "wrefresh")