ref: 10a102652b4cc3076f2eaa4299413e8777ae3183
dir: /libacme.man/
.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 aeventstop(AWin *w); .br .B void aeventsend(AWin *w, AEvent *ev); .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 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 .SH SEE ALSO .PP .IR acme (1), .IR acme (4), .IR print (2), .IR thread (2) .SH BUGS .PP Yes.