.\"##
.\" $XConsortium: p384,v 5.2 94/04/17 20:58:56 rws Exp $
.\"##
.\"## 
$XMCOPY
.\"## Copyright (c) 1990, 1991 by Sun Microsystems, Inc. 
.\"## 
.\"##                         All Rights Reserved
.\"## 
.\"## Permission to use, copy, modify, and distribute this software and its 
.\"## documentation for any purpose and without fee is hereby granted, 
.\"## provided that the above copyright notice appear in all copies and that
.\"## both that copyright notice and this permission notice appear in 
.\"## supporting documentation, and that the name of Sun Microsystems,
.\"## not be used in advertising or publicity 
.\"## pertaining to distribution of the software without specific, written 
.\"## prior permission.  
.\"## 
.\"## SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
.\"## INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
.\"## EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
.\"## CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
.\"## USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
.\"## OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\"## PERFORMANCE OF THIS SOFTWARE.
.TH "SET VALUATOR MODE" 3P "29 February 1991"
.SH NAME
SET VALUATOR MODE \- set valuator device operating mode and echoing state
.IX "Input Modes" "SET VALUATOR MODE"
.IX "Valuator Input Devices" "SET VALUATOR MODE"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
pset_val_mode ( ws, dev, mode, echo )
Pint	ws;	\fIworkstation identifier\fP
Pint	dev;	\fIvaluator device number\fP
Pop_mode	mode;	\fIoperating mode\fP
Pecho_switch	echo;	\fIecho switch\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, WSOP, *, *)
.SH DESCRIPTION
.SS Purpose
\s-2SET VALUATOR MODE\s+2 sets the operating mode and echo switch for a
specified valuator device on a specified workstation.
.SS C Input Parameters
.IP \fIws\fP
The workstation identifier of the workstation associated with the device.
.IP \fIdev\fP
The device number of the valuator device to be set.
See the \fIAvailable Devices\fP section in \s-2INITIALIZE VALUATOR 3\s+2
for a description of the available devices.
.IP \fImode\fP
Specifies the operating mode for the specified valuator device. 
Pop_mode is an enumeration defined in phigs.h as follows:
.nf
.sp .4
.ta .5i
typedef enum {
.sp .2
	POP_REQ,
	POP_SAMPLE,
	POP_EVENT
.sp .2
} Pop_mode;
.fi
.IP \fIecho\fP
The echo switch value for the specified valuator device. 
Pecho_switch is an enumeration defined in phigs.h as follows:
.nf
.sp .4
typedef enum {
.sp .2
	PSWITCH_NO_ECHO,
	PSWITCH_ECHO
.sp .2
} Pecho_switch;
.fi
.SS Execution
\s-2SET VALUATOR MODE\s+2 sets the operating mode and echo flag of the specified
device.
The default operating mode is \s-2POP_REQ\s+2.
The default echo switch is \s-2PSWITCH_ECHO\s+2.
.LP
The operating mode controls how the input from the device is obtained:
.sp
.in .7i
.ta .5i
.ti -.2i
\(bu    If the operating mode is \s-2REQUEST\s+2,
\s-2REQUEST VALUATOR\s+2 may be used to prompt for and receive input from
a valuator input device.
\s-2REQUEST VALUATOR\s+2 will not return until the operator enters input to
the device.
.sp
.ti -.2i
\(bu    If the operating mode is \s-2SAMPLE\s+2,
\s-2SAMPLE VALUATOR\s+2 may be used to 
return the current input value of the device without waiting for operator
input.
.sp
.ti -.2i
\(bu    If the operating mode is \s-2EVENT\s+2,
the input values generated by the operator are added to the \s-2PHIGS\s+2
input event queue.
The functions \s-2AWAIT EVENT\s+2 and \s-2GET VALUATOR\s+2 may then be used
to retrieve these events from the input queue.
.DT
.sp
.LP
The echo switch may be usd by some devices to control whether or not values
selected by the operator are echoed to the device.
.SH ERRORS
.IP 003
Ignoring function, function requires state (\s-2PHOP, WSOP, *, *\s+2)
.IP 054
Ignoring function, the specified workstation is not open
.IP 061
Ignoring function, specified workstation is neither of category \s-2INPUT\s+2
nor of category \s-2OUTIN\s+2
.IP 250
Ignoring function, the specified device is not available
on the specified workstation
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "INITIALIZE VALUATOR (3P)"
.SM "REQUEST VALUATOR (3P)"
.SM "GET VALUATOR (3P)"
.SM "SAMPLE VALUATOR (3P)"
.SM "INQUIRE VALUATOR DEVICE STATE (3P)"
.fi
