Move main thread lock back to GDK - we need it there for locking when
Wed Dec 16 13:06:17 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.[ch] gtk/gtkmain.[ch] gtk/gtkprivate.h: Move main thread lock back to GDK - we need it there for locking when translating events. Rename things appropriately. Wed Dec 16 11:44:21 1998 Owen Taylor <otaylor@redhat.com> * gtk/gtkrange.c (gtk_range_expose): Fix a x/y typo. CVS:
This commit is contained in:
21
gdk/gdk.h
21
gdk/gdk.h
@ -959,6 +959,27 @@ guint gdk_keyval_to_lower (guint keyval);
|
||||
gboolean gdk_keyval_is_upper (guint keyval);
|
||||
gboolean gdk_keyval_is_lower (guint keyval);
|
||||
|
||||
/* Threading
|
||||
*/
|
||||
|
||||
extern GMutex *gdk_threads_mutex;
|
||||
|
||||
void gdk_threads_enter (void);
|
||||
void gdk_threads_leave (void);
|
||||
|
||||
#ifdef G_THREADS_ENABLED
|
||||
# define GDK_THREADS_ENTER() G_STMT_START { \
|
||||
if (gdk_threads_mutex) \
|
||||
g_mutex_lock (gdk_threads_mutex); \
|
||||
} G_STMT_END
|
||||
# define GDK_THREADS_LEAVE() G_STMT_START { \
|
||||
if (gdk_threads_mutex) \
|
||||
g_mutex_unlock (gdk_threads_mutex); \
|
||||
} G_STMT_END
|
||||
#else /* !G_THREADS_ENABLED */
|
||||
# define GDK_THREADS_ENTER()
|
||||
# define GDK_THREADS_LEAVE()
|
||||
#endif /* !G_THREADS_ENABLED */
|
||||
|
||||
#include <gdk/gdkrgb.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user