]> git.tdb.fi Git - ext/subsurface.git/blob - display.h
Make the divelist font configurable
[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 const char *divelist_font;
11 extern void set_divelist_font(const char *);
12
13 extern void import_dialog(GtkWidget *, gpointer);
14 extern void report_error(GError* error);
15
16 extern GtkWidget *dive_profile_widget(void);
17 extern GtkWidget *dive_info_frame(void);
18 extern GtkWidget *extended_dive_info_widget(void);
19 extern GtkWidget *equipment_widget(void);
20
21 extern void repaint_dive(void);
22 extern void do_print(void);
23
24 /*
25  * Cairo scaling really is horribly horribly mis-designed.
26  *
27  * Which is sad, because I really like Cairo otherwise. But
28  * the fact that the line width is scaled with the same scale
29  * as the coordinate system is a f*&%ing disaster. So we
30  * can't use it, and instead have this butt-ugly wrapper thing..
31  */
32 struct graphics_context {
33         int printer;
34         cairo_t *cr;
35         double maxx, maxy;
36         double leftx, rightx;
37         double topy, bottomy;
38 };
39
40 extern void plot(struct graphics_context *gc, int w, int h, struct dive *dive);
41
42 #endif