Ho to implement new GSource?



Hello!

I'm working on MT application, which perform some tasks in separated
threads. My application also use GTK+ and it should work on Windows, so I
need to deal somehow with running all functions, which change GUI from one
thread.

I run one thread with GTK's main loop and i want to implement new source,
which will check GAsysnQueue for new elements (passed to it by other
threads) and perform some actions (like updating progress bars).

I went to GLib documentation and i stuck there. I'm unable to figure out how
main loop works and how can I correctly implement new source type. I cannot
use idle source, because I want to check my async queue more often. On the
other hand I want to understand how main loop works in GLib.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]