[comp.windows.x] Various how-do-you-do-this things

dheller@cory.Berkeley.EDU (Dan Heller) (07/29/88)

Does anyone have any idea how to create an xterm subwindow within
an application that will run any type of command I want?  A good
example would be to have a widget which is sitting somewhere within
a window with other widgets -- this widget will handle IO as if it
were a tty or an xterm window.  I'd rather not create a new popup
shell to do this, but I'm willing to do so as a last resort ...

Is there a "stencil" like function so I can XPutImage or XCopyArea
an XImage or Pixmap onto a drawable and have it be stenciled thru
another bitmap or XImage?  The reason for this is that I have a new
widget which is like a command widget, but instead of text, an icon
(bitmap) is what the user sees.  however, when I make this thing
inactive, I want my Redisplay() function to use a new GC or some other
operation which will let me render this as "grey" -- thus, a stencil.
A grey border isn't good enough :-)
Dan Heller	<island!argv@sun.com>

RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) (07/29/88)

    Date: 29 Jul 88 05:08:59 GMT
    From: pasteur!cory.Berkeley.EDU!dheller@AMES.ARC.NASA.GOV  (Dan Heller)

    Does anyone have any idea how to create an xterm subwindow within
    an application that will run any type of command I want?

xterm isn't really sufficiently widgetized (yet) to make this easy.

    Is there a "stencil" like function so I can XPutImage or XCopyArea
    an XImage or Pixmap onto a drawable and have it be stenciled thru
    another bitmap or XImage?

Yes, but using the bitmap as a clip-mask in the GC.  But, if the bitmap
is fairly complex, your R2 server may dump core.  (You can change
Region's numRects and size to longs to fix this, which is the way it
will be in R3.)  Also, as currently implemented, it will be rather
slow.