]> git.tdb.fi Git - ext/subsurface.git/blob - display.h
Add the capability to print a dive profile
[ext/subsurface.git] / display.h
1 #ifndef DISPLAY_H
2 #define DISPLAY_H
3
4 #include <gtk/gtk.h>
5 #include <gdk/gdk.h>
6 #include <cairo.h>
7
8 extern GtkWidget *main_window;
9
10 extern void import_dialog(GtkWidget *, gpointer);
11 extern void report_error(GError* error);
12
13 extern GtkWidget *dive_profile_widget(void);
14 extern GtkWidget *dive_info_frame(void);
15 extern GtkWidget *extended_dive_info_widget(void);
16 extern GtkWidget *equipment_widget(void);
17
18 extern void repaint_dive(void);
19 extern void do_print(void);
20
21 /*
22  * Cairo scaling really is horribly horribly mis-designed.
23  *
24  * Which is sad, because I really like Cairo otherwise. But
25  * the fact that the line width is scaled with the same scale
26  * as the coordinate system is a f*&%ing disaster. So we
27  * can't use it, and instead have this butt-ugly wrapper thing..
28  */
29 struct graphics_context {
30         cairo_t *cr;
31         double maxx, maxy;
32         double leftx, rightx;
33         double topy, bottomy;
34 };
35
36 extern void plot(struct graphics_context *gc, int w, int h, struct dive *dive);
37
38 #endif