#include <time.h>
#include <gtk/gtk.h>

/* copy of g_list_append, modified to return new list element */
GList* list_append (GList *list, gpointer data);

/* silent version of the lookup_widget that was provided by glade */
GtkWidget *lookup (GtkWidget *widget, const gchar *widget_name);

/* display a message window, which self deletes when user hits ok */
void message (char *title, char *text);

/* display a question window, calls back our function on ok */
void question (char *title, char *text,
		      void (*yes)(GtkButton *button, gpointer user_data),
		      gpointer user_data);

/* binary tree comparison function */
int compare (gconstpointer  a, gconstpointer  b);

/* return a string which is the path to the files saved by us */
char *file_prefix();

/* return a string which is the name of today's per-day save file */
char *file_suffix();

/* timestamp in text */
char *log_stamp(time_t time);

/* translate a time to text */
char *time_to_text(time_t time);

/* translate text back into time */
time_t text_to_time(char *text);

/* given a widget in an entry window, return the entry window pointer */
struct ew *entry_of_widget (GtkWidget *widget);

gint option_menu_get_history (GtkOptionMenu *option_menu);

int widget_get_int (GtkWidget *parent, char *name);

void widget_set_int (GtkWidget *parent, char *name, int value);

