GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Nov 27, 2014 12:12 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Threads in GTK 3+
PostPosted: Thu Jul 17, 2014 5:50 pm 
Offline
Familiar Face

Joined: Wed Apr 20, 2011 10:00 am
Posts: 10
So before we used gtk_thread_start and gtk_thread_leave but all of them are depreceated so now we should use g_idle_add? Or what is the newest way to GTK Threads and manipulating widgets inside them?


Top
 Profile  
 
 Post subject: Re: Threads in GTK 3+
PostPosted: Sat Jul 19, 2014 11:02 am 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 780
Location: UK
Hello,

The gdk_threads_enter(), gdk_threads_leave() and related functions are all deprecated and should not be used in new code. As a note these functions would only work for the X11 back end, so are not portable to other systems.

From the documentation
Quote:
All GDK and GTK+ calls should be made from the main thread


There are many ways to pass information between the worker threads and the main GUI thread this does include using g_idle_add().

_________________
E.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group