#ifndef SIV_H #define SIV_H #include #include #include #define APPLICATION_NAME "Simple Image Viewer" #define GLADE_FILE DATADIR"/siv.glade" typedef struct Window Window; typedef struct App App; typedef struct MetaData MetaData; typedef enum { BG_FIRST, BG_NONE = BG_FIRST, BG_CHECKERBOARD, BG_WHITE, BG_LAST } BackgroundType; struct MetaData { int window_x; int window_y; int window_width; int window_height; BackgroundType background; gboolean smooth_image; int zoom_level; int vadj; int hadj; }; /* App */ void app_register_window (App *app, Window *window); void app_unregister_window (App *app, Window *window); MetaData *app_get_meta_data (App *app, const char *file); void app_set_meta_data (App *data, const char *filename, int window_x, int window_y, int window_height, int window_width, gboolean smooth_image, BackgroundType background, int zoom_level, int vadj, int hadj); /* Doesn't really belong in the app namespace */ void app_show_warning (GtkWidget *parent_window, const gchar *format, ...); /* Window */ Window * window_new (App *app); gboolean window_load_file (Window *window, const char *file, GError **err); void window_show (Window *window, guint32 time); void window_free (Window *window); #endif