Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ psdus(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SET DISPLAY UPDATE STATE(3P)  —  SUNPHIGS LIBRARY

NAME

SET DISPLAY UPDATE STATE − set Workstation Deferral and Modification Modes

SYNOPSIS

C Syntax

void
psetdisplayupdatest ( ws, def_mode, mod_mode )
Pintws;workstation identifier
Pdefmodedef_mode;deferral mode
Pmodmod_mode;modification mode

FORTRAN Syntax

SUBROUTINE psdus ( WKID, DEFMOD, MODMOD )
INTEGERWKIDworkstation identifier
INTEGERDEFMODdeferral mode
INTEGERMODMODmodification mode

Required PHIGS Operating States

(PHOP, WSOP, ∗, ∗)

DESCRIPTION

Purpose

SET DISPLAY UPDATE STATE sets the deferral and modification modes in the specified workstation’s state list.  These modes provide control over when and how changes to the structure store and workstation tables actually appear in the display.  These values have a great effect on both visual results and performance. 

The deferral mode controls when the display is updated (i.e., made entirely correct). This allows you to delay time-consuming or visually-distracting regeneration until a set of related changes are completed, or until a correct display is absolutely necessary, as before an operator input interaction can proceed. 

The modification mode controls what visual effects take place while the workstation is postponing display updates.  This allows you to selectively change the display, but to avoid regenerating the entire picture. 

C Input Parameters

wsIdentifier of the workstation whose update state to set. 

def_mode
An enumerated value specifying the deferral mode to be set for this workstation.  Valid values are defined in phigs.h:

PASAPMake the display visually correct As Soon As Possible
PBNIGMake the display visually correct Before the Next Interaction Globally
PBNILMake the display visually correct Before the Next Interaction Locally
PASTIMake the display visually correct At Some Time
PWAITMake the display visually correct When the Application Requests It

mod_mode
An enumerated value specifying the modification mode to be set for this workstation.  Valid values are defined in phigs.h:

PNIVENo Immediate Visual Effects
PUWORUpdate Without Regeneration
PUQUMUse Quick Update Methods

FORTRAN Input Parameters

WKIDIdentifier of the workstation whose update state to set. 

DEFMOD
An enumerated value specifying the deferral mode to be set for this workstation.  Valid values are defined in phigs77.h:

PASAPMake the display visually correct As Soon As Possible
PBNIGMake the display visually correct Before the Next Interaction Globally
PBNILMake the display visually correct Before the Next Interaction Locally
PASTIMake the display visually correct At Some Time
PWAITDMake the display visually correct When the Application Requests It

MODMOD
An enumerated value specifying the modification mode to be set for this workstation.  Valid values are defined in phigs77.h:

PNIVENo Immediate Visual Effects
PUWORUpdate Without Regeneration
PUQUMUse Quick Update Methods

Execution

The SET DISPLAY UPDATE STATE sets the deferral mode and modification mode entries in the specified workstation’s state list.  These modes control the degree to which the display must reflect the state of the central structure store and the workstation tables. 

Deferral Modes

The deferral mode As Soon As Possible (ASAP) demands that the display be consistent with the structure store and the workstation state list at all times.  This typically causes a regeneration (i.e., clearing the display, and traversal of all posted structure networks) for every change to a structure appearing on the workstation, and for every change to the workstation’s state list. The modification mode is unused when the deferral mode is ASAP. 

The deferral mode Before the Next Interaction Globally behaves just like ASAP when any input device is active on any workstation.  The deferral mode Before the Next Interaction Locally behaves just like ASAP when any input device is active on this workstation.  Otherwise, they behave exactly like At Some Time, as described below.  An input device is considered active the entire time it is in EVENT or SAMPLE mode, or while a REQUEST is pending for the device (though nothing but window redisplay can occur while a REQUEST is pending, because it necessarily blocks). 

The deferral mode At Some Time causes the display to be updated only at certain times, which are at the discretion of the PHIGS implementation, and are workstation dependent.  For SunPHIGS, these times are when the window system gives the workstation a REDRAW request in response to window damage, and when the open structure is closed. 

The deferral mode When the Application Requests It is aptly abbreviated WAIT; the display will not be updated implicitly.  Explicit updates are requested by using REDRAW ALL STRUCTURES or UPDATE WORKSTATION with PERFORM. 

Modification Modes

During modification mode No Immediate Visual Effects, the only changes to the display are those which would be done in accordance with the deferral mode.  (Note: When the Application Requests It and No Immediate Visual Effects together prohibit any change to the display in response to changes in the central structure store or the workstation state lists.) 

The modification mode Update Without Regeneration performs all updates that can be realized immediately without regenerating the entire display.  This includes the actions whose dynamic modification accepted entries in the workstation description table are set to Immediately. 

The modification mode Use Quick Update Methods allows use of workstation dependent simulations of changes that cannot be performed immediately unless the display is regenerated.  These simulations are described in the section Available Quick Update Methods.  Actions for which a quick update method is available have dynamic modification accepted entries in the workstation description table set to Can Be Simulated.  As in Update Without Regeneration mode, actions whose dynamic modification accepted entries in the workstation description table are set to Immediately are performed immediately.  Unless an action can be simulated or the update performed immediately, the update is deferred, as if the modification mode were No Immediate Visual Effects. 

State of Visual Representation

The workstation’s state of visual representation indicates whether the display is Correct, Simulated (but no updates have been deferred), or Deferred.  This state list value may be obtained using INQUIRE DISPLAY UPDATE STATE (3P). 

Changing the deferral mode causes a regeneration, if the display is not correct and the new deferral mode requires it.  Changing the modification mode will have no retroactive effect on previous changes that have been simulated or deferred. 

Available Quick Update Methods

SunPHIGS provides the same simulations for SunTool and SunCanvas workstations when the modification mode is Use Quick Update Methods − all variations on a theme.  A portion of the image is undrawn, by drawing in the background color (index 0), then the revised portion is drawn, using the colors specified by PHIGS attributes.  If the portion being drawn includes EXECUTE STRUCTURE elements, the execution is carried out.  Note that the simulations disregard the structure network’s posting priority; therefore, undrawing can leave holes in other primitives that overlap it, and drawing can place on top a structure that should be under another.  These problems are the reason the term simulation is used; SunPHIGS approximates the correct picture, but sometimes this approximation will not be adequate. 

No simulations are supported for CGM Output workstations.  Simulations for SunTool and SunCanvas workstations are described below. 

Structure Content Modification
If a range of primitives and EXECUTE STRUCTURE elements is deleted (or if EMPTY STRUCTURE is called), the contents are undrawn.  If an output primitive or EXECUTE STRUCTURE element is deleted, it is undrawn; if such an element is inserted, it is drawn.  If such an element is replaced using Replace edit mode (see SET EDIT MODE (3P)), the delete simulation is followed by the insert simulation.  Replacing a local or global modelling transformation element with another is simulated by undrawing the rest of the structure, and then drawing the rest of structure in its new location.  If the structure appears more than once on the workstation, the simulation occurs for all appearances. 

There are presently no simulations for attribute changes, but the effect of updating a primitive’s attributes can be achieved by deleting a primitive, changing the attributes that precede it, and inserting the primitive again.  There is presently no simulation for COPY ALL ELEMENTS FROM STRUCTURE. 

Structure Posting
When POST STRUCTURE is called, if the structure is not already posted on the workstation, the simulation is to draw the structure network on top of all posted structures (ignoring priority).  If structure is already posted on workstation, calling POST STRUCTURE changes its priority.  If the priority increases its position relative to other structures posted to the same workstation, the structure network is drawn on top of all posted structures.  The simulation for UNPOST STRUCTURE is to undraw the structure network.  Because of previously deferred changes to attributes, the undraw of a primitive may be imperfect.  UNPOST ALL STRUCTURES is simulated by clearing the workstation’s display surface. 

Structure Manipulation
When a structure is deleted by either DELETE STRUCTURE or DELETE STRUCTURE NETWORK, all appearances of the structure are undrawn.  DELETE ALL STRUCTURES is simulated by clearing the workstation’s display surface. 

For large amounts of editing, it can be more efficient or more visually pleasing to disable screen update by setting the deferral mode to When the Application Requests It (WAIT) and the modification mode to No Immediate Visual Effects.  Then any amount of editing may be performed without any visual change.  When desired, UPDATE WORKSTATION (or setting deferral mode to ASAP) will display correctly the modified data.  Double buffering (enabled by WORKSTATION TYPE SET (3P)) allows the corrected display to be prepared before it is displayed. 

Actions that are DEFERRED by SunPHIGS in Use Quick Update Methods mode, such as changing a workstation representation, may degrade the quality of the QUM simulation.  An example is changing an interior representation and then deleting a fill area that uses bundled attributes from that representation: the quick update method will undraw the primitive using the attributes of the current bundle, and not the bundle values with which the primitive was initially drawn. 

Interactions between Deferral and Modification Modes and SunView

SunPHIGS regenerates the image from the CSS when the window is damaged by window system events.  This can occur even if the deferral mode is When the Application Requests It (WAIT) and the modification mode is No Immediate Visual Effects, which together prohibit implicit changes to the display.  However, only the damaged portion of the SunPHIGS canvas is repainted.  Hence, the regeneration may use newer information than that which generated the older, out-of-date, but not damaged portion, which is also visible and may not match the newly-drawn portion.  To remove any visible mismatch, the entire window can be updated by selecting Redisplay from the canvas’s Frame menu. 

ERRORS

003Ignoring function, function requires state (PHOP, WSOP, ∗, ∗)

054Ignoring function, the specified workstation is not open

059Ignoring function, the specified workstation does not have output capability (i.e., the workstation category is neither OUTPUT, OUTIN, nor MO)

SEE ALSO

UPDATE WORKSTATION (3P)
REDRAW ALL STRUCTURES (3P)
INQUIRE DISPLAY UPDATE STATE (3P)
INQUIRE DEFAULT DISPLAY UPDATE STATE (3P)

Sun Release 4.0  —  Last change: 13 July 1989

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