How to use the gbulb.glib_events.BaseGLibEventLoop function in gbulb

To help you get started, we’ve selected a few gbulb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github davidedmundson / telepathy-hangups / gbulb / glib_events.py View on Github external
def _new_default_loop(self):
        return GLibEventLoop(GLib.main_context_default())
github davidedmundson / telepathy-hangups / gbulb / glib_events.py View on Github external
def _new_default_loop(self):
            return GLibEventLoop(gtk=True)
github davidedmundson / telepathy-hangups / gbulb / glib_events.py View on Github external
self._check_signal(sig)
        try:
            self._sighandlers.pop(sig).cancel()
            return True

        except KeyError:
            return False

    def get_debug(self):
        pass

    def set_debug(self):
        pass

#TODO: move it into unix_events
GLibEventLoop = BaseGLibEventLoop


class _LoopImplem:
    def __init__(self, loop):
        self._loop = loop

    def run(self):
        raise NotImplementedError()

    def stop(self):
        raise NotImplementedError()

class _GLibLoopImplem(_LoopImplem):

    def __init__(self, loop):
        super().__init__(loop)
github davidedmundson / telepathy-hangups / gbulb / glib_events.py View on Github external
    @staticmethod
    def init_class():
        if not hasattr(BaseGLibEventLoop, "_default_sigint_handler"):
            BaseGLibEventLoop._default_sigint_handler = BaseGLibEventLoop.DefaultSigINTHandler()
github davidedmundson / telepathy-hangups / gbulb / glib_events.py View on Github external
def new_event_loop(self):
        if self._default and isinstance(threading.current_thread(), threading._MainThread):
            l = self.get_default_loop()
        elif self._full:
            l = GLibEventLoop()
        else:
            l = unix_events.DefaultEventLoopPolicy.new_event_loop(self._policy)

        return l