[gtk/mainloop-cleanup: 4/11] Drop gtk_main_iteration



commit 1efc17a9bd8afa744320a9faca076c148f216424
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Feb 9 19:38:40 2020 -0500

    Drop gtk_main_iteration
    
    This function and its cousin, gtk_main_iteration_do, are
    thin wrappers around GMainContext api that should just
    be used directly.

 docs/reference/gtk/gtk4-sections.txt |  2 --
 gtk/gtkmain.c                        | 46 ------------------------------------
 gtk/gtkmain.h                        |  4 ----
 3 files changed, 52 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 870b83bfe6..ec3ec462fd 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4421,8 +4421,6 @@ gtk_init_check
 gtk_main
 gtk_main_level
 gtk_main_quit
-gtk_main_iteration
-gtk_main_iteration_do
 gtk_main_do_event
 
 <SUBSECTION>
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index a9b6e0aec9..3217911dce 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1152,52 +1152,6 @@ gtk_main_quit (void)
   g_main_loop_quit (main_loops->data);
 }
 
-/**
- * gtk_main_iteration:
- *
- * Runs a single iteration of the mainloop.
- *
- * If no events are waiting to be processed GTK will block
- * until the next event is noticed. If you don’t want to block
- * look at gtk_main_iteration_do() or check if any events are
- * pending with gtk_events_pending() first.
- *
- * Returns: %TRUE if gtk_main_quit() has been called for the
- *     innermost mainloop
- */
-gboolean
-gtk_main_iteration (void)
-{
-  g_main_context_iteration (NULL, TRUE);
-
-  if (main_loops)
-    return !g_main_loop_is_running (main_loops->data);
-  else
-    return TRUE;
-}
-
-/**
- * gtk_main_iteration_do:
- * @blocking: %TRUE if you want GTK to block if no events are pending
- *
- * Runs a single iteration of the mainloop.
- * If no events are available either return or block depending on
- * the value of @blocking.
- *
- * Returns: %TRUE if gtk_main_quit() has been called for the
- *     innermost mainloop
- */
-gboolean
-gtk_main_iteration_do (gboolean blocking)
-{
-  g_main_context_iteration (NULL, blocking);
-
-  if (main_loops)
-    return !g_main_loop_is_running (main_loops->data);
-  else
-    return TRUE;
-}
-
 static void
 rewrite_events_translate (GdkSurface *old_surface,
                           GdkSurface *new_surface,
diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h
index 62fe2201fc..ecb7c3777d 100644
--- a/gtk/gtkmain.h
+++ b/gtk/gtkmain.h
@@ -118,10 +118,6 @@ GDK_AVAILABLE_IN_ALL
 guint      gtk_main_level          (void);
 GDK_AVAILABLE_IN_ALL
 void       gtk_main_quit           (void);
-GDK_AVAILABLE_IN_ALL
-gboolean   gtk_main_iteration      (void);
-GDK_AVAILABLE_IN_ALL
-gboolean   gtk_main_iteration_do   (gboolean            blocking);
 
 GDK_AVAILABLE_IN_ALL
 void       gtk_grab_add            (GtkWidget          *widget);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]