NeWS windows and GL windows

Mark Callow msc at ramoth.esd.sgi.com
Fri Mar 2 06:40:18 AEST 1990


In article <476 at meritaus.UUCP>, dan at meritaus.UUCP (Daniel Haug) writes:
> 
> What is the relationship between NeWS windows and GL windows?
> When I call winopen(), the resulting window looks suspiciously
> similar to "framebuffer /new DefaultWindow send".  Does the
> GL library create a NeWS window to coincide with the internal

The GL library does something very like

    framebuffer /new MEXWindow send

> If there exists a NeWS window instance that corresponds to the
> GL window, how can one access it (e.g. thru CPS, but how does
> one access the actual instance)?

You can access it by using the PostScript function gfsend.  The
syntax you would use in a function you cdef in a cps file is:

cdef foo(int gid)
	<message> gid gfsend

where gid is the value returned by winopen.

You have to link the resulting program with -lcps and -lbsd and don't
forget to ps_flush_PostScript() after calling your cdef'ed function.
After the next x.y release you won't need -lbsd anymore.

> Can I change the value of
> DefaultWindow and expect subsequent winopen()'s to reflect this
> change? (e.g. suppose I want my GL windows to have scroll bars,
> and hence, use the ScrollWindow class).

No.  MEXWindow is explicitly a subclass of SGIWindow because there is
a tight relationship between them.  We knew that various other
window subclasses that people might be using as "DefaultWindow" wouldn't
work for MEXWindow.  You have to change either the MEXWindow or the
SGIWindow class to affect your gl windows.
--
>From the TARDIS of Mark Callow
msc at ramoth.sgi.com, ...{ames,decwrl}!sgi!msc
"There is much virtue in a window.  It is to a human being as a frame is to
a painting, as a proscenium to a play.  It strongly defines its content."



More information about the Comp.sys.sgi mailing list