Add missing documentation

gswe_antiscion_data_new_with_planets() and gswe_antiscion_data_calculate()
were not documented, nor exposed to the public API as they should be.
This commit is contained in:
Gergely Polonkai 2013-10-09 00:05:38 +02:00
parent fa1b4574e4
commit 551ea4cee0
3 changed files with 34 additions and 0 deletions

View File

@ -185,12 +185,14 @@ gswe_antiscion_axis_info_get_type
<FILE>gswe-antiscion-data</FILE>
GsweAntiscionData
gswe_antiscion_data_new
gswe_antiscion_data_new_with_planets
gswe_antiscion_data_ref
gswe_antiscion_data_unref
gswe_antiscion_data_set_planet1
gswe_antiscion_data_get_planet1
gswe_antiscion_data_set_planet2
gswe_antiscion_data_get_planet2
gswe_antiscion_data_calculate
gswe_antiscion_data_get_axis
gswe_antiscion_data_get_antiscion_axis_info
gswe_antiscion_data_get_difference

View File

@ -105,6 +105,25 @@ find_antiscion(gpointer axis_p, GsweAntiscionAxisInfo *antiscion_axis_info, Gswe
return FALSE;
}
/**
* gswe_antiscion_data_calculate:
* @antiscion_data: a #GsweAntiscionData
*
* Calculates the antiscion between the planets set in @antiscion_data. Planets
* can be set either by calling gswe_antiscion_data_set_planet1() and
* gswe_antiscion_data_set_planet2(), or by creating the #GsweAntiscionData
* with gswe_antiscion_data_new_with_planets().
*
* <note><para>If the object is created by
* gswe_antiscion_data_new_with_planets(), or when both planets are set by
* calling gswe_antiscion_data_set_planet1() and
* gswe_antiscion_data_set_planet2(), the antiscion information is
* automatically calculated. However, when either planet's data changes, the
* antiscion data is not calculated automatically, so if you expect the planets
* to get a new position (e.g. the #GsweTimestamp changes in a #GsweMoment
* which holds the @antiscion_data, in which case the planet positions are
* automatically adjusted), this function should be called.</para></note>
*/
void
gswe_antiscion_data_calculate(GsweAntiscionData *antiscion_data)
{
@ -113,6 +132,16 @@ gswe_antiscion_data_calculate(GsweAntiscionData *antiscion_data)
}
}
/**
* gswe_antiscion_data_new_with_planets:
* @planet1: a #GswePlanetData
* @planet2: a #GswePlanetData
*
* Creates a new #GsweAntiscionData object with both planets initially set. The
* respective antiscion is instantly calculated.
*
* Returns: (transfer full): a new #GsweAntiscionData
*/
GsweAntiscionData *
gswe_antiscion_data_new_with_planets(GswePlanetData *planet1, GswePlanetData *planet2)
{

View File

@ -39,10 +39,13 @@ GType gswe_antiscion_data_get_type(void);
#define GSWE_TYPE_ANTISCION_DATA (gswe_antiscion_data_get_type())
GsweAntiscionData *gswe_antiscion_data_new(void);
GsweAntiscionData *gswe_antiscion_data_new_with_planets(GswePlanetData *planet1, GswePlanetData *planet2);
GsweAntiscionData *gswe_antiscion_data_ref(GsweAntiscionData *antiscion_data);
void gswe_antiscion_data_unref(GsweAntiscionData *antiscion_data);
void gswe_antiscion_data_calculate(GsweAntiscionData *antiscion_data);
void gswe_antiscion_data_set_planet1(GsweAntiscionData *antiscion_data, GswePlanetData *planet1);
GswePlanetData *gswe_antiscion_data_get_planet1(GsweAntiscionData *antiscion_data);