# 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_ssd1351
else:
    import _pyupm_ssd1351

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_ssd1351.getVersion()
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_ssd1351.delete_GFX

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

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

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

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

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

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

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

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

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

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

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

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

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

    def setTextWrap(self, wrap):
        return _pyupm_ssd1351.GFX_setTextWrap(self, wrap)

# Register GFX in _pyupm_ssd1351:
_pyupm_ssd1351.GFX_swigregister(GFX)
cvar = _pyupm_ssd1351.cvar
font = cvar.font

SSD1351WIDTH = _pyupm_ssd1351.SSD1351WIDTH
SSD1351HEIGHT = _pyupm_ssd1351.SSD1351HEIGHT
SSD1351_CMD_SETCOLUMN = _pyupm_ssd1351.SSD1351_CMD_SETCOLUMN
SSD1351_CMD_SETROW = _pyupm_ssd1351.SSD1351_CMD_SETROW
SSD1351_CMD_WRITERAM = _pyupm_ssd1351.SSD1351_CMD_WRITERAM
SSD1351_CMD_READRAM = _pyupm_ssd1351.SSD1351_CMD_READRAM
SSD1351_CMD_SETREMAP = _pyupm_ssd1351.SSD1351_CMD_SETREMAP
SSD1351_CMD_STARTLINE = _pyupm_ssd1351.SSD1351_CMD_STARTLINE
SSD1351_CMD_DISPLAYOFFSET = _pyupm_ssd1351.SSD1351_CMD_DISPLAYOFFSET
SSD1351_CMD_DISPLAYALLOFF = _pyupm_ssd1351.SSD1351_CMD_DISPLAYALLOFF
SSD1351_CMD_DISPLAYALLON = _pyupm_ssd1351.SSD1351_CMD_DISPLAYALLON
SSD1351_CMD_NORMALDISPLAY = _pyupm_ssd1351.SSD1351_CMD_NORMALDISPLAY
SSD1351_CMD_INVERTDISPLAY = _pyupm_ssd1351.SSD1351_CMD_INVERTDISPLAY
SSD1351_CMD_FUNCTIONSELECT = _pyupm_ssd1351.SSD1351_CMD_FUNCTIONSELECT
SSD1351_CMD_DISPLAYOFF = _pyupm_ssd1351.SSD1351_CMD_DISPLAYOFF
SSD1351_CMD_DISPLAYON = _pyupm_ssd1351.SSD1351_CMD_DISPLAYON
SSD1351_CMD_PRECHARGE = _pyupm_ssd1351.SSD1351_CMD_PRECHARGE
SSD1351_CMD_DISPLAYENHANCE = _pyupm_ssd1351.SSD1351_CMD_DISPLAYENHANCE
SSD1351_CMD_CLOCKDIV = _pyupm_ssd1351.SSD1351_CMD_CLOCKDIV
SSD1351_CMD_SETVSL = _pyupm_ssd1351.SSD1351_CMD_SETVSL
SSD1351_CMD_SETGPIO = _pyupm_ssd1351.SSD1351_CMD_SETGPIO
SSD1351_CMD_PRECHARGE2 = _pyupm_ssd1351.SSD1351_CMD_PRECHARGE2
SSD1351_CMD_SETGRAY = _pyupm_ssd1351.SSD1351_CMD_SETGRAY
SSD1351_CMD_USELUT = _pyupm_ssd1351.SSD1351_CMD_USELUT
SSD1351_CMD_PRECHARGELEVEL = _pyupm_ssd1351.SSD1351_CMD_PRECHARGELEVEL
SSD1351_CMD_VCOMH = _pyupm_ssd1351.SSD1351_CMD_VCOMH
SSD1351_CMD_CONTRASTABC = _pyupm_ssd1351.SSD1351_CMD_CONTRASTABC
SSD1351_CMD_CONTRASTMASTER = _pyupm_ssd1351.SSD1351_CMD_CONTRASTMASTER
SSD1351_CMD_MUXRATIO = _pyupm_ssd1351.SSD1351_CMD_MUXRATIO
SSD1351_CMD_COMMANDLOCK = _pyupm_ssd1351.SSD1351_CMD_COMMANDLOCK
SSD1351_CMD_HORIZSCROLL = _pyupm_ssd1351.SSD1351_CMD_HORIZSCROLL
SSD1351_CMD_STOPSCROLL = _pyupm_ssd1351.SSD1351_CMD_STOPSCROLL
SSD1351_CMD_STARTSCROLL = _pyupm_ssd1351.SSD1351_CMD_STARTSCROLL
HIGH = _pyupm_ssd1351.HIGH
LOW = _pyupm_ssd1351.LOW
BLOCKS = _pyupm_ssd1351.BLOCKS
class SSD1351(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, oc, dc, rst):
        _pyupm_ssd1351.SSD1351_swiginit(self, _pyupm_ssd1351.new_SSD1351(oc, dc, rst))
    __swig_destroy__ = _pyupm_ssd1351.delete_SSD1351

    def name(self):
        return _pyupm_ssd1351.SSD1351_name(self)

    def writeCommand(self, value):
        return _pyupm_ssd1351.SSD1351_writeCommand(self, value)

    def writeData(self, value):
        return _pyupm_ssd1351.SSD1351_writeData(self, value)

    def drawPixel(self, x, y, color):
        return _pyupm_ssd1351.SSD1351_drawPixel(self, x, y, color)

    def refresh(self):
        return _pyupm_ssd1351.SSD1351_refresh(self)

    def ocLow(self):
        return _pyupm_ssd1351.SSD1351_ocLow(self)

    def ocHigh(self):
        return _pyupm_ssd1351.SSD1351_ocHigh(self)

    def dcLow(self):
        return _pyupm_ssd1351.SSD1351_dcLow(self)

    def dcHigh(self):
        return _pyupm_ssd1351.SSD1351_dcHigh(self)

    def useMemoryMap(self, var):
        return _pyupm_ssd1351.SSD1351_useMemoryMap(self, var)

# Register SSD1351 in _pyupm_ssd1351:
_pyupm_ssd1351.SSD1351_swigregister(SSD1351)



