# 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_lcd
else:
    import _pyupm_lcd

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_lcd.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_lcd.uint8Array_swiginit(self, _pyupm_lcd.new_uint8Array(nelements))
    __swig_destroy__ = _pyupm_lcd.delete_uint8Array

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

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

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

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

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

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

class LCD(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_lcd.delete_LCD

    def write(self, *args):
        return _pyupm_lcd.LCD_write(self, *args)

    def setCursor(self, row, column):
        return _pyupm_lcd.LCD_setCursor(self, row, column)

    def clear(self):
        return _pyupm_lcd.LCD_clear(self)

    def home(self):
        return _pyupm_lcd.LCD_home(self)

    def name(self):
        return _pyupm_lcd.LCD_name(self)

# Register LCD in _pyupm_lcd:
_pyupm_lcd.LCD_swigregister(LCD)

EBOLED_DEFAULT_SPI_BUS = _pyupm_lcd.EBOLED_DEFAULT_SPI_BUS
EBOLED_DEFAULT_CD = _pyupm_lcd.EBOLED_DEFAULT_CD
EBOLED_DEFAULT_RESET = _pyupm_lcd.EBOLED_DEFAULT_RESET
class EBOLED(LCD):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, spi=0, CD=36, reset=48):
        _pyupm_lcd.EBOLED_swiginit(self, _pyupm_lcd.new_EBOLED(spi, CD, reset))
    __swig_destroy__ = _pyupm_lcd.delete_EBOLED

    def refresh(self):
        return _pyupm_lcd.EBOLED_refresh(self)

    def write(self, msg):
        return _pyupm_lcd.EBOLED_write(self, msg)

    def setCursor(self, row, column):
        return _pyupm_lcd.EBOLED_setCursor(self, row, column)

    def setTextColor(self, textColor):
        return _pyupm_lcd.EBOLED_setTextColor(self, textColor)

    def setTextSize(self, size):
        return _pyupm_lcd.EBOLED_setTextSize(self, size)

    def setTextWrap(self, wrap):
        return _pyupm_lcd.EBOLED_setTextWrap(self, wrap)

    def drawChar(self, x, y, data, color, size):
        return _pyupm_lcd.EBOLED_drawChar(self, x, y, data, color, size)

    def clear(self):
        return _pyupm_lcd.EBOLED_clear(self)

    def clearScreenBuffer(self):
        return _pyupm_lcd.EBOLED_clearScreenBuffer(self)

    def home(self):
        return _pyupm_lcd.EBOLED_home(self)

    def drawPixel(self, *args):
        return _pyupm_lcd.EBOLED_drawPixel(self, *args)

    def drawLine(self, *args):
        return _pyupm_lcd.EBOLED_drawLine(self, *args)

    def drawLineHorizontal(self, *args):
        return _pyupm_lcd.EBOLED_drawLineHorizontal(self, *args)

    def drawLineVertical(self, *args):
        return _pyupm_lcd.EBOLED_drawLineVertical(self, *args)

    def drawRectangle(self, *args):
        return _pyupm_lcd.EBOLED_drawRectangle(self, *args)

    def drawRoundedRectangle(self, x, y, width, height, radius, color):
        return _pyupm_lcd.EBOLED_drawRoundedRectangle(self, x, y, width, height, radius, color)

    def drawRectangleFilled(self, *args):
        return _pyupm_lcd.EBOLED_drawRectangleFilled(self, *args)

    def drawTriangle(self, *args):
        return _pyupm_lcd.EBOLED_drawTriangle(self, *args)

    def drawTriangleFilled(self, x0, y0, x1, y1, x2, y2, color):
        return _pyupm_lcd.EBOLED_drawTriangleFilled(self, x0, y0, x1, y1, x2, y2, color)

    def drawCircle(self, *args):
        return _pyupm_lcd.EBOLED_drawCircle(self, *args)

    def drawRoundCorners(self, x0, y0, radius, cornername, color):
        return _pyupm_lcd.EBOLED_drawRoundCorners(self, x0, y0, radius, cornername, color)

    def drawCircleFilled(self, x0, y0, radius, color):
        return _pyupm_lcd.EBOLED_drawCircleFilled(self, x0, y0, radius, color)

    def drawRoundedCornersFilled(self, x0, y0, radius, cornername, delta, color):
        return _pyupm_lcd.EBOLED_drawRoundedCornersFilled(self, x0, y0, radius, cornername, delta, color)

    def fillScreen(self, *args):
        return _pyupm_lcd.EBOLED_fillScreen(self, *args)

# Register EBOLED in _pyupm_lcd:
_pyupm_lcd.EBOLED_swigregister(EBOLED)
cvar = _pyupm_lcd.cvar
COLOR_WHITE = cvar.COLOR_WHITE
COLOR_BLACK = cvar.COLOR_BLACK
COLOR_XOR = cvar.COLOR_XOR
OLED_WIDTH = cvar.OLED_WIDTH
VERT_COLUMNS = cvar.VERT_COLUMNS
OLED_HEIGHT = cvar.OLED_HEIGHT
BUFFER_SIZE = cvar.BUFFER_SIZE

class SSD1306(LCD):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, bus, address=0x3C):
        _pyupm_lcd.SSD1306_swiginit(self, _pyupm_lcd.new_SSD1306(bus, address))
    __swig_destroy__ = _pyupm_lcd.delete_SSD1306

    def draw(self, data, bytes):
        return _pyupm_lcd.SSD1306_draw(self, data, bytes)

    def write(self, msg):
        return _pyupm_lcd.SSD1306_write(self, msg)

    def setCursor(self, row, column):
        return _pyupm_lcd.SSD1306_setCursor(self, row, column)

    def clear(self):
        return _pyupm_lcd.SSD1306_clear(self)

    def home(self):
        return _pyupm_lcd.SSD1306_home(self)

    def invert(self, i):
        return _pyupm_lcd.SSD1306_invert(self, i)

    def startscrollright(self, start, stop):
        return _pyupm_lcd.SSD1306_startscrollright(self, start, stop)

    def startscrollleft(self, start, stop):
        return _pyupm_lcd.SSD1306_startscrollleft(self, start, stop)

    def startscrolldiagright(self, start, stop):
        return _pyupm_lcd.SSD1306_startscrolldiagright(self, start, stop)

    def startscrolldiagleft(self, start, stop):
        return _pyupm_lcd.SSD1306_startscrolldiagleft(self, start, stop)

    def stopscroll(self):
        return _pyupm_lcd.SSD1306_stopscroll(self)

    def dim(self, dim):
        return _pyupm_lcd.SSD1306_dim(self, dim)

# Register SSD1306 in _pyupm_lcd:
_pyupm_lcd.SSD1306_swigregister(SSD1306)
DISPLAY_CMD_SET_NORMAL_1306 = cvar.DISPLAY_CMD_SET_NORMAL_1306
SSD1306_SETCONTRAST = cvar.SSD1306_SETCONTRAST
SSD1306_DISPLAYALLON_RESUME = cvar.SSD1306_DISPLAYALLON_RESUME
SSD1306_DISPLAYALLON = cvar.SSD1306_DISPLAYALLON
DISPLAY_CMD_SET_INVERT_1306 = cvar.DISPLAY_CMD_SET_INVERT_1306
SSD1306_SETDISPLAYOFFSET = cvar.SSD1306_SETDISPLAYOFFSET
SSD1306_SETCOMPINS = cvar.SSD1306_SETCOMPINS
SSD1306_SETVCOMDETECT = cvar.SSD1306_SETVCOMDETECT
SSD1306_SETDISPLAYCLOCKDIV = cvar.SSD1306_SETDISPLAYCLOCKDIV
SSD1306_SETPRECHARGE = cvar.SSD1306_SETPRECHARGE
SSD1306_SETMULTIPLEX = cvar.SSD1306_SETMULTIPLEX
SSD1306_SETLOWCOLUM = cvar.SSD1306_SETLOWCOLUM
SSD1306_SETHIGHCOLUMN = cvar.SSD1306_SETHIGHCOLUMN
SSD1306_SETSTARTLINE = cvar.SSD1306_SETSTARTLINE
SSD1306_MEMORYMODE = cvar.SSD1306_MEMORYMODE
SSD1306_COLUMNADDR = cvar.SSD1306_COLUMNADDR
SSD1306_PAGEADDR = cvar.SSD1306_PAGEADDR
SSD1306_COMSCANINC = cvar.SSD1306_COMSCANINC
SSD1306_COMSCANDEC = cvar.SSD1306_COMSCANDEC
SSD1306_SEGREMAP = cvar.SSD1306_SEGREMAP
SSD1306_CHARGEPUMP = cvar.SSD1306_CHARGEPUMP
SSD1306_EXTERNALVCC = cvar.SSD1306_EXTERNALVCC
SSD1306_SWITCHCAPVCC = cvar.SSD1306_SWITCHCAPVCC
SSD1306_ACTIVATE_SCROLL = cvar.SSD1306_ACTIVATE_SCROLL
SSD1306_DEACTIVATE_SCROLL = cvar.SSD1306_DEACTIVATE_SCROLL
SSD1306_SET_VERTICAL_SCROLL_AREA = cvar.SSD1306_SET_VERTICAL_SCROLL_AREA
SSD1306_RIGHT_HORIZONTAL_SCROLL = cvar.SSD1306_RIGHT_HORIZONTAL_SCROLL
SSD1306_LEFT_HORIZONTAL_SCROLL = cvar.SSD1306_LEFT_HORIZONTAL_SCROLL
SSD1306_VERTICAL_AND_RIGHT_HORIZONTAL_SCROLL = cvar.SSD1306_VERTICAL_AND_RIGHT_HORIZONTAL_SCROLL
SSD1306_VERTICAL_AND_LEFT_HORIZONTAL_SCROLL = cvar.SSD1306_VERTICAL_AND_LEFT_HORIZONTAL_SCROLL
SSD1306_BLACK = cvar.SSD1306_BLACK
SSD1306_WHITE = cvar.SSD1306_WHITE
SSD1306_LCDWIDTH = cvar.SSD1306_LCDWIDTH
SSD1306_LCDHEIGHT = cvar.SSD1306_LCDHEIGHT

class SSD1308(LCD):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, bus, address=0x3C):
        _pyupm_lcd.SSD1308_swiginit(self, _pyupm_lcd.new_SSD1308(bus, address))
    __swig_destroy__ = _pyupm_lcd.delete_SSD1308

    def draw(self, data, bytes):
        return _pyupm_lcd.SSD1308_draw(self, data, bytes)

    def write(self, msg):
        return _pyupm_lcd.SSD1308_write(self, msg)

    def setCursor(self, row, column):
        return _pyupm_lcd.SSD1308_setCursor(self, row, column)

    def clear(self):
        return _pyupm_lcd.SSD1308_clear(self)

    def home(self):
        return _pyupm_lcd.SSD1308_home(self)

# Register SSD1308 in _pyupm_lcd:
_pyupm_lcd.SSD1308_swigregister(SSD1308)
DISPLAY_CMD_SET_NORMAL_1308 = cvar.DISPLAY_CMD_SET_NORMAL_1308

class SSD1327(LCD):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, bus, address=0x3C):
        _pyupm_lcd.SSD1327_swiginit(self, _pyupm_lcd.new_SSD1327(bus, address))
    __swig_destroy__ = _pyupm_lcd.delete_SSD1327

    def draw(self, data, bytes):
        return _pyupm_lcd.SSD1327_draw(self, data, bytes)

    def setGrayLevel(self, level):
        return _pyupm_lcd.SSD1327_setGrayLevel(self, level)

    def write(self, msg):
        return _pyupm_lcd.SSD1327_write(self, msg)

    def setCursor(self, row, column):
        return _pyupm_lcd.SSD1327_setCursor(self, row, column)

    def clear(self):
        return _pyupm_lcd.SSD1327_clear(self)

    def home(self):
        return _pyupm_lcd.SSD1327_home(self)

# Register SSD1327 in _pyupm_lcd:
_pyupm_lcd.SSD1327_swigregister(SSD1327)
DISPLAY_CMD_SET_NORMAL = cvar.DISPLAY_CMD_SET_NORMAL

HORIZONTAL = _pyupm_lcd.HORIZONTAL
VERTICAL = _pyupm_lcd.VERTICAL
PAGE = _pyupm_lcd.PAGE

DISPLAY_CMD_OFF = cvar.DISPLAY_CMD_OFF
DISPLAY_CMD_ON = cvar.DISPLAY_CMD_ON
BASE_LOW_COLUMN_ADDR = cvar.BASE_LOW_COLUMN_ADDR
BASE_HIGH_COLUMN_ADDR = cvar.BASE_HIGH_COLUMN_ADDR
BASE_PAGE_START_ADDR = cvar.BASE_PAGE_START_ADDR
DISPLAY_CMD_MEM_ADDR_MODE = cvar.DISPLAY_CMD_MEM_ADDR_MODE
BasicFont = cvar.BasicFont

