aboutsummaryrefslogtreecommitdiff
path: root/src/image.h
diff options
context:
space:
mode:
authornirav <nirav@teisuu.com>2018-09-09 12:13:13 +0530
committerDandelion <nirav@teisuu.com>2018-09-09 12:46:57 +0530
commite54d8327819e310b7b148e45c15fca197be845c7 (patch)
tree04e513d52ed2191364e6b9472cd0f3882a60da4a /src/image.h
parent661756c9237a26562cae102f53b12aa0b403fde1 (diff)
downloadim-e54d8327819e310b7b148e45c15fca197be845c7.tar.gz
im-e54d8327819e310b7b148e45c15fca197be845c7.zip
Moved source files to src dir, updated makefile
Diffstat (limited to 'src/image.h')
-rw-r--r--src/image.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/image.h b/src/image.h
new file mode 100644
index 0000000..dfbd9ff
--- /dev/null
+++ b/src/image.h
@@ -0,0 +1,25 @@
+#ifndef __IMAGE_H
+#define __IMAGE_H
+
+#include <gtk-3.0/gtk/gtk.h>
+
+#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, curr_pixbuf_width, curr_pixbuf_height;
+double aspect_ratio;
+double curr_zoom;
+
+GtkWidget *new_image();
+int load_image(char *file_name);
+void fit_image();
+void zoom(int type);
+
+#endif