[gtk/mainloop-cleanup: 14/21] Drop gtk_main_iteration
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/mainloop-cleanup: 14/21] Drop gtk_main_iteration
- Date: Mon, 10 Feb 2020 04:17:08 +0000 (UTC)
commit 49a6ad3dd1d2f79e6ae970a879b46fac527c2c07
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 8b503f0337..3d7a87b44d 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
<SUBSECTION>
gtk_grab_add
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 5e35e9e6af..434ddac5d5 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 e2c349a9ba..2554cd7567 100644
--- a/gtk/gtkmain.h
+++ b/gtk/gtkmain.h
@@ -116,10 +116,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]