/* Initialize structures for threaded operation. Must be called
 * after gtk_init() and before any GTK-using threads are created
 */
void gtk_threads_init (void);

/* Acquire the GTK+ lock. Call before doing any GTK operations.
 */
void gtk_threads_enter (void);

/* Release the GTK+ lock. Call when done with GTK operations.
 */
void gtk_threads_leave (void);

/* Replacement for gtk_main() when using threads
 */
void gtk_threads_main (void);

/* To unlock during a callback, surround it with a leave_main()
 * enter_main() pair.
 */
void gtk_threads_enter_main (void);
void gtk_threads_leave_main (void);
