[comp.sys.sun] How Do I Get a Pointer to the Current Window

chuck@trantor.harris-atd.com (Chuck Musciano) (12/31/88)

> I understand how to create FRAMEs, CANVAS's, etc., but I don't want to
> CREATE any windows at all, just use the current window.

You seem to be intent upon circumventing the regular window system.  Why
is it so important to not create any windows?  What kind of special popups
are you creating that cannot use the normal menu/window system?

You should look into obtaining and using a blanket window, described in
the Sun View Systems Guide.  This still won't let you resize the
underlying window.  I think that may be forbidden, since that window is
owned by another process, and you are, in effect, asking to poke into its
data space to modify its window parameters.

Chuck Musciano
Advanced Technology Department
Harris Corporation
(407) 727-6131
ARPA: chuck@trantor.harris-atd.com

hsc@vuse.vanderbilt.edu (Hsuan Chang) (01/03/89)

You may get a /dev/win? sort of pointer by using

	getenv("WINDOW_ME")

and then obtain an fd to it.  Sun has provided a set of win_* routines to
access (via fd) attributes of the window.  For instance, 

	win_getrect(fd, &rect)

gets you the size and location of the window, where rect is

	Rect rect;

I don't know if it's worth to develop your own menu pulling mechamism.
You may find it necessary to read the SunView System Programmer's Guide,
and the definitions in basetools.h and othertools.h under
/usr/src/sun/suntool.  

Hope this helps.

Hsuan Chang
Image Processing Lab
Computer Science Department
Vanderbilt University
Nashville, Tn 37235
(615) 322-0962
hsc@vuse.vanderbilt.edu