summaryrefslogtreecommitdiffstats
path: root/display.h
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-11-11 13:20:32 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-11-11 14:44:10 +0100
commit01e8984d7d3b6da1196766b3b411151a5a7a5053 (patch)
treeecea8ec90dcf28b23ec45fad582ded34fbdedc3c /display.h
parentfe4f13f184ffb97ee4b6dbd4138a9d8ae3aabd14 (diff)
downloadsubsurface-01e8984d7d3b6da1196766b3b411151a5a7a5053.tar.gz
Create tool-tip with depth/pressure for the whole profile area
This extends on our current tooltip logic (which shows events when you mouse over them) to show tooltips for the whole profile area. If you mouse over an event, that is still shown in the tooltip, but even in the absense of events, the tooltip will be active, and mousing over the profile area will show the time, depth and pressure. This can certainly be improved upon further, but even in this form it is useful. Fixes #9 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'display.h')
-rw-r--r--display.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/display.h b/display.h
index 880a8b7be..6eea822aa 100644
--- a/display.h
+++ b/display.h
@@ -21,16 +21,20 @@ extern void do_print(void);
struct graphics_context {
int printer;
cairo_t *cr;
+ cairo_rectangle_t drawing_area;
double maxx, maxy;
double leftx, rightx;
double topy, bottomy;
+ unsigned int maxtime;
+ void *plot_info;
};
typedef enum { SC_SCREEN, SC_PRINT } scale_mode_t;
-extern void plot(struct graphics_context *gc, cairo_rectangle_t *drawing_area, struct dive *dive, scale_mode_t scale);
+extern void plot(struct graphics_context *gc, struct dive *dive, scale_mode_t scale);
extern void init_profile_background(struct graphics_context *gc);
extern void attach_tooltip(int x, int y, int w, int h, const char *text);
+extern void get_plot_details(struct graphics_context *gc, int time, char *buf, size_t bufsize);
struct options {
enum { PRETTY, TABLE, ONEPERPAGE } type;