mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
682135838f
The following are UI toolkit specific: gtk-gui.c - overall layout, main window of the UI divelist.c - list of dives subsurface maintains equipment.c - equipment / tank information for each dive info.c - detailed dive info print.c - printing The rest is independent of the UI: main.c i - program frame dive.c i - creates and maintaines the internal dive list structure libdivecomputer.c uemis.c parse-xml.c save-xml.c - interface with dive computers and the XML files profile.c - creates the data for the profile and draws it using cairo This commit should contain NO functional changes, just moving code around and a couple of minor abstractions. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
28 lines
730 B
C
28 lines
730 B
C
#ifndef DISPLAY_H
|
|
#define DISPLAY_H
|
|
|
|
#include <cairo.h>
|
|
|
|
extern void repaint_dive(void);
|
|
extern void do_print(void);
|
|
|
|
/*
|
|
* Cairo scaling really is horribly horribly mis-designed.
|
|
*
|
|
* Which is sad, because I really like Cairo otherwise. But
|
|
* the fact that the line width is scaled with the same scale
|
|
* as the coordinate system is a f*&%ing disaster. So we
|
|
* can't use it, and instead have this butt-ugly wrapper thing..
|
|
*/
|
|
struct graphics_context {
|
|
int printer;
|
|
cairo_t *cr;
|
|
double maxx, maxy;
|
|
double leftx, rightx;
|
|
double topy, bottomy;
|
|
};
|
|
|
|
extern void plot(struct graphics_context *gc, int w, int h, struct dive *dive);
|
|
extern void set_source_rgb(struct graphics_context *gc, double r, double g, double b);
|
|
|
|
#endif
|