[ltk-user] Add an event in the ltk event queue
Thomas F. Burdick
thomas at burdick.fr
Tue Jun 5 14:15:29 UTC 2012
2012/4/28 Syll <syll-dev at laposte.net>
> Le Mon, 12 Mar 2012 21:51:02 +0100
> Syll <syll-dev at laposte.net> a écrit :
>
> > Hello
> >
> > Is it possible to add an event in the ltk event queue from another
> > thread ?
>
Possible? Yes. A good idea? Maybe not.
There is an ltk-connection object in *wish*, which has an event-queue slot,
containing any buffered events. If you were to add events there, they would
be processed as though they had come from the wish process.
However, pushing things onto that list won't cause the Ltk main loop to
process them; for that, its call to read-preserving-whitespace must return.
If you know your implementation well enough, this should be enough to get
you going. If you need more help, you probably shouldn't be messing with
the event queue.
> >
> > I can put events in a queue and use (after ...) to read it
> > periodically in the ltk thread, but it would be easier and more
> > efficient to use the ltk event queue directly.
> >
> > Thank you
> >
> > Syll
>
> Is this possible ?
>
> Syll
>
> _______________________________________________
> ltk-user site list
> ltk-user at common-lisp.net
> http://common-lisp.net/mailman/listinfo/ltk-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ltk-user/attachments/20120605/7e82ca36/attachment.html>
More information about the ltk-user
mailing list