Beispiel #1
0
 def insnstr(self, y, x, text, n, attr=None):
     text = _texttype(text)
     if attr is not None:
         attr_old = lib.getattrs(self._win)
         lib.wattrset(self._win, attr)
     if y is not None:
         code = lib.mvwinsnstr(self._win, y, x, text, n)
     else:
         code = lib.winsnstr(self._win, text, n)
     if attr is not None:
         lib.wattrset(self._win, attr_old)
     return _check_ERR(code, "insnstr")
Beispiel #2
0
 def insnstr(self, y, x, text, n, attr=None):
     text = _bytestype(text)
     if attr is not None:
         attr_old = lib.getattrs(self._win)
         lib.wattrset(self._win, attr)
     if y is not None:
         code = lib.mvwinsnstr(self._win, y, x, text, n)
     else:
         code = lib.winsnstr(self._win, text, n)
     if attr is not None:
         lib.wattrset(self._win, attr_old)
     return _check_ERR(code, "insnstr")
Beispiel #3
0
 def insstr(self, y, x, text, attr=None):
     text = _convert_to_string(self, text)
     if attr is not None:
         attr_old = lib.getattrs(self._win)
         lib.wattrset(self._win, attr)
     if y is not None:
         code = lib.mvwinsstr(self._win, y, x, text)
     else:
         code = lib.winsstr(self._win, text)
     if attr is not None:
         lib.wattrset(self._win, attr_old)
     return _check_ERR(code, "insstr")
Beispiel #4
0
 def addstr(self, y, x, text, attr=None):
     text = _texttype(text)
     if attr is not None:
         attr_old = lib.getattrs(self._win)
         lib.wattrset(self._win, attr)
     if y is not None:
         code = lib.mvwaddstr(self._win, y, x, text)
     else:
         code = lib.waddstr(self._win, text)
     if attr is not None:
         lib.wattrset(self._win, attr_old)
     return _check_ERR(code, "addstr")
Beispiel #5
0
 def addstr(self, y, x, text, attr=None):
     text = _bytestype(text)
     if attr is not None:
         attr_old = lib.getattrs(self._win)
         lib.wattrset(self._win, attr)
     if y is not None:
         code = lib.mvwaddstr(self._win, y, x, text)
     else:
         code = lib.waddstr(self._win, text)
     if attr is not None:
         lib.wattrset(self._win, attr_old)
     return _check_ERR(code, "addstr")