~foura/libacme

ref: cdd8844c69f9e0848fc9e3e8ac8e73adca59d44d libacme/libacme.man -rw-r--r-- 1.8 KiB
cdd8844cjames palmer events: better naming for event functions. added aeventopen, aeventclose. 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
.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.