[goffice] Introspection fixes
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Introspection fixes
- Date: Thu, 10 May 2018 00:02:56 +0000 (UTC)
commit d9787357f0facb7fa5219926498df0c24e85826b
Author: Morten Welinder <terra gnome org>
Date: Wed May 9 20:02:34 2018 -0400
Introspection fixes
NEWS | 3 +++
goffice/utils/go-color.c | 23 +++++++++++++++++++----
goffice/utils/go-format.c | 27 +++++++++++++++++----------
goffice/utils/go-locale.c | 33 ++++++++++++++++++++++++++++++---
4 files changed, 69 insertions(+), 17 deletions(-)
---
diff --git a/NEWS b/NEWS
index c5a2f6e..935fa56 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
goffice 0.10.42:
+Morten:
+ * Introspection fixes.
+
--------------------------------------------------------------------------
goffice 0.10.41:
diff --git a/goffice/utils/go-color.c b/goffice/utils/go-color.c
index 7679de8..7ae9c25 100644
--- a/goffice/utils/go-color.c
+++ b/goffice/utils/go-color.c
@@ -27,10 +27,10 @@
/**
* go_color_from_str :
- * @str:
- * @res:
+ * @str: String to parse
+ * @res: (out): the parsed color
*
- * Returns: TRUE if @str can be parsed as a color of the form R:G:B:A and the
+ * Returns: %TRUE if @str can be parsed as a color of the form R:G:B:A and the
* result is stored in @res.
**/
gboolean
@@ -51,6 +51,7 @@ go_color_from_str (gchar const *str, GOColor *res)
}
}
#endif
+ *res = 0;
return FALSE;
}
@@ -66,7 +67,7 @@ go_color_as_str (GOColor color)
/**
* go_color_to_pango: (skip)
* @color: #GOColor
- * @is_fore: whether to create a foreground or background color attribute.
+ * @is_fore: %TRUE for foreground, %FALSE for background
*
* Returns: (transfer full): the newly created #PangoAttribute.
**/
@@ -90,6 +91,13 @@ go_color_to_pango (GOColor color, gboolean is_fore)
#ifdef GOFFICE_WITH_GTK
#include <gdk/gdk.h>
+/**
+ * go_color_to_gdk_rgba:
+ * @color: #GOColor
+ * @res: %GdkRGBA to change
+ *
+ * Returns: (transfer none): @res
+ **/
GdkRGBA *
go_color_to_gdk_rgba (GOColor color, GdkRGBA *res)
{
@@ -101,6 +109,13 @@ go_color_to_gdk_rgba (GOColor color, GdkRGBA *res)
return res;
}
+/**
+ * go_color_from_gdk_rgba:
+ * @rgbacolor: #GdkRGBA to convert
+ * @res: (out) (optional): resulting color
+ *
+ * Returns: resulting color
+ **/
GOColor
go_color_from_gdk_rgba (GdkRGBA const *rgbacolor, GOColor *res)
{
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index 46329cc..0adf3bf 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -6323,10 +6323,9 @@ go_format_ref (GOFormat const *gf_)
#ifdef DEFINE_COMMON
/**
* go_format_unref :
- * @fmt: a #GOFormat
+ * @fmt: (transfer full) (nullable): a #GOFormat
*
* Removes a reference to @fmt, freeing when it goes to zero.
- *
**/
void
go_format_unref (GOFormat const *gf_)
@@ -6417,10 +6416,10 @@ go_format_is_invalid (GOFormat const *fmt)
* go_format_is_general:
* @fmt: Format to query
*
- * Returns: TRUE if the format is "General", possibly with condition,
+ * Returns: %TRUE if the format is "General", possibly with condition,
* color, and/or locale. ("xGeneral" is thus not considered to be General
* for the purpose of this function.)
- * Returns FALSE otherwise.
+ * Returns %FALSE otherwise.
**/
gboolean
go_format_is_general (GOFormat const *fmt)
@@ -6435,8 +6434,7 @@ go_format_is_general (GOFormat const *fmt)
* go_format_is_markup:
* @fmt: Format to query
*
- * Returns: TRUE if the format is a markup format
- * Returns FALSE otherwise.
+ * Returns: %TRUE if the format is a markup format and %FALSE otherwise.
*/
gboolean
go_format_is_markup (GOFormat const *fmt)
@@ -6451,8 +6449,7 @@ go_format_is_markup (GOFormat const *fmt)
* go_format_is_text:
* @fmt: Format to query
*
- * Returns: TRUE if the format is a text format
- * Returns FALSE otherwise.
+ * Returns: %TRUE if the format is a text format and %FALSE otherwise.
**/
gboolean
go_format_is_text (GOFormat const *fmt)
@@ -6467,8 +6464,7 @@ go_format_is_text (GOFormat const *fmt)
* go_format_is_var_width:
* @fmt: Format to query
*
- * Returns: TRUE if the format is variable width, i.e., can stretch.
- * Returns FALSE otherwise.
+ * Returns: %TRUE if the format is variable width, i.e., can stretch.
**/
gboolean
go_format_is_var_width (GOFormat const *fmt)
@@ -7371,6 +7367,12 @@ go_format_details_init (GOFormatDetails *details, GOFormatFamily family)
#ifdef DEFINE_COMMON
+/**
+ * go_format_get_details:
+ * @fmt: Format to quert
+ * @dst: (out): #GOFormatDetails
+ * @exact: (out) (optional): whether @dst describes @fmt exactly.
+ */
void
go_format_get_details (GOFormat const *fmt,
GOFormatDetails *dst,
@@ -7657,6 +7659,11 @@ go_format_currency_get_type (void)
return t;
}
+/**
+ * go_format_locale_currency:
+ *
+ * Returns: (transfer none): The #GOFormatCurrency matches the current locale.
+ */
GOFormatCurrency const *
go_format_locale_currency (void)
{
diff --git a/goffice/utils/go-locale.c b/goffice/utils/go-locale.c
index 25c734a..0901609 100644
--- a/goffice/utils/go-locale.c
+++ b/goffice/utils/go-locale.c
@@ -155,6 +155,11 @@ update_lc (void)
locale_info_cached = TRUE;
}
+/**
+ * go_locale_get_decimal:
+ *
+ * Returns: (transfer none): Current locale's decimal separator.
+ */
GString const *
go_locale_get_decimal (void)
{
@@ -164,6 +169,12 @@ go_locale_get_decimal (void)
return lc_decimal;
}
+/**
+ * go_locale_get_thousand:
+ *
+ * Returns: (transfer none): Current locale's thousands separator. This may
+ * be an empty string.
+ */
GString const *
go_locale_get_thousand (void)
{
@@ -183,7 +194,7 @@ go_locale_get_thousand (void)
* Play with the default logic so that things come out nicely for the default
* case.
*
- * Returns: A string with the default currency
+ * Returns: (transfer none): A string with the default currency
**/
GString const *
go_locale_get_currency (gboolean *precedes, gboolean *space_sep)
@@ -220,6 +231,11 @@ go_locale_win32_get_user_default (GString *res, unsigned int id)
}
#endif
+/**
+ * go_locale_get_date_format:
+ *
+ * Returns: (transfer none): Current locale's date format as a string.
+ */
GString const *
go_locale_get_date_format (void)
{
@@ -301,6 +317,11 @@ go_locale_get_date_format (void)
return lc_date_format;
}
+/**
+ * go_locale_get_time_format:
+ *
+ * Returns: (transfer none): Current locale's time format as a string.
+ */
GString const *
go_locale_get_time_format (void)
{
@@ -466,7 +487,7 @@ go_locale_month_before_day (void)
/**
* go_locale_24h :
*
- * Returns: TRUE if the locale uses a 24h clock, FALSE otherwise.
+ * Returns: %TRUE if the locale uses a 24h clock, %FALSE otherwise.
*/
gboolean
go_locale_24h (void)
@@ -513,6 +534,12 @@ go_locale_get_row_sep (void)
return ';';
}
+/**
+ * go_locale_boolean_name:
+ * @b: a boolean value
+ *
+ * Returns: (transfer none): Current locale's rendering of @b.
+ */
char const *
go_locale_boolean_name (gboolean b)
{
@@ -525,7 +552,7 @@ go_locale_boolean_name (gboolean b)
}
/**
- * go_locale_untranslated_booleans :
+ * go_locale_untranslated_booleans:
*
* Short circuit the current locale so that we can import files
* and still produce error messages in the current LC_MESSAGE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]