avoiding gtk_main() ?

I got a huge problem. I am building a graphicengine for a friend.
The shared libary i am building includes following functions.

"StartGraphicEngine" ... inits window,canvas,... and calls gtk_main()
"puttext(text,x,y,..)" ... puts a gnome_canvas_text at x,y
"StopGraphicEngine"    ... frees all alocated memory and calls 						  

The functions are working but my problem is that when i call gtk_main() my
program stops and only waits for signals. This is what i want to avoid. I
imagine the libary this way that when he calls "StartGraphicEngine()"
then the window apears. Then he can call "puttext(..)", "putimage(..)", ..
until he calls "StopGraphicEngine()" 

I tried to call "gtk_main()" in a p_thread but this makes the program
unstable and i am not able to quit my program.

I am new in programing gtk/gnome so could anybody help or give me other
solutions how to slove my problem.

thanx !

Sent through Global Message Exchange - http://www.gmx.net

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