~foura/libacme

ref: 997dd8b1ff8c25dde5ed469d08be451123a17d89 libacme/libacme.man -rw-r--r-- 2.3 KiB
997dd8b1james palmer awinsave -> awinput: this didn't match up with the header file. oops :P 1 year, 1 month 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
.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 void		awinctl(AWin *w, char *fmt, ...);
.br
.B void		awinclear(AWin *w);
.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
.B void		awinaddtag(AWin *w, char *tag);
.br
.B void		awinsettag(AWin *w, char *tag);
.PP
.B Channel *	aeventlisten(AWin *w);
.br
.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
.PP
.I Awinfsopen
opens
.B file
in the window\'s directory with the mode specified.
.PP
.I Awincreate
creates a new window in acme and returns a
.B AWin 
struct representing the created window.
.PP
.I Awinclose
closes the window the described by the
.B win
argument and frees its memory.
.PP
.I Awincloseall
closes all windows that have been opened using
.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.
.PP
.I Awinclear
clears the body of the window specified.
.PP
.I Awincat
reads
.B file
and copies in into the window body.
.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
.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.
.SH FILES
.PP
.B /sys/include/acme.h
.SH SEE ALSO
.PP
.IR acme (1),
.IR acme (4),
.IR print (2),
.IR thread (2)