ref: 2f6fbc8ffe5f528721887b7e1c257b643f9b1ef1
author: james palmer <foura@biobuf.link>
date: Wed Jun 2 11:55:38 EDT 2021
init: prototyped the api in acme.h
--- /dev/null
+++ b/acme.h
@@ -1,0 +1,34 @@
+#pragma lib "libacme.a"
+
+enum {
+ Eventsz = 256 * UTFMax;
+};
+
+typedef struct Win Win;
+struct Win {
+ int id;
+ int ctl;
+ int event;
+ int addr;
+ int data;
+};
+
+Win * wincreate();
+void winclose(Win *);
+void wintitle(Win *, char *, ...);
+void winctl(Win *, char *, ...);
+void winclear(Win *);
+
+typedef struct Event Event;
+struct Event {
+ char origin; /* mouse, keyboard, etc. */
+ char type; /* delete, exec, etc. */
+ int p; /* click point */
+ int q0, q1; /* expanded text */
+ int flags;
+ int ntext;
+ char text[Eventsz + 1];
+};
+
+void nextevent(Win *, Event *);
+void sendevent(Win *, Event *);
--- /dev/null
+++ b/mkfile
@@ -1,0 +1,10 @@
+</$objtype/mkfile
+
+LIB=libacme.a$O
+LIBDIR=/$objtype/lib
+OFILES=\
+ window.$O\
+ event.$O
+HFILES=acme.h
+
+</sys/src/cmd/mksyslib