Jump to content
  • Advertisement
Sign in to follow this  
666_1337

overriding Motif / GTK+ main loop

This topic is 5168 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello I'm using Xlib (glX) for a larger scaled application that requires me to have my own (self-written) main loop. But I however require some kind of non-application-internal UI. I was thinking about Motif/Xt or GTK+, but they both require me to call their mainloop-function, which opens a forever-loop, and thereby don't make me able to continue with my own stuff. Is there a possibility to do all the drawing / eventprocessing in an own function, or do I NEED to call the mainloop function of the API ( Motif / gtk )?

Share this post


Link to post
Share on other sites
Advertisement
Depending on what kind of processing you need to do, you might be able to teach gtk's (actually glib's i believe) main loop to understand what to do with it.

For example, it's fairly easy to assign a function to be called whenever there is data to be read from a socket. Grab the source for netapplet to see a good example of this.

If you're talking about rendering 3d graphics or something, then yeah, you can use (naughty naughty!) gtk_main_iteration_do.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!