LIBWINDOWS(3X) INTERACTIVE UNIX System LIBWINDOWS(3X)
NAME
libwindows - windowing terminal function library
SYNOPSIS
cc [flag ...] file ... -lwindows [library ...]
int cntlfd, fd
int chan
int origin_x, origin_y, corner_x, corner_y
char *command
cntlfd = openagent ( )
chan = New (cntlfd, origin_x, origin_y, corner_x, corner_y)
chan = Newlayer (cntlfd, origin_x, origin_y, corner_x, corner_y)
fd = openchan (chan)
Runlayer (chan, command)
Current (cntlfd, chan)
Delete (cntlfd, chan)
Top (cntlfd, chan)
Bottom (cntlfd, chan)
Move (cntlfd, chan, origin_x, origin_y)
Reshape (cntlfd, chan, origin_x, origin_y, corner_x, corner_y)
Exit (cntlfd)
DESCRIPTION
This library of routines enables a program running on a host
UNIX system to perform windowing terminal functions [see
layers(1)].
The openagent() routine opens the control channel of the
xt(7) channel group to which the calling process belongs.
Upon successful completion, openagent() returns a file
descriptor, cntlfd, that can be passed to any of the other
libwindows routines except openchan() and Runlayer().
[cntlfd can also be passed to close(2).] Otherwise, the
value -1 is returned.
The New() routine creates a new layer with a separate shell.
The origin_x, origin_y, corner_x, and corner_y arguments
are the coordinates of the layer rectangle. If all the
coordinate arguments are 0, the user must define the layer's
rectangle interactively. The layer appears on top of any
overlapping layers. The layer is not made current (i.e.,
the keyboard is not attached to the new layer). Upon suc-
cessful completion, New() returns the xt(7) channel number
associated with the layer. Otherwise, the value -1 is
returned.
The Newlayer() routine creates a new layer without executing
a separate shell. Otherwise it is identical to New(),
described above.
The openchan() routine opens the channel argument chan which
is obtained from the New() or Newlayer() routine. Upon
Rev. C Software Development Set Page 1
LIBWINDOWS(3X) INTERACTIVE UNIX System LIBWINDOWS(3X)
successful completion, openchan() returns a file descriptor
that can be used as input to write(2) or close(2). Other-
wise, the value -1 is returned.
The Runlayer() routine runs the specified command in the
layer associated with the channel argument chan. Any
processes currently attached to this layer will be killed,
and the new process will have the environment of the
layers(1) process.
The Current() routine makes the layer associated with the
channel argument chan current (i.e., attached to the key-
board).
The Delete() routine deletes the layer associated with the
channel argument chan and kills all host processes associ-
ated with the layer.
The Top() routine makes the layer associated with the chan-
nel argument chan appear on top of all overlapping layers.
The Bottom() routine puts the layer associated with the
channel argument chan under all overlapping layers.
The Move() routine moves the layer associated with the chan-
nel argument chan from its current screen location to a new
screen location at the origin point (origin_x, origin_y).
The size and contents of the layer are maintained.
The Reshape() routine reshapes the layer associated with the
channel argument chan. The arguments origin_x, origin_y,
corner_x, and corner_y are the new coordinates of the layer
rectangle. If all the coordinate arguments are 0, the user
is allowed to define the layer's rectangle interactively.
The Exit() routine causes the layers(1) program to exit,
killing all processes associated with it.
RETURN VALUE
Upon successful completion, Runlayer(), Current(), Delete(),
Top(), Bottom(), Move(), Reshape(), and Exit() return a 0,
while openagent(), New(), Newlayer(), and openchan() return
values as described above under each routine. If an error
occurs, -1 is returned.
FILES
/usr/lib/libwindows.a windowing terminal function library
SEE ALSO
close(2), write(2), jagent(5).
layers(1), xt(7) in the INTERACTIVE UNIX System
User's/System Administrator's Reference Manual.
Rev. C Software Development Set Page 2
LIBWINDOWS(3X) INTERACTIVE UNIX System LIBWINDOWS(3X)
NOTE
The values of layer rectangle coordinates are dependent on
the type of terminal. This dependency affects the routines
that pass layer rectangle coordinates: Move(), New(),
Newlayer(), and Reshape(). Some terminals will expect these
numbers to be passed as character positions (bytes); others
will expect the information to be in pixels (bits).
For example, for the AT&T TELETYPE 5620 DMD terminal, New(),
Newlayer(), and Reshape() take minimum values of 8 (pixels)
for origin_x and origin_y and maximum values of 792 (pixels)
for corner_x and 1016 (pixels) for corner_y. In addition,
the minimum layer size is 28 by 28 pixels and the maximum
layer size is 784 by 1008 pixels.
Rev. C Software Development Set Page 3