Sun Microsystems 800-1256-04 — Sun Microsystems 800-1256-04 SunCGI Reference Manual PDF

Chapter 2 - Initializing and Terminating SunCGI 13 0 Table 2-1 SunCGI Default States State I Range ofVDC space Value 0-32767 in both x and y directions CLIP Range of VDC space INTERRUPf Uninitialized E:MPTY Defaults specific values listed in Table 5-4 Device specific values listed in Table 5-5 Clip Indicator Clip Rectangle Error Warning Mask Input Devices . Input Queue Trigger Associations Echo Modes You may be unfamiliar with some of the entries discussed in Table 2-1. How- ever, these concepts are explained in the course of this chapter. Further, each of these concepts are referenced in the index.

Open View Surface (SunCGI Extension) Cerror open_vws(name, devdd) Cint *name; /* name assigned to cgi view surface*/ Cvwsurf *devdd; /* view surface descriptor*/ 0 open_ vws initializes a view surface. The list of available view surfaces is described below in Table 2-2. open_ vws initializes the attributes to their default values (listed in Table 2-3). The returned argument name is the identifier which is used to refer this view surface in other SunCGI functions. To reinitial- ize the state of the view surface without reopening it, use the hard_reset function. More than one view surface can be open at one time.

Output primitives are displayed on all active view surfaces (view surfaces must be opened before they are activated). However, input is only echoed on the view surface which is pointed to by the mouse. Most of the Cvwsurf fields should be zeroed, as by the NORMAL_ VWSURF macro. Set the view surface type by assigning the dd ( device driver) element of the devdd argument to the name of the appropriate device driver as in this example:2 cvwsurf device; NORMAL_VWSURF(device, BW2DD); open_vws(&name, &device); Note: The NORMAL_ VWSURF macro initializes the dd element of the Cvwsur f structure and guarantees that the view surface will be opened in the normal fashion.

However, to open a window with some nonstandard parameters, or open a second window from a graphics tool read the following paragraphs. To use an existing pixwin, then skip the following paragraphs and read Appendix F instead. 0 2 Notice that when SunCGl specifics a pointer it usually requires that the argument is prefaced by ao & character when the argument is actuaUy used. Version C of 17 March 1986