From 8472e02a212af0be07b19127db313e8e7523711a Mon Sep 17 00:00:00 2001 From: nirav Date: Sun, 2 Sep 2018 17:16:52 +0530 Subject: Refactoring --- image.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 image.h (limited to 'image.h') diff --git a/image.h b/image.h new file mode 100644 index 0000000..d82fd74 --- /dev/null +++ b/image.h @@ -0,0 +1,26 @@ +#ifndef __IMAGE_H +#define __IMAGE_H + +#include + +#define ZOOM_FACTOR 0.1 + +enum scale_mode { + fit = 0, + zoomed = 1, +} curr_scale_mod; + +GtkWidget *image; +GdkPixbuf *pixbuf; +GdkPixbuf *curr_pixbuf; +int pixbuf_width, pixbuf_height; +double aspect_ratio; +double curr_zoom; + +GtkWidget* new_image(); +int load_image(char *file_name, int win_width, int win_height); +void fit_image(int win_width, int win_height); +void zoom(int type); +void print_supported_formats(); + +#endif -- cgit v1.2.3