# Path: libxyz/const.py
# PROG = u"XYZCommander"
# HOMEPAGE = u"xyzcmd.syhpoon.name"
# USER_DIR = u".xyzcmd"
# SYSTEM_PREFIX = os.getenv("XYZCMD_PREFIX", sys.prefix)
# SYSTEM_DIR = os.path.join(SYSTEM_PREFIX, "share/xyzcmd")
# CONF_DIR = u"conf"
# PLUGINS_DIR = u"plugins"
# SKINS_DIR = u"skins"
# LOCALE_DIR = u"locale"
# VFS_DRIVERS_DIR = u"vfs"
# XYZ_CONF_FILE = u"main.xyz"
# KEYS_CONF_FILE = u"keys.xyz"
# PLUGINS_CONF_FILE = u"plugins.xyz"
# ACTIONS_CONF_FILE = u"actions.xyz"
# ALIASES_CONF_FILE = u"aliases.xyz"
# ICMD_CONF_FILE = u"icmd.xyz"
# VFS_CONF_FILE = u"vfs.xyz"
# HOOKS_CONF_FILE = u"hooks.xyz"
# DEFAULT_SKIN = u"seablue"
# DEFAULT_DISPLAY_DRIVER = u"raw"
# 
# Path: libxyz/exceptions.py
# class XYZValueError(XYZError):
#     pass
# 
# Path: libxyz/ui/display.py
# def is_lowui_ge_0_9_9():
#     if hasattr(urwid, "VERSION") and urwid.VERSION >= (0, 9, 9):
#         return True
#     else:
#         return False


import copy
import re
from libxyz import const
from libxyz.exceptions import XYZValueError
from libxyz.ui.display import is_lowui_ge_0_9_9

        self.fg = fg
        self.bg = bg
        self.fg_attrs = fg_attrs
        self.mono = mono
        self.fg_high = fg_high
        self.bg_high = bg_high

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def _fg_get(self):
        return self._fg

    def _fg_set(self, fg):
        if fg is not None and not isinstance(fg, Foreground):
            raise XYZValueError(_(u"Invalid argument type %s, "\
                                  u"libxyz.ui.color.Foreground instance "\
                                  u"expected.") % type(fg))
        else:
            self._fg = fg

    fg = property(_fg_get, _fg_set)

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def _bg_get(self):
        return self._bg

    def _bg_set(self, bg):
        if bg is not None and not isinstance(bg, Background):

# Path: libxyz/const.py
# PROG = u"XYZCommander"
# HOMEPAGE = u"xyzcmd.syhpoon.name"
# USER_DIR = u".xyzcmd"
# SYSTEM_PREFIX = os.getenv("XYZCMD_PREFIX", sys.prefix)
# SYSTEM_DIR = os.path.join(SYSTEM_PREFIX, "share/xyzcmd")
# CONF_DIR = u"conf"
# PLUGINS_DIR = u"plugins"
# SKINS_DIR = u"skins"
# LOCALE_DIR = u"locale"
# VFS_DRIVERS_DIR = u"vfs"
# XYZ_CONF_FILE = u"main.xyz"
# KEYS_CONF_FILE = u"keys.xyz"
# PLUGINS_CONF_FILE = u"plugins.xyz"
# ACTIONS_CONF_FILE = u"actions.xyz"
# ALIASES_CONF_FILE = u"aliases.xyz"
# ICMD_CONF_FILE = u"icmd.xyz"
# VFS_CONF_FILE = u"vfs.xyz"
# HOOKS_CONF_FILE = u"hooks.xyz"
# DEFAULT_SKIN = u"seablue"
# DEFAULT_DISPLAY_DRIVER = u"raw"
# 
# Path: libxyz/exceptions.py
# class XYZValueError(XYZError):
#     pass
# 
# Path: libxyz/ui/display.py
# def is_lowui_ge_0_9_9():
#     if hasattr(urwid, "VERSION") and urwid.VERSION >= (0, 9, 9):
#         return True
#     else:
#         return False


# Path: libxyz/ui/colors.py
import copy
import re
from libxyz import const
from libxyz.exceptions import XYZValueError
from libxyz.ui.display import is_lowui_ge_0_9_9


        self.fg = fg
        self.bg = bg
        self.fg_attrs = fg_attrs
        self.mono = mono
        self.fg_high = fg_high
        self.bg_high = bg_high

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def _fg_get(self):
        return self._fg

    def _fg_set(self, fg):
        if fg is not None and not isinstance(fg, Foreground):
            raise XYZValueError(_(u"Invalid argument type %s, "\
                                  u"libxyz.ui.color.Foreground instance "\
                                  u"expected.") % type(fg))
        else:
            self._fg = fg

    fg = property(_fg_get, _fg_set)

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def _bg_get(self):
        return self._bg

    def _bg_set(self, bg):
        if bg is not None and not isinstance(bg, Background):

            raise XYZValueError(_(u"Invalid argument type %s, "\