astrognome/src/ag-chart.h

104 lines
3.2 KiB
C
Raw Normal View History

#ifndef __AG_CHART_H__
#define __AG_CHART_H__
#include <glib-object.h>
#include <gtk/gtk.h>
#include <swe-glib.h>
#include "ag-db.h"
G_BEGIN_DECLS
typedef enum {
AG_CHART_ERROR_LIBXML,
AG_CHART_ERROR_CORRUPT_FILE,
AG_CHART_ERROR_EMPTY_RECORD,
AG_CHART_ERROR_INVALID_HOUSE_SYSTEM,
2014-08-10 11:54:51 +00:00
AG_CHART_ERROR_NOT_IMPLEMENTED,
AG_CHART_ERROR_INVALID_PLAC_FILE,
AG_CHART_ERROR_UNSUPPORTED_PLAC_FILE,
} AgChartError;
#define AG_TYPE_CHART (ag_chart_get_type())
#define AG_CHART(o) (G_TYPE_CHECK_INSTANCE_CAST((o), \
AG_TYPE_CHART, \
AgChart))
#define AG_CHART_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
AG_TYPE_CHART, \
AgChartClass))
#define AG_IS_CHART(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), AG_TYPE_CHART))
#define AG_IS_CHART_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), AG_TYPE_CHART))
#define AG_CHART_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), \
AG_TYPE_CHART, \
AgChartClass))
typedef struct _AgChart AgChart;
typedef struct _AgChartClass AgChartClass;
struct _AgChart {
GsweMoment parent_instance;
};
struct _AgChartClass {
GsweMomentClass parent_class;
};
GType ag_chart_get_type(void) G_GNUC_CONST;
2014-07-21 21:38:22 +00:00
AgChart *ag_chart_new_full(GsweTimestamp *timestamp,
gdouble longitude,
gdouble latitude,
gdouble altitude,
GsweHouseSystem house_system);
2014-07-21 21:38:22 +00:00
AgChart *ag_chart_load_from_agc(GFile *file,
GError **err);
2014-07-21 21:38:22 +00:00
2014-08-10 11:54:51 +00:00
AgChart *ag_chart_load_from_placidus_file(GFile *file,
GError **err);
AgChart *ag_chart_new_from_db_save(AgDbSave *save_data, GError **err);
void ag_chart_save_to_file(AgChart *chart,
GFile *file,
GError **err);
2014-06-27 14:52:52 +00:00
void ag_chart_export_svg_to_file(AgChart *chart,
GFile *file,
GError **err);
void ag_chart_set_name(AgChart *chart,
const gchar *name);
2014-07-21 21:38:22 +00:00
const gchar *ag_chart_get_name(AgChart *chart);
2014-07-21 21:38:22 +00:00
void ag_chart_set_country(AgChart *chart,
const gchar *country);
2014-07-21 21:38:22 +00:00
const gchar *ag_chart_get_country(AgChart *chart);
2014-07-21 21:38:22 +00:00
void ag_chart_set_city(AgChart *chart,
const gchar *city);
2014-07-21 21:38:22 +00:00
const gchar *ag_chart_get_city(AgChart *chart);
2014-07-21 21:38:22 +00:00
gchar *ag_chart_create_svg(AgChart *chart,
gsize *length,
GError **err);
2014-07-21 21:38:22 +00:00
2014-06-15 08:00:07 +00:00
GList *ag_chart_get_planets(AgChart *chart);
2014-07-21 21:38:22 +00:00
void ag_chart_set_note(AgChart *chart, const gchar *note);
2014-07-21 21:38:22 +00:00
const gchar *ag_chart_get_note(AgChart *chart);
AgDbSave *ag_chart_get_db_save(AgChart *chart, gint db_id);
#define AG_CHART_ERROR (ag_chart_error_quark())
GQuark ag_chart_error_quark(void);
G_END_DECLS
#endif /* __AG_CHART_H__ */