.\" .\" $XConsortium: p210,v 5.3 94/04/17 20:56:52 hersh 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. .ds f \s-2INQUIRE STROKE DEVICE STATE\s+2 .TH "INQUIRE STROKE DEVICE STATE" 3P "16 August 1991" .SH NAME INQUIRE STROKE DEVICE STATE \- inquire state of a stroke device .IX "Stroke Input Devices" "INQUIRE STROKE DEVICE STATE" .SH SYNOPSIS .SS C Syntax .ft B .ta 1.25i 3i .nf void pinq_stroke_st( ws, dev, type, store, err, op_mode, echo_switch, init_view_ind, init_stroke, prompt_echo, echo_area, stroke_data) Pint ws; \fIworkstation identifier\fP Pint dev; \fIstroke device number\fP Pinq_type type; \fItype of returned value\fP Pstore store; \fIhandle to Store object\fP Pint *err; \fIOUT error indicator\fP Pop_mode *op_mode \fIOUT operating mode\fP Pecho_switch *echo_switch; \fIOUT echo switch\fP Pint *init_view_ind; \fIOUT initial view indicator\fP Ppoint_list **init_stroke; \fIOUT initial stroke\fP Pint *prompt_echo; \fIOUT prompt/echo type\fP Plimit *echo_area; \fIOUT echo area\fP Pstroke_data **stroke_data; \fIOUT data record\fP .fi .ft R .SS Required PHIGS Operating States (PHOP, WSOP, *, *) .SH DESCRIPTION .SS Purpose Use \*f to retrieve the current state of the specified stroke device. .SS C Input Parameters Applications using the \s-2C\s+2 binding must create a buffer to be used by this function as memory space for storing data associated with the device state. This buffer is passed as the \fIstore\fP argument. .LP The store buffer is a data area managed by \s-2PHIGS\s+2. While the application is responsible for creating the initial buffer through a call to \s-2CREATE STORE\s+2, \s-2PHIGS\s+2 manages this area such that there is sufficient memory for the specific inquiry. The stroke device data record within the store buffer is accessed via the pointer pointed to by \fIstroke_data\fR. .IP \fIws\fP Workstation identifier. An integer specifying the workstation with which the specified stroke device is associated. .IP \fIdev\fP The device number of the stroke device. See the \fIAvailable Devices\fP section of \s-2INITIALIZE STROKE\s+2 for a description of the available devices. .IP \fItype\fP An enumerated value specifying whether the values to be returned are those originally specified by the application (\s-2PINQ_SET\s+2), or those resulting after \s-2PHIGS\s+2 mapped them to ones available on the workstation (\s-2PINQ_REALIZED\s+2). A Pinq_type structure is defined as: .nf .ta .5i +\w'PINQ_REALIZED 'u .sp .4 typedef enum { .sp .2 PINQ_SET, PINQ_REALIZED .sp .2 } Pinq_type; .fi .IP \fIstore\fP The memory buffer \s-2PHIGS\s+2 is to use for storing the information returned. This buffer must exist prior to calling this function (see \s-2CREATE STORE (3P)\s+2). .SS C Output Parameters .IP \fIerr\fP A pointer to the location to store the error number of any error detected by this function. .IP \fIop_mode\fP The operating mode. Pop_mode is an enumerated type defined in phigs.h with the following values: .nf .ta .5i .sp .4 typedef enum { .sp .2 POP_REQ, POP_SAMPLE, POP_EVENT .sp .2 } Pop_mode; .sp .4 .fi .IP \fIecho_switch\fP The echo state. Pecho_switch is an enumerated type defined in phigs.h with the following values: .nf .ta .5i .sp .4 typedef enum { .sp .2 PSWITCH_NO_ECHO, PSWITCH_ECHO .sp .2 } Pecho_switch; .sp .4 .fi .IP \fIinit_view_ind\fP Initial view indicator. .IP \fIinit_stroke\fP A pointer to the initial stroke. Ppoint_list is defined in phigs.h as follows: .nf .ta .5i +1i +1i +1i .sp .4 typdef struct { .sp .2 Pint num_points; /* number of Ppoint3s in the list */ Ppoint *points; /* list of points */ .sp .2 } Ppoint_list; .fi .sp .4 Ppoint is defined in phigs.h as follows: .nf .ta .5i +1i +1i +1i .sp .4 typdef struct { .sp .2 Pfloat x; /* x coordinate */ Pfloat y; /* x coordinate */ .sp .2 } Ppoint; .fi .sp .4 .IP \fIprompt_echo\fP The prompt/echo type desired. See the \fIAvailable Devices\fP Section of \s-2INITIALIZE STROKE\s+2 for a description of the available types. .IP \fIecho_area\fP A pointer to a variable of type Plimit that contains the echo area of the device. Plimit is defined in phigs.h as follows: .sp .4 .nf .ta .5i +1i +1i .sp .2 typedef struct { .sp .2 Pfloat x_min; /* x min */ Pfloat x_max; /* x max */ Pfloat y_min; /* y min */ Pfloat y_max; /* y max */ .sp .2 } Plimit; .fi .bp .IP \fIstroke_data\fP Pointer to a pointer that points to the stroke device state within \fIstore\fR. Pstroke_data is defined in phigs.h as follows: .nf .ta .5i +.5ii +.5i +1i +1.25i .sp .4 typedef struct { Pint buffer_size; /* input buffer size */ Pint init_pos; /* initial editing position */ Pfloat x_interval; /* x interval */ Pfloat y_interval; /* y interval */ Pfloat time_interval; /* time interval */ union { struct { Pint unused; } pet_r1; struct { Pint unused; } pet_r2; struct { Pmarker_attrs marker_attrs; /* marker attributes */ } pet_r3; struct { Pline_attrs line_attrs; /* line attributes */ } pet_r4; } pets; } Pstroke_data; .fi .SS Execution \*f returns the current state of the specified stroke device, which is stored in the workstation state list of the workstation associated with the device. The current state includes the operating mode, echo switch, initial stroke value, prompt/echo type, echo area, and data record. See \s-2SET STROKE MODE\s+2 for a description of the operating mode and the echo switch, and how to set these values. See \s-2INITIALIZE STROKE\s+2 for a description of the initial stroke value, prompt/echo type, echo area, and data record contents, and how to set these values. .LP In the event of an error, the \fIerror indicator\fP indicates the error number of the error detected, and no other output data is returned. If no error is detected, the \fIerror indicator\fP is set to zero, and the inquired information will be available in the output parameters. Since this is an inquiry function, \s-2ERROR HANDLING\s+2 is not invoked when an error is detected by this function. .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 "SET STROKE MODE (3P)" .SM "INITIALIZE STROKE (3P)" .SM "INQUIRE STROKE DEVICE STATE 3 (3P)" .SM "CREATE STORE (3P)" .SM "DELETE STORE (3P)" .fi