10a102652b4cc3076f2eaa4299413e8777ae3183 — james palmer 4 months ago 07844fc
libacme.man: update to match changes
1 files changed, 39 insertions(+), 76 deletions(-)

M libacme.man
M libacme.man => libacme.man +39 -76
@@ 18,100 18,60 @@ acme \- functions for interacting with acme's filesystem interface
.B void		awincloseall(void);
.B void		awinctl(AWin *w, char *fmt, ...);
.B int		awinload(AWin *w, char *file);
.B void		awinclear(AWin *w);
.B int		awincat(AWin *w, char *file);
.B void		awinprint(AWin *w, char *fmt, ...);
.B void		awinerror(AWin *w, char *fmt, ...);
.B int		awinput(AWin *w, char *file);
.B void		awinaddtag(AWin *w, char *tag);
.B void		awinsettag(AWin *w, char *tag);
.B Channel *	aeventlisten(AWin *w);
.B void		aeventstop(AWin *w);
.B void		aeventsend(AWin *w, AEvent *ev);
These routines provide an interface to
.IR acme (1)\'s
filesystem interface described in
.IR acme (3).
.SS Window management
.I Awinfsopen
.B file
in the window\'s directory with the mode specified.
These routines provide a C interface to
.IR acme (1)'s
filesystem interface (described in
.IR acme (3)).
.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.
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.
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.
.I Awinclear
clears the body of the window specified.
.I Awincat
.I Awinload
.B file
and copies in into the window body.
.I Awinprint,
.I awinerror,
.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
.I awinfatal
write to the window errors file.
.I Awinfatal
will also close the window.
.SS Event interface
.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.
.I Awinstop
closes the channel allocated by
.I awinlisten
and stops processing of events.
.I Awinsend
writes an event to the events file. Causing acme to
react as if the user caused the event.
from disk into the body of the window
.BR w .
.I Awinput does the opposite, saving the contents of the window body
.BR file .
.I Awinaddtag adds
.B tag
to the end of the window tag.
.I Awinsettag replaces the current window tag.
.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.
.B /sys/include/acme.h

@@ 121,3 81,6 @@ react as if the user caused the event.
.IR acme (4),
.IR print (2),
.IR thread (2)