Example #1
0
    def chgat(self, y, x, num, attr=None):
        # These optional args are in a weird order.
        if attr is None:
            attr = num
            num = -1

        color = ((attr >> 8) & 0xff)
        attr = attr - (color << 8)

        if y is not None:
            code = lib.mvwchgat(self._win, y, x, num, attr, color, ffi.NULL)
            lib.touchline(self._win, y, 1)
        else:
            yy, _ = self.getyx()
            code = lib.wchgat(self._win, num, attr, color, ffi.NULL)
            lib.touchline(self._win, yy, 1)
        return _check_ERR(code, "chgat")
Example #2
0
    def chgat(self, y, x, num, attr=None):
        # These optional args are in a weird order.
        if attr is None:
            attr = num
            num = -1

        color = ((attr >> 8) & 0xff)
        attr = attr - (color << 8)

        if y is not None:
            code = lib.mvwchgat(self._win, y, x, num, attr, color, ffi.NULL)
            lib.touchline(self._win, y, 1)
        else:
            yy, _ = self.getyx()
            code = lib.wchgat(self._win, num, attr, color, ffi.NULL)
            lib.touchline(self._win, yy, 1)
        return _check_ERR(code, "chgat")
Example #3
0
 def touchline(self, st, cnt, val=None):
     if val is None:
         return _check_ERR(lib.touchline(self._win, st, cnt), "touchline")
     else:
         return _check_ERR(lib.wtouchln(self._win, st, cnt, val),
                           "touchline")
Example #4
0
 def touchline(self, st, cnt, val=None):
     if val is None:
         return _check_ERR(lib.touchline(self._win, st, cnt), "touchline")
     else:
         return _check_ERR(lib.wtouchln(self._win, st, cnt, val),
                           "touchline")