.\"
.\" $XConsortium: p069,v 5.2 94/04/17 20:55:04 rws Exp $
.\"
.\" 
$XMCOPY
.\" Copyright (c) 1990, 1991 by Sun Microsystems, Inc. and the X Consortium.
.\" 
.\"                         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 names of Sun Microsystems,
.\" and the X Consortium 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 "GET STRING" 3P "29 February 1991"
.SH NAME
GET STRING\- retrieve the
\s-2STRING\s+2
event in the \s-2PHIGS\s+2 current event report
.IX "Event Input Mode" "GET STRING"
.IX "Input Modes" "GET STRING"
.IX "String Input Devices" "GET STRING"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
pget_string ( string )
char	*string;	\fI\s-2OUT\s+2 pointer to string of bufsiz
		for the device + 1 for the terminator\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, WSOP, *, *)
.SH DESCRIPTION
.SS Purpose
\s-2GET STRING\s+2 retrieves the current event report from the \s-2PHIGS\s+2
state list when the event report contains a \s-2STRING\s+2 event.
A \s-2STRING\s+2 event consists of an array of characters reflecting the
contents of a \s-2STRING\s+2 input device's buffer when the event
was generated.
.LP
.SS C Output Parameter
.IP \fIstring\fP
\s-2PHIGS\s+2 copies the event's contents to the array pointed to by
\fIstring\fP.
The string is null terminated.
The array must be at least as large as the buffer of the
\s-2STRING\s+2 device that generated the event.
This buffer size is set when the device is initialized.
.SS Execution
\s-2GET STRING\s+2 retrieves the contents of a \s-2STRING\s+2
device from the current event report in the \s-2PHIGS\s+2 state list.
.LP
When an input device in \s-2EVENT\s+2 mode is triggered
by the operator,
an event report is added to the input event queue if the queue is not full.
The event report contains the identity and current measure of the triggered
device.
\s-2AWAIT EVENT\s+2 moves the contents of the oldest event in the input queue
to the current event report in the \s-2PHIGS\s+2 state list.
If the event was a \s-2STRING\s+2 event, \s-2GET STRING\s+2 is used to
retrieve the contents of the event from the current event report.
.LP
See \s-2INITIALIZE STRING 3\s+2 for a description of the available
\s-2STRING\s+2 devices and how events are generated from them.
.SH ERRORS
.IP 003
Ignoring function, function requires state (\s-2PHOP, WSOP, *, *\s+2)
.IP 259
Ignoring function, the input device class of the current input report
does not match the class being requested
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "INITIALIZE STRING (3P)"
.SM "INITIALIZE STRING 3 (3P)"
.SM "AWAIT EVENT (3P)"
.fi
