aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libdraw/nowsys-event.c83
-rw-r--r--src/libdraw/nowsys-get.c3
-rw-r--r--src/libdraw/nowsys-init.c47
-rw-r--r--src/libdraw/nowsys-itrans.c3
-rw-r--r--src/libdraw/nowsys-keyboard.c28
-rw-r--r--src/libdraw/nowsys-keysym2ucs.c2
-rw-r--r--src/libdraw/nowsys-mouse.c60
-rw-r--r--src/libdraw/nowsys-wsys.c24
8 files changed, 250 insertions, 0 deletions
diff --git a/src/libdraw/nowsys-event.c b/src/libdraw/nowsys-event.c
index e69de29b..4695028d 100644
--- a/src/libdraw/nowsys-event.c
+++ b/src/libdraw/nowsys-event.c
@@ -0,0 +1,83 @@
+#include <u.h>
+#include <libc.h>
+#include <draw.h>
+#include <cursor.h>
+#include <event.h>
+
+static int
+bad(void)
+{
+ sysfatal("compiled with no window system support");
+ return 0;
+}
+
+ulong
+event(Event *e)
+{
+ USED(e);
+ return bad();
+}
+
+ulong
+eread(ulong keys, Event *e)
+{
+ USED(keys);
+ USED(e);
+ return bad();
+}
+
+void
+einit(ulong keys)
+{
+ USED(keys);
+ bad();
+}
+
+int
+ekbd(void)
+{
+ return bad();
+}
+
+Mouse
+emouse(void)
+{
+ Mouse m;
+
+ bad();
+ return m;
+}
+
+int
+ecanread(ulong keys)
+{
+ USED(keys);
+ return bad();
+}
+
+int
+ecanmouse(void)
+{
+ return bad();
+}
+
+int
+ecankbd(void)
+{
+ return bad();
+}
+
+void
+emoveto(Point p)
+{
+ USED(p);
+ bad();
+}
+
+void
+esetcursor(Cursor *c)
+{
+ USED(c);
+ bad();
+}
+
diff --git a/src/libdraw/nowsys-get.c b/src/libdraw/nowsys-get.c
index e69de29b..2481df18 100644
--- a/src/libdraw/nowsys-get.c
+++ b/src/libdraw/nowsys-get.c
@@ -0,0 +1,3 @@
+/* so that there's *something* in this file */
+int __nowsys__get(void) {return 0;}
+
diff --git a/src/libdraw/nowsys-init.c b/src/libdraw/nowsys-init.c
index e69de29b..003238fd 100644
--- a/src/libdraw/nowsys-init.c
+++ b/src/libdraw/nowsys-init.c
@@ -0,0 +1,47 @@
+#include <u.h>
+#include <libc.h>
+#include <draw.h>
+#include <keyboard.h>
+#include <mouse.h>
+#include <cursor.h>
+
+char *winsize;
+
+static int
+bad(void)
+{
+ sysfatal("compiled with no window system support"):
+ return 0;
+}
+
+Display*
+_initdisplay(void (*error)(Display*, char*), char *label)
+{
+ USED(error);
+ USED(label);
+
+ bad();
+ return nil;
+}
+
+int
+getwindow(Display *d, int ref)
+{
+ USED(d);
+ USED(ref);
+ return bad();
+}
+
+int
+drawsetlabel(char *label)
+{
+ USED(label);
+ return bad();
+}
+
+void
+_flushmemscreen(Rectangle r)
+{
+ bad();
+}
+
diff --git a/src/libdraw/nowsys-itrans.c b/src/libdraw/nowsys-itrans.c
index e69de29b..117e1627 100644
--- a/src/libdraw/nowsys-itrans.c
+++ b/src/libdraw/nowsys-itrans.c
@@ -0,0 +1,3 @@
+/* so that there's *something* in this file */
+int __nowsys__itrans(void) {return 0;}
+
diff --git a/src/libdraw/nowsys-keyboard.c b/src/libdraw/nowsys-keyboard.c
index e69de29b..0c394e6d 100644
--- a/src/libdraw/nowsys-keyboard.c
+++ b/src/libdraw/nowsys-keyboard.c
@@ -0,0 +1,28 @@
+#include <u.h>
+#include <libc.h>
+#include <draw.h>
+#include <thread.h>
+#include <cursor.h>
+#include <mouse.h>
+
+static int
+bad(void)
+{
+ sysfatal("compiled with no window system support");
+ return 0;
+}
+
+void
+closekeyboard(Keyboardctl *mc)
+{
+ USED(mc);
+ bad();
+}
+
+Keyboardctl*
+initkeyboard(char *file)
+{
+ USED(file);
+ bad();
+ return nil;
+}
diff --git a/src/libdraw/nowsys-keysym2ucs.c b/src/libdraw/nowsys-keysym2ucs.c
index e69de29b..fa8ac518 100644
--- a/src/libdraw/nowsys-keysym2ucs.c
+++ b/src/libdraw/nowsys-keysym2ucs.c
@@ -0,0 +1,2 @@
+/* so that there's *something* in this file */
+int __nowsys__itrans(void) {return 0;}
diff --git a/src/libdraw/nowsys-mouse.c b/src/libdraw/nowsys-mouse.c
index e69de29b..d76de555 100644
--- a/src/libdraw/nowsys-mouse.c
+++ b/src/libdraw/nowsys-mouse.c
@@ -0,0 +1,60 @@
+#include <u.h>
+#include <libc.h>
+#include <draw.h>
+#include <thread.h>
+#include <cursor.h>
+#include <mouse.h>
+
+static int
+bad(void)
+{
+ sysfatal("compiled with no window system support");
+ return 0;
+}
+
+void
+moveto(Mousectl *m, Point pt)
+{
+ USED(m);
+ USED(pt);
+ bad();
+}
+
+void
+closemouse(Mousectl *mc)
+{
+ USED(mc);
+ bad();
+}
+
+int
+readmouse(Mousectl *mc)
+{
+ USED(mc);
+ return bad();
+}
+
+Mousectl*
+initmouse(char *file, Image *i)
+{
+ USED(file);
+ USED(i);
+ bad();
+ return nil;
+}
+
+void
+setcursor(Mousectl *mc, Cursor *c)
+{
+ USED(mc);
+ USED(c);
+ bad();
+}
+
+void
+bouncemouse(Mouse *m)
+{
+ USED(m);
+ bad();
+}
+
diff --git a/src/libdraw/nowsys-wsys.c b/src/libdraw/nowsys-wsys.c
index e69de29b..2127dca0 100644
--- a/src/libdraw/nowsys-wsys.c
+++ b/src/libdraw/nowsys-wsys.c
@@ -0,0 +1,24 @@
+#include <u.h>
+#include <libc.h>
+#include <draw.h>
+
+static int
+bad(void)
+{
+ sysfatal("compiled with no window system support");
+ return 0;
+}
+
+void
+drawtopwindow(void)
+{
+ bad();
+}
+
+void
+drawresizewindow(Rectangle r)
+{
+ USED(r);
+
+ bad();
+}