[mutter] clutter: Remove clutter_init_with_args()
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter: Remove clutter_init_with_args()
- Date: Thu, 15 Jul 2021 12:40:54 +0000 (UTC)
commit 07384e18c518b95d6e9172b691bb44b4234b4aa0
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue Mar 2 21:43:31 2021 +0100
clutter: Remove clutter_init_with_args()
Not used anymore.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
clutter/clutter/clutter-main.c | 97 +-----------------------------------------
clutter/clutter/clutter-main.h | 9 +---
src/tests/clutter-test-utils.c | 16 -------
src/tests/clutter-test-utils.h | 7 ---
4 files changed, 2 insertions(+), 127 deletions(-)
---
diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c
index a800138eab..c06d408e67 100644
--- a/clutter/clutter/clutter-main.c
+++ b/clutter/clutter/clutter-main.c
@@ -863,99 +863,6 @@ clutter_get_option_group_without_init (void)
* allow the common case of argc=NULL, argv=NULL to work.
*/
-/**
- * clutter_init_with_args:
- * @argc: (inout): a pointer to the number of command line arguments
- * @argv: (array length=argc) (inout) (allow-none): a pointer to the array
- * of command line arguments
- * @parameter_string: (allow-none): a string which is displayed in the
- * first line of <option>--help</option> output, after
- * <literal><replaceable>programname</replaceable> [OPTION...]</literal>
- * @entries: (array) (allow-none): a %NULL terminated array of
- * #GOptionEntry<!-- -->s describing the options of your program
- * @translation_domain: (allow-none): a translation domain to use for
- * translating the <option>--help</option> output for the options in
- * @entries with gettext(), or %NULL
- * @error: (allow-none): a return location for a #GError
- *
- * This function does the same work as clutter_init(). Additionally,
- * it allows you to add your own command line options, and it
- * automatically generates nicely formatted <option>--help</option>
- * output. Note that your program will be terminated after writing
- * out the help output. Also note that, in case of error, the
- * error message will be placed inside @error instead of being
- * printed on the display.
- *
- * Just like clutter_init(), if this function returns an error code then
- * any subsequent call to any other Clutter API will result in undefined
- * behaviour - including segmentation faults.
- *
- * Return value: %CLUTTER_INIT_SUCCESS if Clutter has been successfully
- * initialised, or other values or #ClutterInitError in case of
- * error.
- *
- * Since: 0.2
- */
-ClutterInitError
-clutter_init_with_args (int *argc,
- char ***argv,
- const char *parameter_string,
- GOptionEntry *entries,
- const char *translation_domain,
- GError **error)
-{
- GOptionContext *context;
- GOptionGroup *group;
- gboolean res;
- ClutterMainContext *ctx;
-
- if (clutter_is_initialized)
- return CLUTTER_INIT_SUCCESS;
-
- clutter_base_init ();
-
- ctx = _clutter_context_get_default ();
-
- if (!ctx->defer_display_setup)
- {
-#if 0
- if (argc && *argc > 0 && *argv)
- g_set_prgname ((*argv)[0]);
-#endif
-
- context = g_option_context_new (parameter_string);
-
- group = clutter_get_option_group ();
- g_option_context_add_group (context, group);
-
- group = cogl_get_option_group ();
- g_option_context_add_group (context, group);
-
- if (entries)
- g_option_context_add_main_entries (context, entries, translation_domain);
-
- res = g_option_context_parse (context, argc, argv, error);
- g_option_context_free (context);
-
- /* if res is FALSE, the error is filled for
- * us by g_option_context_parse()
- */
- if (!res)
- {
- /* if there has been an error in the initialization, the
- * error id will be preserved inside the GError code
- */
- if (error && *error)
- return (*error)->code;
- else
- return CLUTTER_INIT_ERROR_INTERNAL;
- }
-
- return CLUTTER_INIT_SUCCESS;
- }
- else
- return clutter_init_real (error);
-}
static gboolean
clutter_parse_args (int *argc,
@@ -1007,9 +914,7 @@ clutter_parse_args (int *argc,
* This function will not abort in case of errors during
* initialization; clutter_init() will print out the error message on
* stderr, and will return an error code. It is up to the application
- * code to handle this case. If you need to display the error message
- * yourself, you can use clutter_init_with_args(), which takes a #GError
- * pointer.
+ * code to handle this case.
*
* If this function fails, and returns an error code, any subsequent
* Clutter API will have undefined behaviour - including segmentation
diff --git a/clutter/clutter/clutter-main.h b/clutter/clutter/clutter-main.h
index 846a9d68d2..e59361eb79 100644
--- a/clutter/clutter/clutter-main.h
+++ b/clutter/clutter/clutter-main.h
@@ -91,7 +91,7 @@ typedef enum
* @CLUTTER_INIT_ERROR_BACKEND: Backend initialisation failed
* @CLUTTER_INIT_ERROR_INTERNAL: Internal error
*
- * Error conditions returned by clutter_init() and clutter_init_with_args().
+ * Error conditions returned by clutter_init().
*
* Since: 0.2
*/
@@ -126,13 +126,6 @@ void clutter_base_init (void);
CLUTTER_EXPORT
ClutterInitError clutter_init (int *argc,
char ***argv)
G_GNUC_WARN_UNUSED_RESULT;
-CLUTTER_EXPORT
-ClutterInitError clutter_init_with_args (int *argc,
- char ***argv,
- const char *parameter_string,
- GOptionEntry *entries,
- const char *translation_domain,
- GError **error)
G_GNUC_WARN_UNUSED_RESULT;
CLUTTER_EXPORT
GOptionGroup * clutter_get_option_group (void);
diff --git a/src/tests/clutter-test-utils.c b/src/tests/clutter-test-utils.c
index 3bedf9bdd8..c480b4043d 100644
--- a/src/tests/clutter-test-utils.c
+++ b/src/tests/clutter-test-utils.c
@@ -99,22 +99,6 @@ clutter_test_init (int *argc,
init_common_post (argc, argv);
}
-void
-clutter_test_init_with_args (int *argc,
- char ***argv,
- const char *parameter_string,
- GOptionEntry *entries,
- const char *translation_domain)
-{
- init_common_pre ();
- g_assert (clutter_init_with_args (argc, argv,
- parameter_string,
- entries,
- translation_domain,
- NULL) == CLUTTER_INIT_SUCCESS);
- init_common_post (argc, argv);
-}
-
/**
* clutter_test_get_stage:
*
diff --git a/src/tests/clutter-test-utils.h b/src/tests/clutter-test-utils.h
index 5264f84e2d..96a93de8af 100644
--- a/src/tests/clutter-test-utils.h
+++ b/src/tests/clutter-test-utils.h
@@ -99,13 +99,6 @@ CLUTTER_EXPORT
void clutter_test_init (int *argc,
char ***argv);
-CLUTTER_EXPORT
-void clutter_test_init_with_args (int *argc,
- char ***argv,
- const char *parameter_string,
- GOptionEntry *entries,
- const char *translation_domain);
-
CLUTTER_EXPORT
int clutter_test_run (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]