subsurface/display.h
Linus Torvalds 00d798854a Start cleaning up dive accessors
I'm going to add a menu to import (and eventually export) dives, and so
we'd like to be able to start out with no dives at all.  Right now we
croak if that happens - it's not like the code has been written with
actual end users in mind.

So start cleaning things up.  First make the 'current_dive' macro work
right even for invalid dives.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31 16:33:20 -07:00

17 lines
389 B
C

#ifndef DISPLAY_H
#define DISPLAY_H
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <cairo.h>
extern int selected_dive;
#define current_dive (get_dive(selected_dive))
extern GtkWidget *dive_profile_frame(void);
extern GtkWidget *dive_info_frame(void);
extern GtkWidget *create_dive_list(void);
extern void update_dive_info(struct dive *dive);
extern void repaint_dive(void);
#endif