diff options
author | Owen Taylor <otaylor@redhat.com> | 1998-12-16 20:09:30 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-12-16 20:09:30 +0000 |
commit | fcfe7370d8a9ac7b169282418e4f2bc58e6d9eb4 (patch) | |
tree | b1629251195a04377d72cbb49a90af3db3c18afb /gdk/gdk.h | |
parent | 0dcdac5828bfb039f0a35be2d21fd6b3b8750d4c (diff) | |
download | gdk-pixbuf-fcfe7370d8a9ac7b169282418e4f2bc58e6d9eb4.tar.gz |
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:
Diffstat (limited to 'gdk/gdk.h')
-rw-r--r-- | gdk/gdk.h | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -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> |