Re: gtk interface-less app



On Wed, May 21, 2003 at 12:53:10AM +0100, Rob Clews wrote:
> 
> I'm wanting to write an application that has no gui apart from using the
> notification area, this is fine but the program waits in a loop for
> connections and hence either gtk_main doesn't run or the loop doesn't
> run. Is there any non-blocking gtk_main() or a way around this?
> 

You need to either slave the listen for connections to the mainloop 
(e.g. with g_io_add_watch()) or slave the main loop to your own 
poll()/select() (by periodically calling g_main_iteration())

Havoc



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