Using different MainContexts for GTK widgets
- From: Nikolaj Kiær Thygesen <Nikolaj Thygesen ciber dk>
- To: <gtk-app-devel-list gnome org>
- Subject: Using different MainContexts for GTK widgets
- Date: Tue, 5 Jul 2005 13:25:08 +0200
Hi,
I am currently in the process of writing (actually porting) my first GTK program, which is heavily
multithreaded. Basically I wanted to create a unique MainLoop + MainContext combo for each thread. This, I
hoped, would dispatch Sources and GTK-widget-signals pertaining to a particular thread inside that very same
thread.
Now, after browsing through tons of links and a bit of source code, I begin to fear that all
GTK-widget-signals are dispatched "on" the one single default MainContext, which should be iterated in one
thread only. Is this correct?? It seems a MainLoop is little more than a reference to a MainContext, so
having one per thread makes little sense.
Can I make GTK-widgets "attach" themselves to my own MainContext??
Should/can I make a MainContext of my own choosing "grab" the input?? My (so far single-threaded) program
works fine until I start creating my personal MainContext adding it to the MainLoop. I guess custom
MainContexts are only usable for Sources??
I would really appreciate a bit of help on this matter.
Thanx - Nikolaj :o)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]