add new-output handler
This commit is contained in:
@@ -201,10 +201,35 @@ As of now, river only supports a single seat anyway.
|
||||
.RE
|
||||
.
|
||||
.P
|
||||
\fBnew-output\fR
|
||||
.RE
|
||||
.RS
|
||||
A handler installed under this key will be called everytime a new output appears.
|
||||
On binding, it is also called for all outputs that already exist at that time.
|
||||
.P
|
||||
Installing a new-output handler will cause riverguile to run continously.
|
||||
.P
|
||||
The handler procderure must accept a single argument, the global name of the
|
||||
output (integer).
|
||||
.P
|
||||
Here is an example of a simple new-output handler which merely logs new outputs:
|
||||
.P
|
||||
.RS
|
||||
.EX
|
||||
(\fBinstall-handler\fR 'new-output
|
||||
(\fBlambda\fR (output)
|
||||
(\fBdisplay\fR "New output: ")
|
||||
(\fBdisplay\fR output)
|
||||
(\fBnewline\fR)))
|
||||
.EE
|
||||
.RE
|
||||
.RE
|
||||
.
|
||||
.P
|
||||
\fBexit\fR
|
||||
.RE
|
||||
.RS
|
||||
This key allows you to installs a handler which is called when riverguile exits.
|
||||
This key allows you to install a handler which is called when riverguile exits.
|
||||
.P
|
||||
The procedure takes no arguments.
|
||||
.P
|
||||
|
||||
Reference in New Issue
Block a user