Sun Microsystems 800-1256-04 — Sun Microsystems 800-1256-04 SunCGI Reference Manual PDF (EN)

138 SunCGI Reference Manual 0 #include Ccoorlist martinilist; Ccoor glass_coords[lO] = { 0,0, -10 1 0, -1, 1, -1,20, -15,35, 15,35, 1,20, 1,1, 10, o, 0, 0 l; Ccoor water_coords[2] = { -12,33, Ccoor vpll Ccoor vpur 12,33 }; -50,-10 } ; 50,80 }; main() { Cvwsurf device; Cint name; NORMAL_VWSURF(device, PIXWINDD); 0 open_cgi () ; open_vws(&name, &device); vdc_extent(&vpll, &vpur); martinilist.ptlist = glass_coords; martinilist.n = 10; polyline(&martinilist); martinilist.ptlist = water_coords; martinilist.n = 2; polyline(&martinilist); sleep(lO}; close_vws(name); close_ cgi () ; Figure E-1 Martini Glass Example Program E.2.

Tracking Box The following program demonstrates the use of the CGI input functions. A square is displayed on the screen and moved with the mouse. The program exits if the mouse is still for five seconds. 0 Venion C of 17 March 1986