2013-09-16 07:16:49 +00:00
|
|
|
/* gswe-moment.h - Planetary moment object for SWE-GLib
|
|
|
|
*
|
2013-09-22 16:22:13 +00:00
|
|
|
* Copyright © 2013 Gergely Polonkai
|
2013-09-16 07:16:49 +00:00
|
|
|
*
|
2013-09-22 16:22:13 +00:00
|
|
|
* SWE-GLib is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2013-09-16 07:16:49 +00:00
|
|
|
*
|
2013-09-22 16:22:13 +00:00
|
|
|
* SWE-GLib is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2013-09-16 07:16:49 +00:00
|
|
|
*
|
2013-09-22 16:22:13 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this library; if not, see <http://www.gnu.org/licenses/>.
|
2013-09-16 07:16:49 +00:00
|
|
|
*/
|
2013-09-01 11:52:18 +00:00
|
|
|
#ifndef __GSWE_MOMENT_H__
|
|
|
|
#define __GSWE_MOMENT_H__
|
|
|
|
|
|
|
|
#include <glib-object.h>
|
|
|
|
|
2013-09-01 12:21:21 +00:00
|
|
|
#include "gswe-timestamp.h"
|
2013-09-22 22:03:10 +00:00
|
|
|
#include "gswe-moon-phase-data.h"
|
2013-09-23 19:18:41 +00:00
|
|
|
#include "gswe-planet-data.h"
|
2013-09-22 22:03:10 +00:00
|
|
|
#include "gswe-types.h"
|
2013-09-01 12:21:21 +00:00
|
|
|
|
2013-09-01 11:52:18 +00:00
|
|
|
#define GSWE_TYPE_MOMENT (gswe_moment_get_type())
|
2014-07-08 08:43:54 +00:00
|
|
|
#define GSWE_MOMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST( \
|
|
|
|
(obj), \
|
|
|
|
GSWE_TYPE_MOMENT, \
|
|
|
|
GsweMoment))
|
|
|
|
#define GSWE_IS_MOMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE( \
|
|
|
|
(obj), \
|
|
|
|
GSWE_TYPE_MOMENT))
|
|
|
|
#define GSWE_MOMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST( \
|
|
|
|
(klass), \
|
|
|
|
GSWE_TYPE_MOMENT, \
|
|
|
|
GsweMomentClass))
|
|
|
|
#define GSWE_IS_MOMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE( \
|
|
|
|
(klass), \
|
|
|
|
GSWE_TYPE_MOMENT))
|
|
|
|
#define GSWE_MOMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS( \
|
|
|
|
(obj), \
|
|
|
|
GSWE_TYPE_MOMENT, \
|
|
|
|
GsweMomentClass))
|
2013-09-01 11:52:18 +00:00
|
|
|
|
|
|
|
typedef struct _GsweMoment GsweMoment;
|
|
|
|
typedef struct _GsweMomentClass GsweMomentClass;
|
|
|
|
typedef struct _GsweMomentPrivate GsweMomentPrivate;
|
|
|
|
|
2013-09-16 12:00:06 +00:00
|
|
|
/**
|
|
|
|
* GsweMoment:
|
|
|
|
*
|
|
|
|
* The GsweMoment object's instance definition.
|
|
|
|
*/
|
2013-09-01 11:52:18 +00:00
|
|
|
struct _GsweMoment {
|
|
|
|
/* Parent instance structure */
|
|
|
|
GObject parent_instance;
|
|
|
|
|
|
|
|
/* Instance members */
|
|
|
|
|
|
|
|
/*< private >*/
|
|
|
|
GsweMomentPrivate *priv;
|
|
|
|
};
|
|
|
|
|
2013-09-05 17:50:57 +00:00
|
|
|
/**
|
|
|
|
* GsweMomentClass:
|
|
|
|
* @parent_class: the parent class (#GObjectClass)
|
2013-09-16 12:00:06 +00:00
|
|
|
*
|
|
|
|
* The GsweMoment object's class definition.
|
2013-09-05 17:50:57 +00:00
|
|
|
*/
|
2013-09-01 11:52:18 +00:00
|
|
|
struct _GsweMomentClass {
|
|
|
|
/* Parent class structure */
|
|
|
|
GObjectClass parent_class;
|
|
|
|
|
2013-09-10 23:48:19 +00:00
|
|
|
/*< private >*/
|
2013-09-10 22:20:54 +00:00
|
|
|
/* Padding for future expansion */
|
|
|
|
void (*_swe_glib_reserved1)(void);
|
|
|
|
void (*_swe_glib_reserved2)(void);
|
|
|
|
void (*_swe_glib_reserved3)(void);
|
|
|
|
void (*_swe_glib_reserved4)(void);
|
|
|
|
void (*_swe_glib_reserved5)(void);
|
|
|
|
void (*_swe_glib_reserved6)(void);
|
|
|
|
void (*_swe_glib_reserved7)(void);
|
|
|
|
void (*_swe_glib_reserved8)(void);
|
|
|
|
void (*_swe_glib_reserved9)(void);
|
|
|
|
void (*_swe_glib_reserved10)(void);
|
|
|
|
void (*_swe_glib_reserved11)(void);
|
|
|
|
void (*_swe_glib_reserved12)(void);
|
|
|
|
void (*_swe_glib_reserved13)(void);
|
|
|
|
void (*_swe_glib_reserved14)(void);
|
|
|
|
void (*_swe_glib_reserved15)(void);
|
|
|
|
void (*_swe_glib_reserved16)(void);
|
|
|
|
void (*_swe_glib_reserved17)(void);
|
|
|
|
void (*_swe_glib_reserved18)(void);
|
|
|
|
void (*_swe_glib_reserved19)(void);
|
|
|
|
void (*_swe_glib_reserved20)(void);
|
2013-09-01 11:52:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* used by GSWE_TYPE_MOMENT */
|
|
|
|
GType gswe_moment_get_type(void);
|
|
|
|
|
|
|
|
/* Method definitions */
|
|
|
|
GsweMoment *gswe_moment_new(void);
|
2014-07-08 08:43:54 +00:00
|
|
|
|
|
|
|
GsweMoment *gswe_moment_new_full(
|
|
|
|
GsweTimestamp *timestamp,
|
|
|
|
gdouble longitude,
|
|
|
|
gdouble latitude,
|
|
|
|
gdouble altitude,
|
|
|
|
GsweHouseSystem house_system);
|
2013-09-16 12:20:49 +00:00
|
|
|
|
2013-09-01 11:52:18 +00:00
|
|
|
void gswe_moment_set_timestamp(GsweMoment *moment, GsweTimestamp *timestamp);
|
2014-07-08 08:43:54 +00:00
|
|
|
|
2013-09-11 01:28:15 +00:00
|
|
|
GsweTimestamp *gswe_moment_get_timestamp(GsweMoment *moment);
|
2013-09-16 12:20:49 +00:00
|
|
|
|
2014-07-08 08:43:54 +00:00
|
|
|
void gswe_moment_set_coordinates(
|
|
|
|
GsweMoment *moment,
|
|
|
|
gdouble longitude,
|
|
|
|
gdouble latitude,
|
|
|
|
gdouble altitude);
|
|
|
|
|
2013-09-11 01:34:07 +00:00
|
|
|
GsweCoordinates *gswe_moment_get_coordinates(GsweMoment *moment);
|
2013-09-16 12:20:49 +00:00
|
|
|
|
2014-07-08 08:43:54 +00:00
|
|
|
void gswe_moment_set_house_system(
|
|
|
|
GsweMoment *moment,
|
|
|
|
GsweHouseSystem house_system);
|
|
|
|
|
2013-09-11 01:41:42 +00:00
|
|
|
GsweHouseSystem gswe_moment_get_house_system(GsweMoment *moment);
|
2013-09-16 12:20:49 +00:00
|
|
|
|
2013-09-10 23:08:35 +00:00
|
|
|
GList *gswe_moment_get_house_cusps(GsweMoment *moment, GError **err);
|
2014-07-08 08:43:54 +00:00
|
|
|
|
2013-09-10 23:08:35 +00:00
|
|
|
gint gswe_moment_get_house(GsweMoment *moment, gdouble position, GError **err);
|
2013-09-16 12:20:49 +00:00
|
|
|
|
2013-09-02 14:19:45 +00:00
|
|
|
gboolean gswe_moment_has_planet(GsweMoment *moment, GswePlanet planet);
|
2014-07-08 08:43:54 +00:00
|
|
|
|
|
|
|
void gswe_moment_add_planet(
|
|
|
|
GsweMoment *moment,
|
|
|
|
GswePlanet planet,
|
|
|
|
GError **err);
|
|
|
|
|
2013-09-02 14:19:45 +00:00
|
|
|
void gswe_moment_add_all_planets(GsweMoment *moment);
|
2014-07-08 08:43:54 +00:00
|
|
|
|
2013-09-16 12:19:39 +00:00
|
|
|
GList *gswe_moment_get_all_planets(GsweMoment *moment);
|
2014-07-08 08:43:54 +00:00
|
|
|
|
|
|
|
GswePlanetData *gswe_moment_get_planet(
|
|
|
|
GsweMoment *moment,
|
|
|
|
GswePlanet planet,
|
|
|
|
GError **err);
|
|
|
|
|
2013-09-16 12:20:49 +00:00
|
|
|
GList *gswe_moment_get_sign_planets(GsweMoment *moment, GsweZodiac sign);
|
2014-07-08 08:43:54 +00:00
|
|
|
|
2013-09-16 12:20:49 +00:00
|
|
|
GList *gswe_moment_get_house_planets(GsweMoment *moment, guint house);
|
|
|
|
|
2013-09-02 21:10:35 +00:00
|
|
|
guint gswe_moment_get_element_points(GsweMoment *moment, GsweElement element);
|
2014-07-08 08:43:54 +00:00
|
|
|
|
2013-09-02 21:10:35 +00:00
|
|
|
guint gswe_moment_get_quality_points(GsweMoment *moment, GsweQuality quality);
|
2013-09-16 12:20:49 +00:00
|
|
|
|
2013-10-03 22:19:11 +00:00
|
|
|
GsweMoonPhaseData *gswe_moment_get_moon_phase(GsweMoment *moment, GError **err);
|
2013-09-16 12:20:49 +00:00
|
|
|
|
2013-09-10 22:17:23 +00:00
|
|
|
GList *gswe_moment_get_all_aspects(GsweMoment *moment);
|
2014-07-08 08:43:54 +00:00
|
|
|
|
|
|
|
GList *gswe_moment_get_planet_aspects(
|
|
|
|
GsweMoment *moment,
|
|
|
|
GswePlanet planet,
|
|
|
|
GError **err);
|
|
|
|
|
|
|
|
GsweAspectData *gswe_moment_get_aspect_by_planets(
|
|
|
|
GsweMoment *moment,
|
|
|
|
GswePlanet planet1,
|
|
|
|
GswePlanet planet2,
|
|
|
|
GError **err);
|
2013-09-16 12:20:49 +00:00
|
|
|
|
2013-09-16 08:13:25 +00:00
|
|
|
GList *gswe_moment_get_all_antiscia(GsweMoment *moment);
|
2014-07-08 08:43:54 +00:00
|
|
|
|
|
|
|
GList *gswe_moment_get_all_planet_antiscia(
|
|
|
|
GsweMoment *moment,
|
|
|
|
GswePlanet planet,
|
|
|
|
GError **err);
|
|
|
|
|
|
|
|
GList *gswe_moment_get_axis_all_antiscia(
|
|
|
|
GsweMoment *moment,
|
|
|
|
GsweAntiscionAxis axis);
|
|
|
|
|
|
|
|
GList *gswe_moment_get_axis_planet_antiscia(
|
|
|
|
GsweMoment *moment,
|
|
|
|
GsweAntiscionAxis axis,
|
|
|
|
GswePlanet planet,
|
|
|
|
GError **err);
|
|
|
|
|
|
|
|
GsweAntiscionData *gswe_moment_get_antiscion_by_planets(
|
|
|
|
GsweMoment *moment,
|
|
|
|
GswePlanet planet1,
|
|
|
|
GswePlanet planet2,
|
|
|
|
GError **err);
|
2013-09-01 11:52:18 +00:00
|
|
|
|
|
|
|
#endif /* __GSWE_MOMENT_H__ */
|
|
|
|
|