def addListener(self, listener, iface=None):
        if (isinstance(listener, IUserChangeListener) and
                (iface is None or issubclass(iface, IUserChangeListener))):
            self._userChangeListeners.append(listener)

        if (isinstance(listener, IWindowAttachListener) and
                (iface is None or issubclass(iface, IWindowAttachListener))):
            self._windowAttachListeners.append(listener)

        if (isinstance(listener, IWindowDetachListener) and
                (iface is None or issubclass(iface, IWindowDetachListener))):
            self._windowDetachListeners.append(listener)

        super(Application, self).addListener(listener, iface)
Adds the user change/window attach/window detach listener.
dataset/ETHPy150Open rwl/muntjac/muntjac/application.py/Application.addListener