[mutter] clutter: Remove main loop helper
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter: Remove main loop helper
- Date: Thu, 13 Aug 2020 16:00:31 +0000 (UTC)
commit e848414f899fc074c1b77082f499440aaf135975
Author: Jonas Ådahl <jadahl gmail com>
Date: Thu Jul 9 21:45:41 2020 +0200
clutter: Remove main loop helper
It's expected to always use meta_*() or your own main loop.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1364
clutter/clutter/clutter-main.c | 73 ------------------------------------------
clutter/clutter/clutter-main.h | 8 -----
2 files changed, 81 deletions(-)
---
diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c
index 2436545a8c..cc547131e3 100644
--- a/clutter/clutter/clutter-main.c
+++ b/clutter/clutter/clutter-main.c
@@ -90,9 +90,6 @@ static guint clutter_default_fps = 60;
static ClutterTextDirection clutter_text_direction = CLUTTER_TEXT_DIRECTION_LTR;
-static guint clutter_main_loop_level = 0;
-static GSList *main_loops = NULL;
-
/* debug flags */
guint clutter_debug_flags = 0;
guint clutter_paint_debug_flags = 0;
@@ -443,76 +440,6 @@ clutter_get_text_direction (void)
return dir;
}
-/**
- * clutter_main_quit:
- *
- * Terminates the Clutter mainloop.
- */
-void
-clutter_main_quit (void)
-{
- if (main_loops == NULL)
- {
- g_critical ("Calling clutter_main_quit() without calling clutter_main() "
- "is not allowed. If you are using another main loop, use the "
- "appropriate API to terminate it.");
- return;
- }
-
- CLUTTER_NOTE (MISC, "Terminating main loop level %d", clutter_main_loop_level);
-
- g_main_loop_quit (main_loops->data);
-}
-
-/**
- * clutter_main_level:
- *
- * Retrieves the depth of the Clutter mainloop.
- *
- * Return value: The level of the mainloop.
- */
-gint
-clutter_main_level (void)
-{
- return clutter_main_loop_level;
-}
-
-/**
- * clutter_main:
- *
- * Starts the Clutter mainloop.
- */
-void
-clutter_main (void)
-{
- GMainLoop *loop;
-
- if (!_clutter_context_is_initialized ())
- {
- g_warning ("Called clutter_main() but Clutter wasn't initialised. "
- "You must call clutter_init() first.");
- return;
- }
-
- clutter_main_loop_level++;
-
- CLUTTER_NOTE (MISC, "Entering main loop level %d", clutter_main_loop_level);
-
- loop = g_main_loop_new (NULL, TRUE);
- main_loops = g_slist_prepend (main_loops, loop);
-
- if (g_main_loop_is_running (main_loops->data))
- g_main_loop_run (loop);
-
- main_loops = g_slist_remove (main_loops, loop);
-
- g_main_loop_unref (loop);
-
- CLUTTER_NOTE (MISC, "Leaving main loop level %d", clutter_main_loop_level);
-
- clutter_main_loop_level--;
-}
-
gboolean
_clutter_threads_dispatch (gpointer data)
{
diff --git a/clutter/clutter/clutter-main.h b/clutter/clutter/clutter-main.h
index 2523f73daf..10e2aca997 100644
--- a/clutter/clutter/clutter-main.h
+++ b/clutter/clutter/clutter-main.h
@@ -136,14 +136,6 @@ GOptionGroup * clutter_get_option_group (void);
CLUTTER_EXPORT
GOptionGroup * clutter_get_option_group_without_init (void);
-/* Mainloop */
-CLUTTER_EXPORT
-void clutter_main (void);
-CLUTTER_EXPORT
-void clutter_main_quit (void);
-CLUTTER_EXPORT
-gint clutter_main_level (void);
-
CLUTTER_EXPORT
void clutter_do_event (ClutterEvent *event);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]