Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

OPEN WORKSTATION(3P)  —  Kubota Pacfic Computer Inc. (29 February 1991)

NAME

OPEN WORKSTATION − open a workstation

SYNOPSIS

C Syntax

void
popen_ws ( ws_id, conn_id, ws_type )
Pintws_id;workstation identifier
Pconnid ∗conn_id;connection identifier
Pintws_type;workstation type

Required PHIGS Operating States

(PHOP, ∗, ∗, ∗)

DESCRIPTION

Purpose

OPEN WORKSTATION opens a workstation of the specified workstation type.  The workstation state list is created and initialized to conform as nearly as possible to the workstation description table associated with the specified workstation type.  If the workstation is successfully opened, the PHIGS workstation state variable is set to WSOP. 

PEX-SI supports two predefined workstation types, x_tool and x_drawable.  Their characteristics are described below.  In addition, the application can create and modify its own workstation types with the WORKSTATION TYPE CREATE and functions. 

If the workstation is opened successfully, a specific workstation type is created and associated with the open workstation.  This specific workstation type contains the workstation description table that describes the capabilities of the opened workstation.  The specific workstation type can be retrieved with INQUIRE WORKSTATION CONNECTION AND TYPE. 

C Input Parameters

ws_idThe workstation identifier to be associated with this workstation.  This value is used to identify the workstation in subsequent PHIGS function calls. 

conn_id
A pointer to the connection identifier of the workstation.  The type of value to use depends on the workstation type:

x_tool
If the conn_id is NULL, a window is created on the default server.  If the conn_id is not NULL, it is interpreted as a display name and a window for the workstation is created on the named server, provided that server supports the X extension.  An example of using this would be:

Popen_ws (ws_id, (char∗)"unix:0", phigs_ws_type_x_tool);

x_drawable
The connection identifier must be a pointer to a Pconnid_x_drawable structure, cast to a char∗. Pconnid_x_drawable is defined in phigs.h as follows:

typdef struct {
Display∗display;
XIDdrawable_id;
} Pconnid_x_drawable;

ws_type
The type of workstation to open. Recognized types are described fully in the Available Workstation Types section below.  They are declared in phigs.h.  A short summary is listed here:

phigs_ws_type_x_tool
PHIGS creates an X window for the workstation on a specified or default server. 

phigs_ws_type_x_drawable
PHIGS uses a specified X window for the workstation. 

Execution

OPEN WORKSTATION opens a PHIGS workstation of the specified type and associates it with the specified workstation identifier. 

When a workstation is opened, PHIGS creates a copy of the workstation type specified in the OPEN WORSTATION call and binds it to the opened workstation.  This copy is called the specific workstation type.  The workstation description table (WDT) of this specific type is checked against the capabilities of the server and window PHIGS is using for the workstation.  If the capabilities specified by the WDT cannot be realized with that server and window, PHIGS modifies the WDT of the specific workstation type to reflect the available capabilities.  The workstation type parameter to OPEN WORKSTATION is not modified; only the specific workstation type is (potentially) modified.  The specific workstation type bound to a workstation can be retrieved with the PHIGS function INQUIRE WORKSTATION CONNECTION AND TYPE. 

Some of a workstation type’s workstation description table values can be changed by the application prior to opening a workstation of that type.  See WORKSTATION TYPE CREATE and WORKSTATION TYPE SET for more information on this. 

Available Workstation Types

phigs_ws_type_x_tool

PHIGS creates an X window on a specified or default server and uses it for the PHIGS workstation’s display surface.  If the PHIGS Monitor is running (see OPEN PHIGS), the default category of this workstation type is OUTIN, which indicates that both input and output are available; otherwise the default category is OUTPUT. 

If the category is OUTIN, PHIGS creates an additional input-only window that it uses to detect pointer events for its Locator, Stroke, and Pick input devices.  This window is transparent, overlies the output window completely, and duplicates any size and position changes made to the ouput window. 

Many of the characteristics of an x_tool workstation type, such as its size and position, can be set prior to opening the workstation.  See WORKSTATION TYPE CREATE and WORKSTATION TYPE SET for a complete list of the modifiable characteristics and their default settings. 

phigs_ws_type_x_drawable

PHIGS uses an application-specified X window for the PHIGS workstation’s display surface.  The window to use is specified in the connection identifier parameter.  The window must be open and associated with a server that supports the PEX extension. 

If the PHIGS Monitor is running (see OPEN PHIGS), the default category of this workstation type is OUTIN, which indicates that both input and output are available; otherwise the default category is OUTPUT. 

Some of the characteristics of an x_drawable workstation type, such as its size and position, can be set prior to opening the workstation.  See WORKSTATION TYPE CREATE and WORKSTATION TYPE SET for a complete list of the modifiable characteristics and their default settings. 

Window System Interaction

Workstation DC limits correspond to the window size used by the PHIGS workstation when the PHIGS workstation is opened.  The units are drawable coordinates.  When the API responds to a window resize event, more or less of the window will be exposed; the PHIGS output will not be scaled.  Decreases in size cause portions of the PHIGS output to be clipped away if the new size is less than the PHIGS viewport limits.  Size increase beyond the viewport limits will not reveal any additional PHIGS ouput. 

PHIGS automatically redraws the PHIGS workstation when portions of it are exposed, such as when it is brought to the top of other windows or moved from an iconic state to an open state.  This redrawing may potentially change portions of the workstation state list by making the “state of visual representation” correct and making all requested entries current. 

For both tool and drawable workstations, a DestroyNotify event on the workstation’s window will cause PHIGS to exit.  A DestroyNotify event is generated either by the application or more likely by the operator when he destroys or “Quit”s the window. 

ERRORS

002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)

050Ignoring function, connection identifier not recognized by the implementation

053Ignoring function, workstation identifier already is in use

052Ignoring function, workstation type not recognized by the implementation

055Ignoring function, workstation cannot be opened for an implementation-dependent reason

063Ignoring function, opening this workstation would exceed the maximum number of simultaneously open workstations

-168Ignoring function, cannot open workstation on a read-only visual with no predefined colormap properties

-169Ignoring function, cannot create an X colormap resource

-200Ignoring function, cannot connect to the designated or default server

-201Ignoring function, the specified or default X server does not support a compatible PEX extension

-202Ignoring function, an X allocation error has occurred

-203Ignoring function, can’t create an Xt shell

SEE ALSO

INQUIRE SET OF OPEN WORKSTATIONS (3P)
OPEN PHIGS (3P)
CLOSE WORKSTATION (3P)
INQUIRE WORKSTATION CONNECTION AND TYPE (3P)
INQUIRE WORKSTATION STATE VALUE (3P)
WORKSTATION TYPE CREATE (3P)
WORKSTATION TYPE SET (3P)

September 02, 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026