summaryrefslogtreecommitdiffstats
path: root/display.h
diff options
context:
space:
mode:
Diffstat (limited to 'display.h')
-rw-r--r--display.h31
1 files changed, 24 insertions, 7 deletions
diff --git a/display.h b/display.h
index c61abcf90..b62ae3ba3 100644
--- a/display.h
+++ b/display.h
@@ -1,14 +1,18 @@
#ifndef DISPLAY_H
#define DISPLAY_H
-#include <cairo.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
#define SCALE_SCREEN 1.0
#define SCALE_PRINT (1.0 / get_screen_dpi())
extern void repaint_dive(void);
extern void do_print(void);
-extern gdouble get_screen_dpi(void);
+
+// Commented out because I don't know how to get the dpi on a paint device yet.
+extern double get_screen_dpi(void);
/* Plot info with smoothing, velocity indication
* and one-, two- and three-minute minimums and maximums */
@@ -20,11 +24,16 @@ struct plot_info {
int mintemp, maxtemp;
double endtempcoord;
double maxpp;
- gboolean has_ndl;
+ bool has_ndl;
struct plot_data *entry;
};
/*
+// I'm not sure if this is needed anymore - but keeping this here
+// so I wont break stuff trying to redo the well.
+*/
+
+/*
* Cairo scaling really is horribly horribly mis-designed.
*
* Which is sad, because I really like Cairo otherwise. But
@@ -34,8 +43,6 @@ struct plot_info {
*/
struct graphics_context {
int printer;
- cairo_t *cr;
- cairo_rectangle_t drawing_area;
double maxx, maxy;
double leftx, rightx;
double topy, bottomy;
@@ -49,7 +56,7 @@ extern void plot(struct graphics_context *gc, struct dive *dive, scale_mode_t sc
extern struct divecomputer *select_dc(struct divecomputer *main);
extern void init_profile_background(struct graphics_context *gc);
extern void attach_tooltip(int x, int y, int w, int h, const char *text, struct event *event);
-extern void get_plot_details(struct graphics_context *gc, int time, char *buf, size_t bufsize);
+extern void get_plot_details(struct graphics_context *gc, int time, char *buf, int bufsize);
extern int x_to_time(double x);
extern int x_abs(double x);
@@ -57,7 +64,7 @@ struct options {
enum { PRETTY, TABLE, TWOPERPAGE } type;
int print_selected;
int color_selected;
- gboolean notes_up;
+ bool notes_up;
int profile_height, notes_height, tanks_height;
};
@@ -65,4 +72,14 @@ extern char zoomed_plot, dc_number;
extern unsigned int amount_selected;
+extern int is_default_dive_computer_device(const char *);
+extern int is_default_dive_computer(const char *, const char *);
+extern const char *default_dive_computer_vendor;
+extern const char *default_dive_computer_product;
+extern const char *default_dive_computer_device;
+
+#ifdef __cplusplus
+}
+#endif
+
#endif