Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

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

NAME

WORKSTATION TYPE SET − set workstation type attributes — PEX-SI Extension

SYNOPSIS

C Syntax

caddr_t
phigs_ws_type_set ( wst, <attribute-value list> )
Pintwst; workstation type
Phigs_ws_type_attrattributes; attributes

Required PHIGS Operating States

(PHOP, ∗, ∗, ∗)

DESCRIPTION

Purpose

WORKSTATION TYPE SET changes the specified attribute values in the workstation description table associated with the specified workstation type. 

The workstation description table associated with each workstation type contains both PHIGS-defined fields and PEX-SI-specific fields.  All of the PEX-SI-specific fields and some of the PHIGS-specific fields can be changed with WORKSTATION TYPE SET.  The fields that can be modified are listed below in the Workstation Type Attributes section. 

WORKSTATION TYPE SET operates only on workstation types created by WORKSTATION TYPE CREATE.  The predefined types cannot be modified, nor can types returned by INQUIRE WORKSTATION CONNECTION AND TYPE.  See OPEN WORKSTATION for a description of the predefined workstation types. 

This is a PEX-SI addition, and is not part of the PHIGS standard. 

C Input Parameters

wstThe workstation type to modify.  This cannot be a specific workstation type (one associated with an open workstation) or one of the predefined types. 

<attribute-value list>
A zero terminated list of workstation type attributes and corresponding values.  The attributes are members of the Phigs_ws_type_attr enumeration defined in phigs.h.  The data type of the values varies according to the attribute.  The list of attributes below specifies the value type required for each attribute.  The attribute fields of the workstation type are modified according to the contents of this list.

Phigs_ws_type_attr is defined as follows:

typedef enum {
/∗ generic attributes start at 1 ∗/
PHG_BASE_NAME = PHIGS_ATTR( PHG_ATTR_ENUM, PHIGS_FIRST_ATTR + 5),
#define  PHIGS_BASE_NAME  (char ∗)PHG_BASE_NAME
/∗ generic X attributes start at 25 ∗/
/∗ PHIGS_X_DISPLAY can only be set.  Only the name is remembered. ∗/
PHG_X_DISPLAY = PHIGS_ATTR( PHG_ATTR_STRING, PHIGS_FIRST_ATTR + 25),
#define PHIGS_X_DISPLAY (char ∗)PHG_X_DISPLAY
PHG_X_DISPLAY_NAME = PHIGS_ATTR( PHG_ATTR_STRING, PHIGS_FIRST_ATTR + 26),
#define PHIGS_X_DISPLAY_NAME (char ∗)PHG_X_DISPLAY_NAME
PHG_X_DISPLAY_WINDOW = PHIGS_ATTR( PHG_ATTR_INT_PAIR, PHIGS_FIRST_ATTR + 27),
#define PHIGS_X_DISPLAY_WINDOW (char ∗)PHG_X_DISPLAY_WINDOW
/∗ PHIGS_X_RMDB can only be set. ∗/
PHG_X_RMDB = PHIGS_ATTR( PHG_ATTR_INT_TRIPLE, PHIGS_FIRST_ATTR + 28),
#define PHIGS_X_RMDB (char ∗)PHG_X_RMDB
PHG_X_BUF_MODE = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 29),
#define PHIGS_X_BUF_MODE (char ∗)PHG_X_BUF_MODE
PHG_X_HANDLE_EXPOSE = PHIGS_ATTR( PHG_ATTR_BOOLEAN, PHIGS_FIRST_ATTR + 31),
#define PHIGS_X_HANDLE_EXPOSE (char ∗)PHG_X_HANDLE_EXPOSE
PHG_X_HANDLE_DESTROY = PHIGS_ATTR( PHG_ATTR_BOOLEAN, PHIGS_FIRST_ATTR + 32),
#define PHIGS_X_HANDLE_DESTROY (char ∗)PHG_X_HANDLE_DESTROY
PHG_DC_MODEL = PHIGS_ATTR( PHG_ATTR_ENUM, PHIGS_FIRST_ATTR + 33),
#define PHIGS_DC_MODEL  (char ∗)PHG_DC_MODEL
PHG_X_CMAP_PROP_ATOM = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 34),
#define PHIGS_X_CMAP_PROP_ATOM (char ∗)PHG_X_CMAP_PROP_ATOM
/∗ tool attributes start at 50 ∗/
PHG_TOOL_WIDTH = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 50),
#define PHIGS_TOOL_WIDTH (char ∗)PHG_TOOL_WIDTH
PHG_TOOL_HEIGHT = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 51),
#define PHIGS_TOOL_HEIGHT (char ∗)PHG_TOOL_HEIGHT
PHG_TOOL_X = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 52),
#define PHIGS_TOOL_X (char ∗)PHG_TOOL_X
PHG_TOOL_Y = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 53),
#define PHIGS_TOOL_Y (char ∗)PHG_TOOL_Y
PHG_TOOL_LABEL = PHIGS_ATTR( PHG_ATTR_STRING, PHIGS_FIRST_ATTR + 54),
#define PHIGS_TOOL_LABEL (char ∗)PHG_TOOL_LABEL
PHG_TOOL_ICON_NAME = PHIGS_ATTR( PHG_ATTR_STRING, PHIGS_FIRST_ATTR + 55),
#define PHIGS_TOOL_ICON_NAME (char ∗)PHG_TOOL_ICON_NAME
PHG_TOOL_BORDER_WIDTH = PHIGS_ATTR( PHG_ATTR_INT, PHIGS_FIRST_ATTR + 56),
#define PHIGS_TOOL_BORDER_WIDTH (char ∗)PHG_TOOL_BORDER_WIDTH
/∗ Phigs attributes start at 150 ∗/
PHG_WS_CATEGORY = PHIGS_ATTR( PHG_ATTR_ENUM, PHIGS_FIRST_ATTR + 150),
#define PHIGS_WS_CATEGORY (char ∗)PHG_WS_CATEGORY
} Phigs_ws_type_attr;

The following is an example of an attribute list:

Pintwst;
phigs_ws_type_set( wst,
PHIGS_TOOL_X, (char∗)700,
PHIGS_TOOL_Y, (char∗)100,
PHIGS_TOOL_WIDTH, (char∗)200,
PHIGS_TOOL_HEIGHT, (char∗)200,
PHIGS_TOOL_LABEL, "views",
(char∗)0 );

Execution

WORKSTATION TYPE SET modifies the fields of the workstation description table associated with the specified workstation type.  The modifiable fields are listed below.  The changes are specified with attribute-value pairs.  The attribute specifies the field to change, the value is the value to assign to the field.  The PEX-SI-specific fields are different for different workstation types, so the attributes are listed according to the workstation type to which they apply. 

Workstation Type Attributes

The workstation description table attributes are described here.  The C constants are listed along with a description of each attribute, the data type required, and the default value.  The C constants are members of the Phigs_ws_type_attr enumerated type defined in phigs.h. 

Common x_tool and x_drawable Attributes

PHIGS_BASE_NAME  (C)
This argument to WORKSTATION TYPE GET retrieves the base type of the workstation type.  It can not be specified as an argument to WORKSTATION TYPE SET or WORKSTATION TYPE CREATE. 

C enumeration: 

PHIGS_X_TOOL, PHIGS_X_DRAWABLE

PHIGS_WS_CATEGORY  (C)
The category of the workstation.  This attribute can be used to change the workstation category from OUTIN (output and input) to OUTPUT (output only). 

Data type: 

Pwscat (PCAT_OUT or PCAT_OUTIN only)  (C)

Default: 

OUTIN

C enumeration: 

PCAT_OUT, PCAT_IN, PCAT_OUTIN, PCAT_MO, PCAT_MI

PHIGS_X_BUF_MODE  (C)
Specifies the method of double buffering to use.

Data type: 

Phigs_dbl_buff  (C)

Default: 

PHIGS_BUF_SINGLE

C enumeration: 

PHIGS_BUF_SINGLE, PHIGS_BUF_DOUBLE

PHIGS_X_DISPLAY  (C)
Modify the workstation type to reflect the capabilities of the specified display. The display is specified by a display pointer. Some of the workstation type attributes and workstation description table values are dependent on the capabilities of the PEX extension in the X server.  This attribute causes such values to be modified to reflect those capabilities.  This attribute can only be specified to WORKSTATION TYPE SET or WORKSTATION TYPE CREATE.  It cannot be specified to WORKSTATION TYPE GET. 

Data type: 

Display∗  (C)

Default: 

NULL

PHIGS_X_DISPLAY_NAME  (C)
Modify the workstation type to reflect the capabilities of the specified display. The display is specified by a display name string. Some of the workstation type attributes and workstation description table values are dependent on the capabilities of the PEX extension in the X server.  This attribute causes such values to be modified to reflect those capabilities. 

Data type: 

char∗  (C)

Default: 

NULL

PHIGS_X_DISPLAY_WINDOW  (C)
Modify the workstation type to reflect the capabilities of the specified window. Some of the workstation type attributes and workstation description table values are dependent on the capabilities of the X window and PEX extension the PHIGS workstation will use.  This attribute causes such values to be modified to reflect those capabilities.  This attribute can only be specified to WORKSTATION TYPE SET of WORKSTATION TYPE CREATE.  It cannot be specified to WORKSTATION TYPE GET. 

Data type: 

Display∗, Window  (C)

Default: 

NULL, 0

PHIGS_HANDLE_EXPOSE  (C)
Enable or disable PEX-SI handling of window exposures.  A non-zero value specifies that PHIGS will redraw the PHIGS output when the window or portions of the window are exposed.  A zero value specifies that PHIGS will not redraw when the window or portions of the window are exposed. 

Data type: 

Pint  (C)

Default: 

1

PHIGS_HANDLE_DESTROY  (C)
Enable or disable handling of DestroyNotify events from the workstation window. A non-zero value specifies that the PEX-SI API will exit when a DestroyNotify event is received on the window of an open workstation.  A zero value specifies that the PEX-SI API will do nothing when a DestroyNotify event is received on the window of an open workstation. 

Data type: 

Pint  (C)

Default: 

1

PHIGS_DC_MODEL  (C)
Set the effect of window resizing on the workstation’s DC limits. Valid values are defined in phigs.h:

typedef enum {
PHIGS_DC_LIMITS_FIXED,
PHIGS_DC_LIMITS_ADJUST_TO_WINDOW,
} Phigs_DC_model;

DC_LIMITS_FIXED causes the DC limits to be left as they are, even though the new window size is possibly smaller or larger than the limits. 
DC_LIMITS_ADJUST_TO_WINDOW, the default, causes the DC limits to be adjusted to the new window size. 

Data type: 

Phigs_DC_model  (C)

Default: 

PHIGS_DC_LIMITS_FIXED

x_tool Attributes

PHIGS_TOOL_WIDTH  (C)

PHIGS_TOOL_HEIGHT

  (C)

The initial size of the graphics window in screen coordinates. 

Data type: 

Pint  (C)

Default: 

600, 600

PHIGS_TOOL_X  (C)

PHIGS_TOOL_Y

  (C)

The initial position of the workstation in screen coordinates. 

Data type: 

Pint  (C)

Default: 

50, 50

PHIGS_TOOL_LABEL  (C)
The label to put in the workstation frame banner.

Data type: 

char∗  (C)

Default: 

PHIGS Workstation

PHIGS_TOOL_ICON_LABEL  (C)
The label for the icon when the workstation window is closed (iconified).

Data type: 

char∗  (C)

Default: 

PHIGS_TOOL_BORDER_WIDTH  (C)
The border width of the window.

Data type: 

Pint  (C)

Default: 

0

ERRORS

No Error

SEE ALSO

WORKSTATION TYPE CREATE (3P)
WORKSTATION TYPE DESTROY (3P)
WORKSTATION TYPE GET (3P)
OPEN WORKSTATION (3P)
INQUIRE LIST OF AVAILABLE WORKSTATION TYPES (3P)
INQUIRE WORKSTATION CONNECTION AND TYPE (3P)
ESCAPE -3 (3P)
PHIGS WORKSTATION DESCRIPTION TABLE (7P)

 
 

September 02, 1992

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