Re: accessing widgets from different threads
- From: Christopher Lang <christopher lang acurana de>
- To: gtkmm-list gnome org
- Subject: Re: accessing widgets from different threads
- Date: Sat, 13 Dec 2008 21:46:29 +0100
Chris,
here is a dispatcher example:
http://www.c-plusplus.de/forum/viewtopic-var-p-is-816067.html
Chris
http://www.acurana.de/
Am Samstag, 13. Dezember 2008 19:10 schrieb Christopher Harvey:
> Hi list,
> I've got a gtksourceview widget (but this post isn't about the fact that
> it's gtksourceview widget, it could be any widget) and I'd like to run
> some regular expressions on the text in the source buffer when the user
> isn't typing. I'd like the regular expressions to run in a separate
> thread to keep the application responsive. So the questions is: how can
> I get the text out of a widget when the user could be typing in it any
> any time? I know I have to serialize access to the widget but when there
> is another thread doing all of the GUI interaction I don't see how I can
> tell it to not deal with a given widget at any given moment. I only need
> to stop the GUI thread so I can get a copy of the current text buffer,
> but I'm afraid at that moment of the copy the user may hit a key and
> break something in the widget.
>
> I can't just get a copy of the source every time the user hits a key and
> changes the text because that would be too much copying. I need to wait
> a second or two after the user has stopped typing then get the copy.
>
> thanks,
> Chris.
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]