aboutsummaryrefslogtreecommitdiffstats
path: root/gfx.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx.h')
-rw-r--r--gfx.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/gfx.h b/gfx.h
index 608a128..840d0df 100644
--- a/gfx.h
+++ b/gfx.h
@@ -1,8 +1,33 @@
#include <stdbool.h>
#include <inttypes.h>
+#include <pixman.h>
+#include <cairo.h>
+
+/* ---------------------------------------------------------------------- */
+
+#undef MAX
+#define MAX(x,y) ((x)>(y)?(x):(y))
+#undef MIN
+#define MIN(x,y) ((x)<(y)?(x):(y))
+#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
+
+/* ---------------------------------------------------------------------- */
+
+typedef struct gfxfmt gfxfmt;
typedef struct gfxstate gfxstate;
+struct gfxfmt {
+ uint32_t fourcc; /* little endian (drm) */
+ cairo_format_t cairo; /* native endian */
+ pixman_format_code_t pixman; /* native endian */
+ uint32_t bits_pp;
+ uint32_t bytes_pp;
+};
+
+extern gfxfmt fmt_list[];
+extern uint32_t fmt_count;
+
struct gfxstate {
/* info */
uint32_t hdisplay;