aboutsummaryrefslogtreecommitdiffstats
path: root/src/meh.h
diff options
context:
space:
mode:
authorJohn Hawthorn <jhawthor@uvic.ca>2008-09-13 00:02:38 -0700
committerJohn Hawthorn <jhawthor@uvic.ca>2008-09-13 00:02:38 -0700
commitd9e9f33c3210b71c07c4268415ff9b1555819b3f (patch)
tree1574715591b8ae6cb08771ff19670b56a5c887a9 /src/meh.h
parent219d3d9d9c17db046755327054be8061bdb2bb7a (diff)
downloadmirror-meh-d9e9f33c3210b71c07c4268415ff9b1555819b3f.tar.gz
mirror-meh-d9e9f33c3210b71c07c4268415ff9b1555819b3f.tar.bz2
mirror-meh-d9e9f33c3210b71c07c4268415ff9b1555819b3f.zip
Major changes. Optional XShm support, bilinear scaling, caching WIP
Diffstat (limited to 'src/meh.h')
-rw-r--r--src/meh.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/meh.h b/src/meh.h
index 521e4a9..d7f160e 100644
--- a/src/meh.h
+++ b/src/meh.h
@@ -1,6 +1,8 @@
#include <stdio.h>
+#include "X11/Xlib.h"
+
struct image;
struct imageformat{
@@ -9,14 +11,25 @@ struct imageformat{
void (*close)(struct image *);
};
+typedef enum{
+ NONE,
+ IMG,
+ ALLOC,
+ LINEAR,
+ LINEARDRAWN,
+ BILINEAR,
+ BILINEARDRAWN,
+} drawstate;
+
struct image{
unsigned char *buf;
- unsigned int width, height;
+ unsigned int bufwidth, bufheight;
struct imageformat *fmt;
+ int redraw;
+ drawstate state;
+ XImage *ximg;
};
-#include "X11/Xlib.h"
-
XImage *ximage(struct image *img, unsigned int width, unsigned int height);
void setaspect(unsigned int w, unsigned int h);
void xinit();