ref: 10a102652b4cc3076f2eaa4299413e8777ae3183
parent: 07844fca03a7c083a3ba6ab818e4df06510c57cd
author: james palmer <[email protected]>
date: Thu Jul 8 17:12:24 EDT 2021
libacme.man: update to match changes
--- a/libacme.man
+++ b/libacme.man
@@ -18,100 +18,60 @@
.br
.B void awincloseall(void);
.PP
-.B void awinctl(AWin *w, char *fmt, ...);
+.B int awinload(AWin *w, char *file);
.br
-.B void awinclear(AWin *w);
+.B int awinput(AWin *w, char *file);
.br
-.B int awincat(AWin *w, char *file);
-.br
-.B void awinprint(AWin *w, char *fmt, ...);
-.br
-.B void awinerror(AWin *w, char *fmt, ...);
-.br
+.PP
.B void awinaddtag(AWin *w, char *tag);
.br
.B void awinsettag(AWin *w, char *tag);
-.PP
-.B Channel * aeventlisten(AWin *w);
.br
+.PP
.B void aeventstop(AWin *w);
.br
.B void aeventsend(AWin *w, AEvent *ev);
.SH DESCRIPTION
.PP
-These routines provide an interface to
-.IR acme (1)\'s
-filesystem interface described in
-.IR acme (3).
-.SS Window management
+These routines provide a C interface to
+.IR acme (1)'s
+filesystem interface (described in
+.IR acme (3)).
.PP
-.I Awinfsopen
-opens
-.B file
-in the window\'s directory with the mode specified.
-.PP
+.I Awinfsopen
+opens the specified file from the window\'s directory in the acme filesystem.
.I Awincreate
-creates a new window in acme and returns a
-.B AWin
-struct representing the created window.
-.PP
+opens a new window in acme and allocates an AWin struct to represent it.
.I Awinclose
-closes the window the described by the
-.B win
-argument and frees its memory.
-.PP
+destroys the specfied window and frees it\'s memory.
.I Awincloseall
-closes all windows that have been opened using
+destroys every acme window that was created with
.I awincreate.
-.SS Window control
-.I awinctl
-writes a message to the window's control file. The
-.B fmt
-argument is a
-.IR print (2)
-style format string used to format the control message.
+It should be called when a program exits.
.PP
-.I Awinclear
-clears the body of the window specified.
-.PP
-.I Awincat
-reads
+.I Awinload
+loads
.B file
-and copies in into the window body.
+from disk into the body of the window
+.BR w .
+.I Awinput does the opposite, saving the contents of the window body
+into
+.BR file .
.PP
-.I Awinprint,
-.I awinerror,
-and
-.I awinfatal
-function similarly to
-.I awinctl;
-writing to different window control files with
-.IR print (2)
-style format strings.
-.I Awinprint
-writes to the window body wheras
-.I awinerror
-and
-.I awinfatal
-write to the window errors file.
-.I Awinfatal
-will also close the window.
-.SS Event interface
+.I Awinaddtag adds
+.B tag
+to the end of the window tag.
+.I Awinsettag replaces the current window tag.
.PP
-.I Awinlisten
-returns a channel of
-.B AEvent
-structures (also storing it in w->eventc) and launches a
-process to fill it with events as they occur.
-.PP
-.I Awinstop
-closes the channel allocated by
-.I awinlisten
-and stops processing of events.
-.PP
-.I Awinsend
-writes an event to the events file. Causing acme to
-react as if the user caused the event.
+.I Aeventnext reads the next event into
+.BR ev .
+.I Aventsend writes the event
+.B ev
+to the events file.
+They require
+.B w->eventfd
+to be a file descriptor reffering to
+the event file in the window\'s directory.
.SH FILES
.PP
.B /sys/include/acme.h
@@ -121,3 +81,6 @@
.IR acme (4),
.IR print (2),
.IR thread (2)
+.SH BUGS
+.PP
+Yes.