Right way to tap into the main loop
- From: Elias Bakken <elias bakken gmail com>
- To: "clutter-list gnome org" <clutter-list gnome org>
- Subject: Right way to tap into the main loop
- Date: Mon, 11 Aug 2014 00:20:08 +0200
Hi!
I'm using Python for this:
I'm in need of setting up a loop that checks for messages from a virtual TTY and displays the
message once it comes in. Since Clutter.main() hogs the main thread, setting up a normal thread from the main thread does nothing. Setting up a separate process circumvents this, but I see no way of
passing the message back to the main thread which has the stage handle etc.
Is it possible to use a ClutterEvent or signals for this?
I've managed to implement a working version using a time-line that signals a a check
for new messages every 0.1 seconds, but if would be way cleaner to have an actor or whatever
that emits a signal when a message is on queue.
Any takers for this? I guess really the question is how to subclass some event class and override or create a new signal method..
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]