summaryrefslogtreecommitdiff
path: root/demo.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-06-29 09:07:14 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-06-29 09:07:14 +0100
commitb1702f2ab3ab44b1418315270e727478008a6c62 (patch)
tree3e76962ee1f9551047e7824eacae83d43893fdba /demo.h
parente95232ddab6826dd7ea8306495aa122ea64829c9 (diff)
Move the common device open into its own routine.
Diffstat (limited to 'demo.h')
-rw-r--r--demo.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/demo.h b/demo.h
index f2de9c6..aecba36 100644
--- a/demo.h
+++ b/demo.h
@@ -25,9 +25,34 @@ struct slide {
void (*draw) (struct slide *, cairo_t *, int, int);
};
+struct device *device_open(int argc, char **argv);
+#if HAVE_GLX
+struct device *glx_open (int argc, char **argv);
+#else
+static inline struct device *glx_open (int argc, char **argv) { return 0; }
+#endif
+
+#if HAVE_XCB
struct device *xcb_open (int argc, char **argv);
+#else
+static inline struct device *xcb_open (int argc, char **argv) { return 0; }
+#endif
+
+#if HAVE_XLIB
struct device *xlib_open (int argc, char **argv);
+#else
+static inline struct device *xlib_open (int argc, char **argv) { return 0; }
+#endif
+
+#if HAVE_XIMAGE
struct device *ximage_open (int argc, char **argv);
-struct device *glx_open (int argc, char **argv);
+#else
+static inline struct device *ximage_open (int argc, char **argv) { return 0; }
+#endif
+
+#if HAVE_DRM
struct device *drm_open (int argc, char **argv);
+#else
+static inline struct device *drm_open (int argc, char **argv) { return 0; }
+#endif