Initial commit.
[nova.git] / src / sky / sky.h
blob97d89647ea74795afe2e88ebc614642eb201b95b
1 /*
2 * Copyright (C) 2008 Liam Girdwood
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef __SKY_H__
21 #define __SKY_H__
23 #include <gtk/gtk.h>
24 #include <libncat/libncat.h>
25 #include "settings.h"
26 #include "projection.h"
28 G_BEGIN_DECLS
30 #define NOVA_TYPE_SKY \
31 (virtual_sky_get_type ())
32 #define NOVA_SKY(obj) \
33 (G_TYPE_CHECK_INSTANCE_CAST ((obj), NOVA_TYPE_SKY, GtkSky))
34 #define NOVA_SKY_CLASS(obj) \
35 (G_TYPE_CHECK_CLASS_CAST ((obj), NOVA_SKY, GtkSkyClass))
36 #define NOVA_IS_SKY(obj) \
37 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NOVA_TYPE_SKY))
38 #define NOVA_IS_SKY_CLASS(obj) \
39 (G_TYPE_CHECK_CLASS_TYPE ((obj), NOVA_TYPE_SKY))
40 #define NOVA_SKY_GET_CLASS \
41 (G_TYPE_INSTANCE_GET_CLASS ((obj), NOVA_TYPE_SKY, GtkSkyClass))
43 typedef struct _GtkSky GtkSky;
44 typedef struct _GtkSkyClass GtkSkyClass;
46 struct _GtkSky
48 GtkDrawingArea parent;
51 struct _GtkSkyClass
53 GtkDrawingAreaClass parent_class;
56 GtkWidget *virtual_sky_new(void);
57 void sky_connect_signals(GtkWidget *gtk_sky);
58 void sky_set_legend(GtkWidget *sky_widget, GtkWidget *legend_widget);
60 typedef struct _Sky {
62 /* observer/observatory info */
63 struct observer_info observer_settings;
64 struct tm time;
66 /* sky configuration */
67 struct sky_marker_flags marker_settings;
68 struct solar_system_flags solar_system_settings;
69 struct deep_sky_flags deep_sky_settings;
71 /* sky projection */
72 struct projection projection;
74 /* object datasets */
75 lnc_dataset *default_star_dset;
77 /* render data */
78 struct tile_array *tile;
79 struct render_object robject;
80 gboolean pointer_drag;
81 gint pointer_x, pointer_y;
83 /* file / print */
84 gchar *filename;
85 gint is_modified;
87 /* sky legend */
88 GtkWidget *legend_widget;
89 } Sky;
92 G_END_DECLS
94 #endif