ui: callbacks - added callbacks
[nova.git] / src / sky / sky.h
blob86b8992fc3fe15d3cb8ec199ac6a7f819a4532ab
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 <libastrodb/astrodb.h>
25 #include "settings.h"
26 #include "projection.h"
27 #include "gconf.h"
29 G_BEGIN_DECLS
31 #define NOVA_TYPE_SKY \
32 (virtual_sky_get_type ())
33 #define NOVA_SKY(obj) \
34 (G_TYPE_CHECK_INSTANCE_CAST ((obj), NOVA_TYPE_SKY, GtkSky))
35 #define NOVA_SKY_CLASS(obj) \
36 (G_TYPE_CHECK_CLASS_CAST ((obj), NOVA_SKY, GtkSkyClass))
37 #define NOVA_IS_SKY(obj) \
38 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NOVA_TYPE_SKY))
39 #define NOVA_IS_SKY_CLASS(obj) \
40 (G_TYPE_CHECK_CLASS_TYPE ((obj), NOVA_TYPE_SKY))
41 #define NOVA_SKY_GET_CLASS \
42 (G_TYPE_INSTANCE_GET_CLASS ((obj), NOVA_TYPE_SKY, GtkSkyClass))
44 typedef struct _GtkSky GtkSky;
45 typedef struct _GtkSkyClass GtkSkyClass;
47 struct _GtkSky
49 GtkDrawingArea parent;
52 struct _GtkSkyClass
54 GtkDrawingAreaClass parent_class;
57 GtkWidget *virtual_sky_new(void);
58 void sky_connect_signals(GtkWidget *gtk_sky);
59 void sky_set_legend(GtkWidget *sky_widget, GtkWidget *legend_widget);
61 void on_sky_markers_activate(GtkMenuItem *menuitem, gpointer user_data);
63 typedef struct _Sky {
65 /* observer/observatory info */
66 struct observer_info observer;
67 struct tm time;
69 /* sky configuration */
70 struct sky_marker_flags marker_settings;
71 struct solar_system_flags solar_system_settings;
72 struct deep_sky_flags deep_sky_settings;
74 /* sky projection */
75 struct projection projection;
77 /* object datasets */
78 struct astrodb_table *default_star_table;
80 /* render data */
81 struct tile_array *tile;
82 struct render_object robject;
83 gboolean pointer_drag;
84 gint pointer_x, pointer_y;
85 gint redraw_pending;
87 /* file / print */
88 gchar *filename;
89 gint is_modified;
91 /* sky legend */
92 GtkWidget *legend_widget;
94 /* UI config */
95 struct ui_config *ui_config;
96 } Sky;
99 G_END_DECLS
101 #endif