# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _pyupm_st7735
else:
    import _pyupm_st7735

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)



def getVersion():
    return _pyupm_st7735.getVersion()
class uint8Array(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, nelements):
        _pyupm_st7735.uint8Array_swiginit(self, _pyupm_st7735.new_uint8Array(nelements))
    __swig_destroy__ = _pyupm_st7735.delete_uint8Array

    def __getitem__(self, index):
        return _pyupm_st7735.uint8Array___getitem__(self, index)

    def __setitem__(self, index, value):
        return _pyupm_st7735.uint8Array___setitem__(self, index, value)

    def cast(self):
        return _pyupm_st7735.uint8Array_cast(self)

    @staticmethod
    def frompointer(t):
        return _pyupm_st7735.uint8Array_frompointer(t)

# Register uint8Array in _pyupm_st7735:
_pyupm_st7735.uint8Array_swigregister(uint8Array)

def uint8Array_frompointer(t):
    return _pyupm_st7735.uint8Array_frompointer(t)

class GFX(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _pyupm_st7735.delete_GFX

    def setAddrWindow(self, x0, y0, x1, y1):
        return _pyupm_st7735.GFX_setAddrWindow(self, x0, y0, x1, y1)

    def drawPixel(self, x, y, color):
        return _pyupm_st7735.GFX_drawPixel(self, x, y, color)

    def refresh(self):
        return _pyupm_st7735.GFX_refresh(self)

    def drawChar(self, x, y, data, color, bg, size):
        return _pyupm_st7735.GFX_drawChar(self, x, y, data, color, bg, size)

    def _print(self, msg):
        return _pyupm_st7735.GFX__print(self, msg)

    def setPixel(self, x, y, color):
        return _pyupm_st7735.GFX_setPixel(self, x, y, color)

    def fillScreen(self, color):
        return _pyupm_st7735.GFX_fillScreen(self, color)

    def fillRect(self, x, y, w, h, color):
        return _pyupm_st7735.GFX_fillRect(self, x, y, w, h, color)

    def drawFastVLine(self, x, y, h, color):
        return _pyupm_st7735.GFX_drawFastVLine(self, x, y, h, color)

    def drawLine(self, x0, y0, x1, y1, color):
        return _pyupm_st7735.GFX_drawLine(self, x0, y0, x1, y1, color)

    def drawTriangle(self, x0, y0, x1, y1, x2, y2, color):
        return _pyupm_st7735.GFX_drawTriangle(self, x0, y0, x1, y1, x2, y2, color)

    def drawCircle(self, x, y, r, color):
        return _pyupm_st7735.GFX_drawCircle(self, x, y, r, color)

    def setCursor(self, x, y):
        return _pyupm_st7735.GFX_setCursor(self, x, y)

    def setTextColor(self, textColor, textBGColor):
        return _pyupm_st7735.GFX_setTextColor(self, textColor, textBGColor)

    def setTextSize(self, size):
        return _pyupm_st7735.GFX_setTextSize(self, size)

    def setTextWrap(self, wrap):
        return _pyupm_st7735.GFX_setTextWrap(self, wrap)
    m_height = property(_pyupm_st7735.GFX_m_height_get, _pyupm_st7735.GFX_m_height_set)
    m_width = property(_pyupm_st7735.GFX_m_width_get, _pyupm_st7735.GFX_m_width_set)
    m_textSize = property(_pyupm_st7735.GFX_m_textSize_get, _pyupm_st7735.GFX_m_textSize_set)
    m_textColor = property(_pyupm_st7735.GFX_m_textColor_get, _pyupm_st7735.GFX_m_textColor_set)
    m_textBGColor = property(_pyupm_st7735.GFX_m_textBGColor_get, _pyupm_st7735.GFX_m_textBGColor_set)
    m_cursorX = property(_pyupm_st7735.GFX_m_cursorX_get, _pyupm_st7735.GFX_m_cursorX_set)
    m_cursorY = property(_pyupm_st7735.GFX_m_cursorY_get, _pyupm_st7735.GFX_m_cursorY_set)
    m_wrap = property(_pyupm_st7735.GFX_m_wrap_get, _pyupm_st7735.GFX_m_wrap_set)
    m_map = property(_pyupm_st7735.GFX_m_map_get, _pyupm_st7735.GFX_m_map_set)

# Register GFX in _pyupm_st7735:
_pyupm_st7735.GFX_swigregister(GFX)

INITR_GREENTAB = _pyupm_st7735.INITR_GREENTAB
INITR_REDTAB = _pyupm_st7735.INITR_REDTAB
INITR_BLACKTAB = _pyupm_st7735.INITR_BLACKTAB
ST7735_TFTWIDTH = _pyupm_st7735.ST7735_TFTWIDTH
ST7735_TFTHEIGHT = _pyupm_st7735.ST7735_TFTHEIGHT
ST7735_NOP = _pyupm_st7735.ST7735_NOP
ST7735_SWRESET = _pyupm_st7735.ST7735_SWRESET
ST7735_RDDID = _pyupm_st7735.ST7735_RDDID
ST7735_RDDST = _pyupm_st7735.ST7735_RDDST
ST7735_SLPIN = _pyupm_st7735.ST7735_SLPIN
ST7735_SLPOUT = _pyupm_st7735.ST7735_SLPOUT
ST7735_PTLON = _pyupm_st7735.ST7735_PTLON
ST7735_NORON = _pyupm_st7735.ST7735_NORON
ST7735_INVOFF = _pyupm_st7735.ST7735_INVOFF
ST7735_INVON = _pyupm_st7735.ST7735_INVON
ST7735_DISPOFF = _pyupm_st7735.ST7735_DISPOFF
ST7735_DISPON = _pyupm_st7735.ST7735_DISPON
ST7735_CASET = _pyupm_st7735.ST7735_CASET
ST7735_RASET = _pyupm_st7735.ST7735_RASET
ST7735_RAMWR = _pyupm_st7735.ST7735_RAMWR
ST7735_RAMRD = _pyupm_st7735.ST7735_RAMRD
ST7735_PTLAR = _pyupm_st7735.ST7735_PTLAR
ST7735_COLMOD = _pyupm_st7735.ST7735_COLMOD
ST7735_MADCTL = _pyupm_st7735.ST7735_MADCTL
ST7735_FRMCTR1 = _pyupm_st7735.ST7735_FRMCTR1
ST7735_FRMCTR2 = _pyupm_st7735.ST7735_FRMCTR2
ST7735_FRMCTR3 = _pyupm_st7735.ST7735_FRMCTR3
ST7735_INVCTR = _pyupm_st7735.ST7735_INVCTR
ST7735_DISSET5 = _pyupm_st7735.ST7735_DISSET5
ST7735_PWCTR1 = _pyupm_st7735.ST7735_PWCTR1
ST7735_PWCTR2 = _pyupm_st7735.ST7735_PWCTR2
ST7735_PWCTR3 = _pyupm_st7735.ST7735_PWCTR3
ST7735_PWCTR4 = _pyupm_st7735.ST7735_PWCTR4
ST7735_PWCTR5 = _pyupm_st7735.ST7735_PWCTR5
ST7735_VMCTR1 = _pyupm_st7735.ST7735_VMCTR1
ST7735_RDID1 = _pyupm_st7735.ST7735_RDID1
ST7735_RDID2 = _pyupm_st7735.ST7735_RDID2
ST7735_RDID3 = _pyupm_st7735.ST7735_RDID3
ST7735_RDID4 = _pyupm_st7735.ST7735_RDID4
ST7735_PWCTR6 = _pyupm_st7735.ST7735_PWCTR6
ST7735_GMCTRP1 = _pyupm_st7735.ST7735_GMCTRP1
ST7735_GMCTRN1 = _pyupm_st7735.ST7735_GMCTRN1
ST7735_BLACK = _pyupm_st7735.ST7735_BLACK
ST7735_BLUE = _pyupm_st7735.ST7735_BLUE
ST7735_RED = _pyupm_st7735.ST7735_RED
ST7735_GREEN = _pyupm_st7735.ST7735_GREEN
ST7735_CYAN = _pyupm_st7735.ST7735_CYAN
ST7735_MAGENTA = _pyupm_st7735.ST7735_MAGENTA
ST7735_YELLOW = _pyupm_st7735.ST7735_YELLOW
ST7735_WHITE = _pyupm_st7735.ST7735_WHITE
HIGH = _pyupm_st7735.HIGH
LOW = _pyupm_st7735.LOW
DELAY = _pyupm_st7735.DELAY
class ST7735(GFX):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, csLCD, cSD, rs, rst):
        _pyupm_st7735.ST7735_swiginit(self, _pyupm_st7735.new_ST7735(csLCD, cSD, rs, rst))

    def name(self):
        return _pyupm_st7735.ST7735_name(self)

    def initModule(self):
        return _pyupm_st7735.ST7735_initModule(self)

    def configModule(self):
        return _pyupm_st7735.ST7735_configModule(self)

    def write(self, value):
        return _pyupm_st7735.ST7735_write(self, value)

    def data(self, value):
        return _pyupm_st7735.ST7735_data(self, value)

    def executeCMDList(self, addr):
        return _pyupm_st7735.ST7735_executeCMDList(self, addr)

    def setAddrWindow(self, x0, y0, x1, y1):
        return _pyupm_st7735.ST7735_setAddrWindow(self, x0, y0, x1, y1)

    def drawPixel(self, x, y, color):
        return _pyupm_st7735.ST7735_drawPixel(self, x, y, color)

    def refresh(self):
        return _pyupm_st7735.ST7735_refresh(self)

    def lcdCSOn(self):
        return _pyupm_st7735.ST7735_lcdCSOn(self)

    def lcdCSOff(self):
        return _pyupm_st7735.ST7735_lcdCSOff(self)

    def sdCSOn(self):
        return _pyupm_st7735.ST7735_sdCSOn(self)

    def sdCSOff(self):
        return _pyupm_st7735.ST7735_sdCSOff(self)

    def rsHIGH(self):
        return _pyupm_st7735.ST7735_rsHIGH(self)

    def rsLOW(self):
        return _pyupm_st7735.ST7735_rsLOW(self)
    m_map = property(_pyupm_st7735.ST7735_m_map_get, _pyupm_st7735.ST7735_m_map_set)
    __swig_destroy__ = _pyupm_st7735.delete_ST7735

# Register ST7735 in _pyupm_st7735:
_pyupm_st7735.ST7735_swigregister(ST7735)
cvar = _pyupm_st7735.cvar
Bcmd = cvar.Bcmd
Rcmd1 = cvar.Rcmd1
Rcmd2green = cvar.Rcmd2green
Rcmd2red = cvar.Rcmd2red
Rcmd3 = cvar.Rcmd3
font = cvar.font



