From 600712c9017371997851d7d16937157b3046c6de Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Wed, 16 Jul 2014 22:47:59 +0200 Subject: [PATCH] Add gswe_all_house_systems() function This is required for Astrognome to configure house systems in the charts. See gergelypolonkai/astrognome#36 --- docs/reference/swe-glib/swe-glib-sections.txt | 1 + src/swe-glib.c | 14 ++++++++++++++ src/swe-glib.h | 2 ++ 3 files changed, 17 insertions(+) diff --git a/docs/reference/swe-glib/swe-glib-sections.txt b/docs/reference/swe-glib/swe-glib-sections.txt index 8be021c..f83aca8 100644 --- a/docs/reference/swe-glib/swe-glib-sections.txt +++ b/docs/reference/swe-glib/swe-glib-sections.txt @@ -211,6 +211,7 @@ gswe_antiscion_data_get_type gswe-house-system-info GsweHouseSystemInfo gswe_find_house_system_info_by_id +gswe_all_house_systems gswe_house_system_info_new gswe_house_system_info_ref gswe_house_system_info_unref diff --git a/src/swe-glib.c b/src/swe-glib.c index 9b7872e..cdbd159 100644 --- a/src/swe-glib.c +++ b/src/swe-glib.c @@ -828,3 +828,17 @@ gswe_find_antiscion_axis_info_by_id( return ret; } +/** + * gswe_all_house_systems: + * + * Returns: (transfer container): All #GsweHouseSystemInfo registered with + * SWE-GLib. This list should not be modified nor freed and is only valid until + * a new house system is registered. + * + * Since: 2.1.0 + */ +GList * +gswe_all_house_systems(void) +{ + return g_hash_table_get_values(gswe_house_system_info_table); +} diff --git a/src/swe-glib.h b/src/swe-glib.h index d8ae27f..cf01392 100644 --- a/src/swe-glib.h +++ b/src/swe-glib.h @@ -67,4 +67,6 @@ GsweAntiscionAxisInfo *gswe_find_antiscion_axis_info_by_id( GsweAntiscionAxis antiscion_axis, GError **err); +GList *gswe_all_house_systems(void); + #endif /* __SWE_GLIB_H__ */