# Path: pygaze/settings.py
# class Settings(object):
#     def __init__(self):
#     def read_module(self, mod):
#     def __getattr__(self, setting):
#     def __setattr__(self, setting, value):


from inspect import ismethod
from pygaze import settings

    arguments:
    src        --    source class (e.g. BaseDisplay)
    target    --    target class (e.g. PyGameDisplay)
    """
    
    for attr_name in dir(target):
        if not hasattr(src, attr_name) or not ismethod(getattr(src, attr_name)):
            continue
        getattr(target, attr_name).__func__.__doc__ = getattr(src, attr_name).__func__.__doc__


def pos2psychopos(pos, dispsize=None):

    """Returns a converted position tuple (x,y) (internal use)
    
    arguments
    pos        -- a (x,y) position tuple, assuming (0,0) is top left
    
    keyword arguments
    dispsize    -- a (width, height) tuple for the display resolution or None
               for autodetecting the size of current active window
               (default = None)
    
    returns
    pos        -- a (x,y) tuple that makes sense to PsychoPy (i.e. (0,0) is
               display center; bottom left is (-,-) and top right is
               (+,+))
    """

    if dispsize is None:

# Path: pygaze/settings.py
# class Settings(object):
#     def __init__(self):
#     def read_module(self, mod):
#     def __getattr__(self, setting):
#     def __setattr__(self, setting, value):


# Path: pygaze/_misc/misc.py
from inspect import ismethod
from pygaze import settings

    arguments:
    src        --    source class (e.g. BaseDisplay)
    target    --    target class (e.g. PyGameDisplay)
    """
    
    for attr_name in dir(target):
        if not hasattr(src, attr_name) or not ismethod(getattr(src, attr_name)):
            continue
        getattr(target, attr_name).__func__.__doc__ = getattr(src, attr_name).__func__.__doc__


def pos2psychopos(pos, dispsize=None):

    """Returns a converted position tuple (x,y) (internal use)
    
    arguments
    pos        -- a (x,y) position tuple, assuming (0,0) is top left
    
    keyword arguments
    dispsize    -- a (width, height) tuple for the display resolution or None
               for autodetecting the size of current active window
               (default = None)
    
    returns
    pos        -- a (x,y) tuple that makes sense to PsychoPy (i.e. (0,0) is
               display center; bottom left is (-,-) and top right is
               (+,+))
    """

    if dispsize is None:

        dispsize = settings.DISPSIZE[:]
