diff --git a/ChangeLog b/ChangeLog index 5920b71aa..e464f238c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-09-19 Emmanuele Bassi + + * clutter/clutter-main.c: Properly document the + clutter_get_option_group() function and the invariant that + after parsing Clutter's option group the library will be + initialized. (Thanks to Tomas Frydrych for pointing this + out) + 2008-09-19 Emmanuele Bassi * clutter/x11/clutter-backend-x11.c: Properly document the diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index 00e12422a..e6ba2ccd9 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -1180,7 +1180,25 @@ post_parse_hook (GOptionContext *context, * g_option_context_add_group(), if you are using g_option_context_parse() * to parse your commandline arguments. * - * Return value: a GOptionGroup for the commandline arguments + * Calling g_option_context_parse() with Clutter's #GOptionGroup will result + * in Clutter's initialization. That is, the following code: + * + * |[ + * g_option_context_set_main_group (context, clutter_get_option_group ()); + * res = g_option_context_parse (context, &argc, &argc, NULL); + * ]| + * + * is functionally equivalent to: + * + * |[ + * clutter_init (&argc, &argv); + * ]| + * + * After g_option_context_parse() on a #GOptionContext containing the + * Clutter #GOptionGroup has returned %TRUE, Clutter is guaranteed to be + * initialized. + * + * Return value: a #GOptionGroup for the commandline arguments * recognized by Clutter * * Since: 0.2