When the eventloop of prompt-toolkit is idle, call this inputhook. This will run the GTK main loop until the file descriptor `context.fileno()` becomes ready. :param context: An `InputHookContext` instance.
(context)
| 42 | gtk.gdk.threads_init() |
| 43 | |
| 44 | def inputhook(context): |
| 45 | """ |
| 46 | When the eventloop of prompt-toolkit is idle, call this inputhook. |
| 47 | |
| 48 | This will run the GTK main loop until the file descriptor |
| 49 | `context.fileno()` becomes ready. |
| 50 | |
| 51 | :param context: An `InputHookContext` instance. |
| 52 | """ |
| 53 | def _main_quit(*a, **kw): |
| 54 | gtk.main_quit() |
| 55 | return False |
| 56 | |
| 57 | gobject.io_add_watch(context.fileno(), gobject.IO_IN, _main_quit) |
| 58 | gtk.main() |
nothing calls this directly
no outgoing calls
no test coverage detected