diff options
author | Matthias Clasen <mclasen@redhat.com> | 2012-07-28 14:40:04 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2012-07-30 18:01:47 +0200 |
commit | 144a5687c9c5eae603ce7a105812daffed862fc1 (patch) | |
tree | ebe281f8f50493b6bc13a4edadf33b5572298e8d /gdk | |
parent | f92a092bac8ff4664ab6944c3493bf61d7974bd9 (diff) | |
download | gtk+-144a5687c9c5eae603ce7a105812daffed862fc1.tar.gz |
gdk: Don't use GDK_THREADS_ENTER/LEAVE macros internally
These are just wrappers for the functions, and we want to
deprecate them. Stopping to use them internally is a good
first step.
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/broadway/gdkeventsource.c | 12 | ||||
-rw-r--r-- | gdk/gdk.c | 6 | ||||
-rw-r--r-- | gdk/quartz/gdkeventloop-quartz.c | 12 | ||||
-rw-r--r-- | gdk/quartz/gdkevents-quartz.c | 4 | ||||
-rw-r--r-- | gdk/wayland/gdkeventsource.c | 4 | ||||
-rw-r--r-- | gdk/win32/gdkevents-win32.c | 12 | ||||
-rw-r--r-- | gdk/x11/gdkdisplay-x11.c | 4 | ||||
-rw-r--r-- | gdk/x11/gdkeventsource.c | 12 |
8 files changed, 34 insertions, 32 deletions
diff --git a/gdk/broadway/gdkeventsource.c b/gdk/broadway/gdkeventsource.c index 49a88823e4..14fa4793c0 100644 --- a/gdk/broadway/gdkeventsource.c +++ b/gdk/broadway/gdkeventsource.c @@ -58,12 +58,12 @@ gdk_event_source_prepare (GSource *source, GdkDisplay *display = ((GdkEventSource*) source)->display; gboolean retval; - GDK_THREADS_ENTER (); + gdk_threads_enter (); *timeout = -1; retval = (_gdk_event_queue_find_first (display) != NULL); - GDK_THREADS_LEAVE (); + gdk_threads_leave (); return retval; } @@ -74,14 +74,14 @@ gdk_event_source_check (GSource *source) GdkEventSource *event_source = (GdkEventSource*) source; gboolean retval; - GDK_THREADS_ENTER (); + gdk_threads_enter (); if (event_source->event_poll_fd.revents & G_IO_IN) retval = (_gdk_event_queue_find_first (event_source->display) != NULL); else retval = FALSE; - GDK_THREADS_LEAVE (); + gdk_threads_leave (); return retval; } @@ -353,7 +353,7 @@ gdk_event_source_dispatch (GSource *source, GdkDisplay *display = ((GdkEventSource*) source)->display; GdkEvent *event; - GDK_THREADS_ENTER (); + gdk_threads_enter (); event = gdk_display_get_event (display); @@ -364,7 +364,7 @@ gdk_event_source_dispatch (GSource *source, gdk_event_free (event); } - GDK_THREADS_LEAVE (); + gdk_threads_leave (); return TRUE; } @@ -24,6 +24,8 @@ #include "config.h" +#define GDK_DISABLE_DEPRECATION_WARNINGS 1 + #include "gdkmain.h" #include "gdkinternals.h" @@ -757,12 +759,12 @@ gdk_threads_dispatch (gpointer data) GdkThreadsDispatch *dispatch = data; gboolean ret = FALSE; - GDK_THREADS_ENTER (); + gdk_threads_enter (); if (!g_source_is_destroyed (g_main_current_source ())) ret = dispatch->func (dispatch->data); - GDK_THREADS_LEAVE (); + gdk_threads_leave (); return ret; } diff --git a/gdk/quartz/gdkeventloop-quartz.c b/gdk/quartz/gdkeventloop-quartz.c index 4181a5de24..4045234eea 100644 --- a/gdk/quartz/gdkeventloop-quartz.c +++ b/gdk/quartz/gdkeventloop-quartz.c @@ -616,14 +616,14 @@ gdk_event_prepare (GSource *source, { gboolean retval; - GDK_THREADS_ENTER (); + gdk_threads_enter (); *timeout = -1; retval = (_gdk_event_queue_find_first (_gdk_display) != NULL || _gdk_quartz_event_loop_check_pending ()); - GDK_THREADS_LEAVE (); + gdk_threads_leave (); return retval; } @@ -633,7 +633,7 @@ gdk_event_check (GSource *source) { gboolean retval; - GDK_THREADS_ENTER (); + gdk_threads_enter (); /* Refresh the autorelease pool if we're at the base CFRunLoop level * (indicated by current_loop_level) and the base g_main_loop level @@ -653,7 +653,7 @@ gdk_event_check (GSource *source) retval = (_gdk_event_queue_find_first (_gdk_display) != NULL || _gdk_quartz_event_loop_check_pending ()); - GDK_THREADS_LEAVE (); + gdk_threads_leave (); return retval; } @@ -665,7 +665,7 @@ gdk_event_dispatch (GSource *source, { GdkEvent *event; - GDK_THREADS_ENTER (); + gdk_threads_enter (); _gdk_quartz_display_queue_events (_gdk_display); @@ -678,7 +678,7 @@ gdk_event_dispatch (GSource *source, gdk_event_free (event); } - GDK_THREADS_LEAVE (); + gdk_threads_leave (); return TRUE; } diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c index ac60e3361e..4921fcd510 100644 --- a/gdk/quartz/gdkevents-quartz.c +++ b/gdk/quartz/gdkevents-quartz.c @@ -1478,9 +1478,9 @@ _gdk_quartz_display_queue_events (GdkDisplay *display) g_list_free_1 (node); gdk_event_free (event); - GDK_THREADS_LEAVE (); + gdk_threads_leave (); [NSApp sendEvent:nsevent]; - GDK_THREADS_ENTER (); + gdk_threads_enter (); } _gdk_quartz_event_loop_release_event (nsevent); diff --git a/gdk/wayland/gdkeventsource.c b/gdk/wayland/gdkeventsource.c index badbaaa2a0..f86a580295 100644 --- a/gdk/wayland/gdkeventsource.c +++ b/gdk/wayland/gdkeventsource.c @@ -68,7 +68,7 @@ gdk_event_source_dispatch(GSource *base, GdkDisplay *display = source->display; GdkEvent *event; - GDK_THREADS_ENTER (); + gdk_threads_enter (); event = gdk_display_get_event (display); @@ -79,7 +79,7 @@ gdk_event_source_dispatch(GSource *base, gdk_event_free (event); } - GDK_THREADS_LEAVE (); + gdk_threads_leave (); return TRUE; } diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c index 2bc7c12477..962daf2d09 100644 --- a/gdk/win32/gdkevents-win32.c +++ b/gdk/win32/gdkevents-win32.c @@ -3326,7 +3326,7 @@ gdk_event_prepare (GSource *source, { gboolean retval; - GDK_THREADS_ENTER (); + gdk_threads_enter (); *timeout = -1; @@ -3334,7 +3334,7 @@ gdk_event_prepare (GSource *source, (modal_win32_dialog == NULL && GetQueueStatus (QS_ALLINPUT) != 0)); - GDK_THREADS_LEAVE (); + gdk_threads_leave (); return retval; } @@ -3344,7 +3344,7 @@ gdk_event_check (GSource *source) { gboolean retval; - GDK_THREADS_ENTER (); + gdk_threads_enter (); if (event_poll_fd.revents & G_IO_IN) { @@ -3357,7 +3357,7 @@ gdk_event_check (GSource *source) retval = FALSE; } - GDK_THREADS_LEAVE (); + gdk_threads_leave (); return retval; } @@ -3369,7 +3369,7 @@ gdk_event_dispatch (GSource *source, { GdkEvent *event; - GDK_THREADS_ENTER (); + gdk_threads_enter (); _gdk_win32_display_queue_events (_gdk_display); event = _gdk_event_unqueue (_gdk_display); @@ -3389,7 +3389,7 @@ gdk_event_dispatch (GSource *source, } } - GDK_THREADS_LEAVE (); + gdk_threads_leave (); return TRUE; } diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index 3ef8fa0567..0f8b35fc32 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -1483,11 +1483,11 @@ process_internal_connection (GIOChannel *gioc, { GdkInternalConnection *connection = (GdkInternalConnection *)data; - GDK_THREADS_ENTER (); + gdk_threads_enter (); XProcessInternalConnection ((Display*)connection->display, connection->fd); - GDK_THREADS_LEAVE (); + gdk_threads_leave (); return TRUE; } diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c index 615ff9a1d0..6b82611bfc 100644 --- a/gdk/x11/gdkeventsource.c +++ b/gdk/x11/gdkeventsource.c @@ -273,13 +273,13 @@ gdk_event_source_prepare (GSource *source, GdkDisplay *display = ((GdkEventSource*) source)->display; gboolean retval; - GDK_THREADS_ENTER (); + gdk_threads_enter (); *timeout = -1; retval = (_gdk_event_queue_find_first (display) != NULL || gdk_check_xpending (display)); - GDK_THREADS_LEAVE (); + gdk_threads_leave (); return retval; } @@ -290,7 +290,7 @@ gdk_event_source_check (GSource *source) GdkEventSource *event_source = (GdkEventSource*) source; gboolean retval; - GDK_THREADS_ENTER (); + gdk_threads_enter (); if (event_source->event_poll_fd.revents & G_IO_IN) retval = (_gdk_event_queue_find_first (event_source->display) != NULL || @@ -298,7 +298,7 @@ gdk_event_source_check (GSource *source) else retval = FALSE; - GDK_THREADS_LEAVE (); + gdk_threads_leave (); return retval; } @@ -349,7 +349,7 @@ gdk_event_source_dispatch (GSource *source, GdkDisplay *display = ((GdkEventSource*) source)->display; GdkEvent *event; - GDK_THREADS_ENTER (); + gdk_threads_enter (); event = gdk_display_get_event (display); @@ -360,7 +360,7 @@ gdk_event_source_dispatch (GSource *source, gdk_event_free (event); } - GDK_THREADS_LEAVE (); + gdk_threads_leave (); return TRUE; } |