From e4a657251f32a6bc8447548c01ceb445e955cc84 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Tue, 28 Oct 2003 14:23:28 +0000 Subject: [PATCH] Move docs inline, rewrite docs, mention memory management for the return Tue Oct 28 09:21:29 2003 Owen Taylor * gtk/gtkmain.c (gtk_check_version): Move docs inline, rewrite docs, mention memory management for the return value. (Partly addresses #125549, Michael Natterer) --- ChangeLog | 6 +++++ ChangeLog.pre-2-10 | 6 +++++ ChangeLog.pre-2-4 | 6 +++++ ChangeLog.pre-2-6 | 6 +++++ ChangeLog.pre-2-8 | 6 +++++ docs/reference/gtk/tmpl/gtkfeatures.sgml | 17 +++--------- gtk/gtkmain.c | 34 ++++++++++++++++++++++++ 7 files changed, 68 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7a97140c21..b26f4e42b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Oct 28 09:21:29 2003 Owen Taylor + + * gtk/gtkmain.c (gtk_check_version): Move docs inline, + rewrite docs, mention memory management for the return + value. (Partly addresses #125549, Michael Natterer) + 2003-10-28 Padraig O'Briain * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_remove_filter): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7a97140c21..b26f4e42b7 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Tue Oct 28 09:21:29 2003 Owen Taylor + + * gtk/gtkmain.c (gtk_check_version): Move docs inline, + rewrite docs, mention memory management for the return + value. (Partly addresses #125549, Michael Natterer) + 2003-10-28 Padraig O'Briain * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_remove_filter): diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 7a97140c21..b26f4e42b7 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Tue Oct 28 09:21:29 2003 Owen Taylor + + * gtk/gtkmain.c (gtk_check_version): Move docs inline, + rewrite docs, mention memory management for the return + value. (Partly addresses #125549, Michael Natterer) + 2003-10-28 Padraig O'Briain * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_remove_filter): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7a97140c21..b26f4e42b7 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Tue Oct 28 09:21:29 2003 Owen Taylor + + * gtk/gtkmain.c (gtk_check_version): Move docs inline, + rewrite docs, mention memory management for the return + value. (Partly addresses #125549, Michael Natterer) + 2003-10-28 Padraig O'Briain * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_remove_filter): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7a97140c21..b26f4e42b7 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Tue Oct 28 09:21:29 2003 Owen Taylor + + * gtk/gtkmain.c (gtk_check_version): Move docs inline, + rewrite docs, mention memory management for the return + value. (Partly addresses #125549, Michael Natterer) + 2003-10-28 Padraig O'Briain * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_remove_filter): diff --git a/docs/reference/gtk/tmpl/gtkfeatures.sgml b/docs/reference/gtk/tmpl/gtkfeatures.sgml index 3f0bcabe92..634dfafa64 100644 --- a/docs/reference/gtk/tmpl/gtkfeatures.sgml +++ b/docs/reference/gtk/tmpl/gtkfeatures.sgml @@ -76,21 +76,12 @@ about it. ;-) -Checks that the GTK+ library in use is equal to the given -version. Primarily useful to compare the header file version -(from #GTK_MAJOR_VERSION, #GTK_MINOR_VERSION, #GTK_MICRO_VERSION) -the the runtime library version. This should only be done -in the build for your application, to check that the user's libraries -and header files are the same. Applications should not do this -when deployed, because it's OK for applications to use a different -micro version of GTK+ than the one they were compiled against. -@required_major: the required major version. -@required_minor: the required major version. -@required_micro: the required major version. -@Returns: %NULL if the GTK+ library is compatible with the given version, or -a string describing the version mismatch. +@required_major: +@required_minor: +@required_micro: +@Returns: diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 38b9fadb1c..8681457452 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -172,6 +172,40 @@ static const guint gtk_ndebug_keys = sizeof (gtk_debug_keys) / sizeof (GDebugKey #endif /* G_ENABLE_DEBUG */ +/** + * gtk_check_version: + * @required_major: the required major version. + * @required_minor: the required major version. + * @required_micro: the required major version. + * + * Checks that the GTK+ library in use is compatible with the + * given version. Generally you would pass in the constants + * #GTK_MAJOR_VERSION, #GTK_MINOR_VERSION, #GTK_MICRO_VERSION + * as the three arguments to this function; that produces + * a check that the library in use is compatible with + * the version of GTK+ the application or module was compiled + * against. + * + * Compatibility is defined by two things: first the version + * of the running library is newer than the version + * @required_major.required_minor.@required_micro. Second + * the running library must be binary compatible with the + * version @required_major.required_minor.@required_micro + * (same major version.) + * + * This function is primarily for GTK+ modules; the module + * can call this function to check that it wasn't loaded + * into an incompatible version of GTK+. However, such a + * a check isn't completely reliable, since the module may be + * linked against an old version of GTK+ and calling the + * old version of gtk_check_version(), but still get loaded + * into an application using a newer version of GTK+. + * + * Return value: %NULL if the GTK+ library is compatible with the + * given version, or a string describing the version mismatch. + * The returned string is owned by GTK+ and should not be modified + * or freed. + **/ gchar* gtk_check_version (guint required_major, guint required_minor,