# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# 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):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_pyupm_ssd1351')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_pyupm_ssd1351')
    _pyupm_ssd1351 = swig_import_helper()
    del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_pyupm_ssd1351', [dirname(__file__)])
        except ImportError:
            import _pyupm_ssd1351
            return _pyupm_ssd1351
        try:
            _mod = imp.load_module('_pyupm_ssd1351', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _pyupm_ssd1351 = swig_import_helper()
    del swig_import_helper
else:
    import _pyupm_ssd1351
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


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,)

try:
    _object = object
    _newclass = 1
except __builtin__.Exception:
    class _object:
        pass
    _newclass = 0


def getVersion():
    return _pyupm_ssd1351.getVersion()
getVersion = _pyupm_ssd1351.getVersion
class GFX(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, GFX, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, GFX, name)

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

    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)
GFX_swigregister = _pyupm_ssd1351.GFX_swigregister
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):
    __swig_setmethods__ = {}
    for _s in [GFX]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, SSD1351, name, value)
    __swig_getmethods__ = {}
    for _s in [GFX]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, SSD1351, name)
    __repr__ = _swig_repr

    def __init__(self, oc, dc, rst):
        this = _pyupm_ssd1351.new_SSD1351(oc, dc, rst)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_ssd1351.delete_SSD1351
    __del__ = lambda self: None

    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)
SSD1351_swigregister = _pyupm_ssd1351.SSD1351_swigregister
SSD1351_swigregister(SSD1351)

# This file is compatible with both classic and new-style classes.


