~foura/libacme

ref: b26a8fbbb6d332c0da8bbfce89eb2fbda6e606eb libacme/libacme.man -rw-r--r-- 1.7 KiB
b26a8fbbjames palmer events: store source window in AEvent struct. 4 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
.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.