.\" .\" $XConsortium: p071,v 5.2 94/04/17 20:55:05 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 STROKE 3" 3P "29 February 1991" .SH NAME GET STROKE 3 \- retrieve the \s-2STROKE\s+2 event in the \s-2PHIGS\s+2 current event report .IX "Event Input Mode" "GET STROKE 3" .IX "Input Modes" "GET STROKE 3" .IX "Stroke Input Devices" "GET STROKE 3" .SH SYNOPSIS .SS C Syntax .ft B .ta 1.25i 3i .nf void pget_stroke3 ( view_ind, stroke ) Pint *view_ind; \fI\s-2OUT\s+2 view index\fP Ppoint_list3 *stroke; \fI\s-2OUT\s+2 stroke\fP .fi .ft R .SS Required PHIGS Operating States (PHOP, WSOP, *, *) .SH DESCRIPTION .SS Purpose \s-2GET STROKE 3\s+2 retrieves the current event report from the \s-2PHIGS\s+2 state list when the event report contains a \s-2STROKE\s+2 event. .LP A \s-2STROKE\s+2 event consists of a list of World Coordinate (\s-2WC\s+2) points and a view_index. The points correspond to positions on the workstation selected by the operator. The view_index is the index of the view used to transform those positions to World Coordinates. .SS C Output Parameters .IP \fIview_ind\fP \s-2PHIGS\s+2 sets the variable pointed to by \fIview_ind\fP to the index of the view representation used to transform the \s-2NPC\s+2 stroke positions to \s-2WC\s+2 points. .IP \fIstroke\fP \s-2PHIGS\s+2 copies the number and list of stroke points selected by the operator to the variable pointed to by \fIstroke\fP. Ppoint_list3 is defined in phigs.h as follows: .sp .4 .ta .5i +\w'Ppoint3 'u +\w'num_points; 'u .nf typedef struct { .sp .2 Pint num_points; /* number of Ppoint3s in the list */ Ppoint3 *points; /* list of points */ .sp .2 } Ppoint_list3; .sp .fi .IP \fInum_points\fP is the number of points in \fIpoints\fP. .IP \fIpoints\fP is the array of Ppoint3 structures specifying the points in \s-2WC\s+2. \fBThis array must be allocated by the calling program and the array pointer assigned to this field before calling this function.\fP The array must be at least as large as the buffer of the \s-2STROKE\s+2 device that generated the event. This buffer size is set when the device is initialized. Ppoint3 is defined in phigs.h as follows: .sp .4 .ta .5i +\w'Pfloat 'u +\w'x; 'u .nf typedef struct { .sp .2 Pfloat x; /* x coordinate */ Pfloat y; /* y coordinate */ Pfloat z; /* z coordinate */ .sp .2 } Ppoint3; .fi .SS Execution \s-2GET STROKE 3\s+2 retrieves the \s-2STROKE\s+2 event 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. The event report contains the identity and current measure of the triggering device. \s-2AWAIT EVENT\s+2 moves the measure 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-2STROKE\s+2 event, \s-2GET STROKE 3\s+2 or \s-2GET STROKE\s+2 is used to retrieve the event from the current event report. The \s-2STROKE\s+2 positions are computed by mapping the \s-2DC\s+2 workstation positions selected by the operator to \s-2WC\s+2 points. The workstation transform is used to transform the \s-2DC\s+2 positions to \s-2NPC\s+2 positions prior to transforming them to \s-2WC\s+2. See \s-2INITIALIZE LOCATOR 3\s+2 and \s-2SET VIEW TRANSFORMATION INPUT PRIORITY\s+2 for a description of how \s-2PHIGS\s+2 determines the view representation to use to map the \s-2NPC\s+2 positions to \s-2WC\s+2. .LP See \s-2INITIALIZE STROKE 3\s+2 for a description of the available \s-2STROKE\s+2 devices and how their measure values are determined. .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 STROKE 3 (3P)" .SM "AWAIT EVENT (3P)" .SM "SET VIEW TRANSFORMATION INPUT PRIORITY (3P)" .SM "GET STROKE (3P)" .fi