* GDK and GTK+ functions can be called safely and without causing race
* conditions. Only one thread at a time can be in such a critial
* section.
+ *
+ * Deprecated:3.6: All GDK and GTK+ calls should be made from the main
+ * thread
*/
void
gdk_threads_enter (void)
* gdk_threads_leave:
*
* Leaves a critical region begun with gdk_threads_enter().
+ *
+ * Deprecated:3.6: All GDK and GTK+ calls should be made from the main
+ * thread
*/
void
gdk_threads_leave (void)
*
* This call must be made before any use of the main loop from
* GTK+; to be safe, call it before gtk_init().
+ *
+ * Deprecated:3.6: All GDK and GTK+ calls should be made from the main
+ * thread
*/
void
gdk_threads_init (void)
* This method must be called before gdk_threads_init(), and cannot
* be called multiple times.
*
+ * Deprecated:3.6: All GDK and GTK+ calls should be made from the main
+ * thread
+ *
* Since: 2.4
**/
void
G_BEGIN_DECLS
+#if defined(GDK_COMPILATION) || defined(GTK_COMPILATION)
+#define GDK_THREADS_DEPRECATED
+#else
+#define GDK_THREADS_DEPRECATED GDK_DEPRECATED_IN_3_6
+#endif
+
+GDK_THREADS_DEPRECATED
void gdk_threads_init (void);
+GDK_THREADS_DEPRECATED
void gdk_threads_enter (void);
+GDK_THREADS_DEPRECATED
void gdk_threads_leave (void);
+GDK_THREADS_DEPRECATED
void gdk_threads_set_lock_functions (GCallback enter_fn,
GCallback leave_fn);
GSourceFunc function,
gpointer data);
+
+#if !(GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_6)
+
/**
* GDK_THREADS_ENTER:
*
* section. The macro expands to a no-op if #G_THREADS_ENABLED has not
* been defined. Typically gdk_threads_enter() should be used instead of
* this macro.
+ *
+ * Deprecated:3.6: Use g_main_context_invoke(), g_idle_add() and related
+ * functions if you need to schedule GTK+ calls from other threads.
*/
#define GDK_THREADS_ENTER() gdk_threads_enter()
*
* This macro marks the end of a critical section
* begun with #GDK_THREADS_ENTER.
+ *
+ * Deprecated:3.6: Deprecated in 3.6.
*/
#define GDK_THREADS_LEAVE() gdk_threads_leave()
+#endif
+
+#undef GDK_THREADS_DEPRECATED
+
G_END_DECLS
#endif /* __GDK_THREADS_H__ */