Chapter 2 - Initializing and Terminating SunCGI 25 0 bit), coordinate type (integers), and color specification (indexed). The width and size specifi_cation modes are settable, but the functions which set them are described in Chapter 4. However, the inquiry negotiation functions are supported so that an application program written for a CG! on another manufacturers' workstation can find out whether the SunCGI is capable of running that applica- tion.
Inquire Device Identification Cerror inquire_device_identification(name, devid) Cint name; /* device name*/ Cchar devid[DEVNAMESIZE); /* workstation type*/ inquire_device_identification reports which type of Sun Worksta- tion view surface name is associated with. The argument devid may be set to one of the Sun Workstation types described in Table 2-2. The inclusion of the ·· name argument deviates from the ANSI standard, but is necessary so that the characteristics of individual view surfaces may be inquired. Errors ENOTOPOP [5] CGI not in proper state CGI shall be either in state CGOP, VSOP, or VSAC. EVSIDINV (10] Specified view surface name is invalid.
Q Inquire Device Class EVSNOTOP (13] Specified view surface not open. Cerror inquire_device_class(output, input) Cint •output, *input; /* output and input abilities*/ inquire_device_class describes the capabilities of Sun Workstations in terms of the CG! functions they support. 5 Each of the two returned values reports the number of functions of each of the two classes which are supported in SunCGI. These numbers (the values of input and output) are used to make more detailed inquiries by using functions inquire_input_capabilitiesand inquire_output_capabilities. Errors ENOTOPOP [5] CGI not in proper state CGI shall be either in state CGOP, VSOP, or VSAC.
Inquire Physical Coordinate System Cerror inquire_physical_coordinate_system(name, xbase, ybase, xext, yext, xunits, yunits) Cint name; /* name assigned to cgi view surface*/ Cint *xbase, *ybase; /* base coordinates*/ Cint *xext, *yext; /* pixels in x and y directions*/ Cfloat •xunits, *yunits; /* number of pixels per mm. */ inquire_physical_coordinate_system reports the physical dimen- sions of the coordinate system of view surface name in pixels and millimeters. inquire_physical_coordinate_system is provided to permit the drawing of objects of a known physical size. 0 5 The Olllpwl argument does Dot include !he DOD-standard CG! functions. Version C of 17 March 1986