.\"## .\" $XConsortium: p274,v 5.3 94/04/17 20:57:36 hersh 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 "SAMPLE PICK" 3P "29 February 1991" .SH NAME SAMPLE PICK \- sample the current measure of a pick device .IX "Pick Input Devices" "SAMPLE PICK" .IX "Sample Input Mode" "SAMPLE PICK" .IX "Input Modes" "SAMPLE PICK" .SH SYNOPSIS .SS C Syntax .ft B .ta 1.25i 3i .nf void psample_pick ( ws, dev, depth, pick_in_status, rpick ) Pint ws; \fIworkstation identifier\fP Pint dev; \fIpick device number\fP Pint depth; \fImax. depth of returned path\fP Pin_status *pick_in_status; \fIOUT pick input status\fP Ppick_path *rpick; \fIOUT pick path\fP .fi .ft R .SS Required PHIGS Operating States (PHOP, WSOP, *, *) .SH DESCRIPTION .SS Purpose Use \s-2SAMPLE PICK\s+2 to sample the current measure of the specified pick device without waiting for input from the operator. The device must be in \s-2SAMPLE\s+2 mode. See \s-2SET PICK MODE\s+2 and \s-2INITIALIZE PICK\s+2 for more information. .SS C Input Parameters .IP \fIws\fP Workstation identifier. An integer specifying the workstation with which the specified pick device is associated. .IP \fIdev\fP The device number of the pick device to be sampled. See the \fIAvailable Devices\fP section of \s-2INITIALIZE PICK\s+2 for a description of the available devices. .IP \fIdepth\fP The maximum number of path elements to return. .SS C Output Parameter .IP \fIpick_in_status\fP Pin_status is defined in phigs.h as: .sp .4 .nf typedef enum { .sp .2 PIN_STATUS_NONE, PIN_STATUS_OK, PIN_STATUS_NO_IN .sp .2 } Pin_status; .fi .IP \fIrpick\fP Ppick_path is defined in phigs.h as: .sp .4 .ta .5i +\w'Ppick_path_elem 'u +\w'*path_list; 'u .nf typedef struct { .sp .2 Pint depth; /* pick path depth */ Ppick_path_elem *path_list; /* pick path list */ .sp .2 } Ppick_path; .fi .IP \fIdepth\fP indicates the number of elements in the measure's path. This is the depth value contained in the device's current measure. It is not affected by the \fImaximum depth to return\fP parameter. Thus the number of elements returned in \fIpath_list\fP may be less than \fIdepth\fP. .IP \fIpath_list\fP is the array of path elements defining the location of the picked primitive in the Central Structure Store (\s-2CSS\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 of length \fImaximum depth to return\fP. Ppick_path_elem is defined in phigs.h as: .bp .sp .4 .ta .5i +\w'Pint 'u +\w'struct_id; 'u .nf typedef struct { .sp .2 Pint struct_id; /* structure identifier */ Pint pick_id; /* pick identifier */ Pint elem_pos; /* element number */ .sp .2 } Ppick_path_elem; .fi .IP \fIstruct_id\fP, \fIpick_id\fP, and \fIelem_pos\fP are the structure identifier, pick identifier, and element number, respectively, of each element in the path. .SS Execution \s-2SAMPLE PICK\s+2 samples the specified pick device. The device must be in \s-2SAMPLE\s+2 mode. See \s-2SET PICK MODE\s+2 and \s-2INITIALIZE PICK\s+2 for more information. .LP When a device is set to \s-2SAMPLE\s+2 mode, a measure process is created for the device and the device is activated. When \s-2SAMPLE PICK\s+2 is called, the current value of the measure process for the specified device is retrieved without waiting for further input from the operator. .LP A \s-2PICK\s+2 device measure consists of a \fIstatus\fP and a \fIpick path\fP. The \fIstatus\fP indicates whether or not a pick by the operator was successfully resolved. The \fIpath\fP describes the location of the picked primitive, if any, in the \fICentral Structure Store\fP (\s-2CSS\s+2). The \fIpick filter\fP of a \s-2PICK\s+2 device controls which output primitives on the device's workstation are pickable. By default, no output primitives are pickable. See \s-2SET PICK FILTER\s+2 for more information on the \fIpick filter\fP. .SH ERRORS .IP 003 Ignoring function, function requires state (PHOP, WSOP, *, *) .IP 054 Ignoring function, the specified workstation is not open .IP 060 Ignoring function, specified workstation is not of category \s-2OUTIN\s+2 .IP 250 Ignoring function, the specified device is not available on the specified workstation .IP 252 Ignoring function, the function requires the input device to be in \s-2SAMPLE\s+2 mode .SH SEE ALSO .nf .IP .ta 0.5i .SM "SET PICK FILTER (3P)" .SM "SET PICK IDENTIFIER (3P)" .SM "SET PICK MODE (3P)" .SM "INITIALIZE PICK 3 (3P)" .SM "REQUEST PICK (3P)" .SM "GET PICK (3P)" .SM "INQUIRE PICK DEVICE STATE (3P)" .fi