shithub: libacme

ref: cdd8844c69f9e0848fc9e3e8ac8e73adca59d44d
dir: /libacme.man/

View raw version
.TH ACME 2
.SH NAME
acme \- functions for interacting with acme's filesystem interface
.SH SYNOPSIS
.B #include <u.h>
.br
.B #include <libc.h>
.br
.B #include <thread.h>
.br
.B #include <acme.h>
.PP
.B int		awinfsopen(AWin *w, char *file, int mode);
.PP
.B AWin *	awincreate(void);
.br
.B void		awinclose(AWin *w);
.br
.B void		awincloseall(void);
.PP
.B int		awinload(AWin *w, char *file);
.br
.B int		awinput(AWin *w, char *file);
.br
.PP
.B void		awinaddtag(AWin *w, char *tag);
.br
.B void		awinsettag(AWin *w, char *tag);
.br
.PP
.B void		aeventlisten(AWin *w);
.br
.B void		aeventnext(AWin *w);
.br
.B void		aeventsend(AWin *w, AEvent *ev);
.br
.B void		aeventstop(AWin *w);
.SH DESCRIPTION
.PP
These routines provide a C interface to
.IR acme (1)'s
filesystem interface (described in
.IR acme (3)).
.PP
.I Awinfsopen 
opens the specified file from the window\'s directory in the acme filesystem.
.I Awincreate
opens a new window in acme and allocates an AWin struct to represent it.
.I Awinclose
destroys the specfied window and frees it\'s memory.
.I Awincloseall
destroys every acme window that was created with
.I awincreate.
It should be called when a program exits.
.PP
.I Awinload
loads
.B file
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 Awinaddtag adds
.B tag
to the end of the window tag.
.I Awinsettag replaces the current window tag.
.PP
.I Aeventopen
opens the window event file. It should be called before using
.IR aeventnext .
.I Aeventread
reads the next event into
.BR ev .
.I Aventwrite
writes the event
.B ev
to the events file.
.I Aeventclose
closes the event file. It should be called when the program
no longer wishes to process events.
.SH FILES
.PP
.B /sys/include/acme.h
.SH SEE ALSO
.PP
.IR acme (1),
.IR acme (4),
.IR print (2),
.IR thread (2)
.SH BUGS
.PP
Yes.