AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox

01.01.2013 Views

TAM (3T) (AT&T UNIX PC only ) TAM(3T) window as large as the screen and every time it receives the SIGWIND signal it resets its window to the top and as large as the screen, the user is effectively blocked from running any other applications. The major difference between the remote and UNIX PC terminals from the application point of view is the lack of kernel level window support for remote terminals. TAM supports windows transparently within a given process, but knows nothing about windows created by other processes. Remote terminals can display multiple windows but, unlike the UNIX PC terminal, only one application owne the screen at a time. TAM simulates the kernel window functions for a particular application by maintaining a screen image, as well as those portions of windows that are overlayed. Each process controls the entire screen, and windows created by other processes are erased when the new process issues a winit() call. TAM uses the insert and delete line functions on remote terminals for scrolling whenever the window is as wide as the screen. This applies to windows with or without borders. Application programmers who are concerned with making their programs run efficiently on remote terminals should use windows of full screen width if planning on scrolling the window. If an application creates a child process that writes to the screen, then after the child process dies, the application must issue a special wrefresh{} call to restore its screen image. For remote terminals, TAM provides window ID's, instead of file descriptors, for accessing windows. Other differences from the bit-mapped terminal are that the tty modes cannot be independently set and child processes do not inherit windows. TAM supports an optional mouse input device. Initially, mouse reports are disabled, so applications that don't use the mouse don't need to worry about it. When mouse reports are turned on by the application, they are returned to the application as a special 8-bit input code (or 7-bit input escape sequence) in the input stream. In the default enabled state, a mouse report is inserted in the input stream on each change of the button state (whether each of the three buttons is up or down). Thus, these reports are buffered and are in sequence with any keyboard input. The mouse report contains the mouse button state and the mouse cursor coordinates. This mouse report can be read and parsed by the application, or the application can use the wgetmouse() call, which reads the information from the input stream and returns it in a structure. After being enabled, the mouse reports initially return only changes in mouse buttons. Optionally, mouse reports can tell if the mouse cursor goes outside (or inside) a specified rectangle. In the case of the remote terminal, mouse reports are never received, and the mouse related subroutine calls are ignored. - 4-

TAM (3T) (AT&T UNIX PC only ) TAM(3T) TAM routines are described below. winit() The winit(} call sets up the process for window access. Winit() must be called before any of the other window calls. wexit() This should be called in place of exit(}. Wexit(} is the same as exit(} but also resets the parameters set by winit() (e.g., tty modes). iswind() Determines if the terminal is local or remote. iswind(} is boolean-if true, the screen is bitmapped. wcreate() Creates a window. Arguments are the row, column of the top left corner of the window, the height and width of the window, and flags. The flags include whether or not the window has a border and whether or not variable character widths are allowed. The flags are described in sysfwindow .h. were ate() returns a window number, wn, used in subsequent calls to that window. If wcreate() fails (returns -1), the programmer should direct an error message to the previous window. wdelete() Deletes a specified window ( wn ). If the deleted window is on top and other windows are below it, the previously obscured windows become visible. wselect() Selects the specified window ( wn) as the current or active one. If the window is covered, it moves to the top. A window is implicitly selected when it is created ( wcreate) or modified ( wsetstat). wgetsel() Returns the wn of the currently selected window. wgetstat() Returns the information in WSTAT for a specified window ( wn ). Arguments are wn and the pointer to WSTAT. The content of WSTAT is: wsetstat() struct wstat { short begy,begx,height,width; unsigned short uflags; } }; typedef struct wstat WSTAT; The information includes the position and dimensions of the window, whether or not borders are on or off, and whether or not variable width characters are allowed. Sets the status for a specified window ( wn ) . Wsetstat() changes the parameters in WSTAT for a specified window and selects the window implicitly. - 5-

TAM (3T) (AT&T UNIX PC only ) TAM(3T)<br />

TAM routines are described below.<br />

winit() The winit(} call sets up the process for window<br />

access. Winit() must be called before any of the<br />

other window calls.<br />

wexit() This should be called in place of exit(}. Wexit(}<br />

is the same as exit(} but also resets the parameters<br />

set by winit() (e.g., tty modes).<br />

iswind() Determines if the terminal is local or remote.<br />

iswind(} is boolean-if true, the screen is bitmapped.<br />

wcreate() Creates a window. Arguments are the row,<br />

column of the top left corner of the window, the<br />

height and width of the window, and flags. The<br />

flags include whether or not the window has a<br />

border and whether or not variable character<br />

widths are allowed. The flags are described in<br />

sysfwindow .h. were ate() returns a window<br />

number, wn, used in subsequent calls to that window.<br />

If wcreate() fails (returns -1), the programmer<br />

should direct an error message to the previous<br />

window.<br />

wdelete() Deletes a specified window ( wn ). If the deleted<br />

window is on top and other windows are below it,<br />

the previously obscured windows become visible.<br />

wselect() Selects the specified window ( wn) as the current or<br />

active one. If the window is covered, it moves to<br />

the top. A window is implicitly selected when it is<br />

created ( wcreate) or modified ( wsetstat).<br />

wgetsel() Returns the wn of the currently selected window.<br />

wgetstat() Returns the information in WSTAT for a specified<br />

window ( wn ). Arguments are wn and the pointer<br />

to WSTAT. The content of WSTAT is:<br />

wsetstat()<br />

struct wstat<br />

{<br />

short begy,begx,height,width;<br />

unsigned short uflags; }<br />

};<br />

typedef struct wstat WSTAT;<br />

The information includes the position and dimensions<br />

of the window, whether or not borders are on<br />

or off, and whether or not variable width characters<br />

are allowed.<br />

Sets the status for a specified window ( wn ) .<br />

Wsetstat() changes the parameters in WSTAT for<br />

a specified window and selects the window implicitly.<br />

- 5-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!