SET LOCATOR MODE(3P) — SUNPHIGS LIBRARY
NAME
SET LOCATOR MODE − set locator device operating mode and echoing state
SYNOPSIS
C Syntax
void
psetlocmode ( ws, dev, mode, echo )
Pintws;workstation identifier
Pintdev;locator device number
Pimodemode;operating mode
Peswecho;echo switch
FORTRAN Syntax
SUBROUTINE pslcm ( WKID, LCDNR, MODE, ESW )
INTEGERWKIDworkstation identifier
INTEGERLCDNRlocator device number
INTEGERMODEoperating mode (PREQU, PSAMPL, PEVENT)
INTEGERESWecho switch (PNECHO, PECHO)
Required PHIGS Operating States
(PHOP, WSOP, ∗, ∗)
DESCRIPTION
Purpose
Use the SET LOCATOR MODE subroutine to set the operating mode (REQUEST, SAMPLE, or EVENT) and the echo switch (ECHO, NOECHO) for a specified locator device on a specified workstation.
C Input Parameters
wsAn integer specifying the workstation on which the locator device to be set is located.
devThe device number of the locator device to be set. See the Available Devices section in INITIALIZE LOCATOR 3 for a description of the available devices.
modeSpecifies the operating mode for the specified locator device. Pimode is an enumerated variable defined in phigs.h as follows:
typedef enum {
PREQUEST,
PSAMPLE,
PEVENT
} Pimode;
echoSets the echo switch for the specified locator device. Pesw is an enumerated variable defined in phigs.h as follows:
typedef enum {
PES_ECHO,
PES_NOECHO
} Pesw;
FORTRAN Input Parameters
WKIDThe workstation identifier of the workstation associated with the device.
LCDNR
The device number of the locator device to be set. See the Available Devices section in INITIALIZE LOCATOR 3 for a description of the available devices.
MODE
The desired mode of the device. Valid values as defined in phigs77.h are:
• PREQU(REQUEST)
• PSAMPL(SAMPLE)
• PEVENT(EVENT)
ESWThe echo flag. Valid values as defined in phigs77.h are:
• PNECHO(NO ECHO)
• PECHO(ECHO)
Execution
The SET LOCATOR MODE sets the operating mode of the specified locator device to REQUEST, SAMPLE, or EVENT, and the echo switch to ECHO or NOECHO.
The operating mode controls how the input from the device is obtained.
•If the operating mode is REQUEST, the subroutine REQUEST LOCATOR, or REQUEST LOCATOR 3 may be used to add the specified device number to the device trigger’s list of recipients and suspend PHIGS until the trigger fires or the operator executes a break. If the trigger fires, the REQUEST LOCATOR subroutine returns the input value (the current coordinates of the device) and the status OK. If a break occurs, the status NONE is returned.
•If the operating mode is SAMPLE, the SAMPLE LOCATOR or SAMPLE LOCATOR 3 subroutine may be used to return the current input value of the device without waiting for the trigger to fire.
•If the operating mode is EVENT, the input values generated by the device when its trigger fires are added as event reports to the event queue. The subroutines AWAIT EVENT and/or GET LOCATOR may then be used to read event reports from the queue.
The echo switch controls whether the echoing specified by the prompt/echo type for this device is performed as part of the measure process. The locator echo updates the cursor position.
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
SEE ALSO
REQUEST LOCATOR 3 (3P)
GET LOCATOR 3 (3P)
INQUIRE LOCATOR DEVICE STATE 3 (3P)
INITIALIZE LOCATOR 3 (3P)
Sun Release 4.0 — Last change: 10 July 1989