Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

REQUEST STROKE 3(3P)  —  Kubota Pacfic Computer Inc. (29 February 1991)

NAME

REQUEST STROKE 3 − request an operator interaction with a stroke device

SYNOPSIS

C Syntax

void
preq_stroke3 ( ws, dev, in_status, view_ind, stroke )
Pintws;workstation identifier
Pintdev;stroke device number
Pin_status∗in_statusOUT input status
Pint∗view_ind;OUT view index
Ppoint_list3∗stroke;OUT stroke

Required PHIGS Operating States

(PHOP, WSOP, ∗, ∗)

DESCRIPTION

Purpose

Use REQUEST STROKE 3 to request an operator interaction with a specified stroke device. The device must be in request mode. See SET STROKE MODE and INITIALIZE STROKE 3 for more information.  See the Available Devices section of INITIALIZE STROKE 3 for a description of the available stroke devices. 

The request suspends PHIGS until the specified device is triggered or the operator performs a BREAK.  A BREAK is performed by typing the CONTROL and D keys simultaneously (^D). 

C Input Parameters

wsWorkstation identifier. An integer specifying the workstation with which the requested stroke device is associated. 

devThe device number of the requested stroke device.  See the Available Devices section of INITIALIZE STROKE 3 for a description of the available stroke devices. 

C Output Parameter

in_status
A pointer to the location to store the request status. Pin_status is defined in phigs.h as follows:

typedef enum {
PIN_STATUS_NONE,
PIN_STATUS_OK,
PIN_STATUS_NO_IN
} Pin_status;

view_ind
A pointer to the location to store the view index used to transform the Device Coordinate (DC) positions to World Coordinate (WC) points. 

strokeA pointer to the location to store the stroke points.  Ppoint_list3 is defined in phig.h as follows:

typedef struct {
Pintnum_points;/∗ number of points in list ∗/
Ppoint3∗points;/∗ list of points  ∗/
} Ppoint_list3;

num_points is the number of points in points. 

points is the array of Ppoint3 structures specifying the points in WC.  This array must be allocated by the calling program and the array pointer assigned to this field before calling this function.  The array must be at least as large as the buffer of the STROKE device.  This buffer size is set when the device is initialized.  Ppoint3 is defined in phigs.h as follows:

typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
Pfloatz;/∗ z coordinate ∗/
} Ppoint3;

Execution

REQUEST STROKE 3 requests a logical input value from the specified stroke device. The specified device must be in request mode. See SET STROKE MODE for more information. 

REQUEST STROKE 3 creates a measure process for the specified device and suspends PHIGS until the device is triggered or the operator issues a BREAK.  A BREAK is generated by the operator by depressing the CONTROL and D keys simultaneously (^D). 

If a BREAK occurs, a status of PIN_STATUS_NO_IN is returned and the stroke data is undefined.  If a status of PIN_STATUS_OK is returned, the stroke data is available.  In either case, the measure process is then terminated and PHIGS processing resumes. 

A stroke measure consists of a view index and WC positions.  The view index specifies the view representation from the workstation’s view table that was used to map the stroke positions from Normalized Projections Coordinates (NPC) to WC.  The positions are the positions of the stroke in WC.  Note: The 2D and 3D stroke measure processes are the same except that the 2D process discards the z coordinates. The 2D version of this function, REQUEST STROKE, can be used if the z coordinates are not needed. 

See INITIALIZE STROKE 3 for a description of the available stroke devices. 

ERRORS

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

054Ignoring function, the specified workstation is not open

061Ignoring function, specified workstation is neither of category INPUT nor of category OUTIN

250Ignoring function, the specified device is not available on the specified workstation

251Ignoring function, the function requires the input device to be in REQUEST mode

SEE ALSO

INITIALIZE STROKE 3 (3P)
SET STROKE MODE (3P)
SET VIEW TRANSFORMATION INPUT PRIORITY (3P)
REQUEST STROKE (3P)

September 02, 1992

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