| 6 | |
| 7 | |
| 8 | class _InputHook: |
| 9 | def __init__(self, context): |
| 10 | self._quit = False |
| 11 | GLib.io_add_watch( |
| 12 | context.fileno(), GLib.PRIORITY_DEFAULT, GLib.IO_IN, self.quit |
| 13 | ) |
| 14 | |
| 15 | def quit(self, *args, **kwargs): |
| 16 | self._quit = True |
| 17 | return False |
| 18 | |
| 19 | def run(self): |
| 20 | context = GLib.MainContext.default() |
| 21 | while not self._quit: |
| 22 | context.iteration(True) |
| 23 | |
| 24 | |
| 25 | def inputhook(context): |
no outgoing calls
no test coverage detected
searching dependent graphs…