Re: transparent application



On Wed, 2003-04-09 at 19:48, Glen wrote:
I want to make my entire application transparent.  
I've read that this must be emulated - that the application must take a
snapshot of what's underneath itself & display that.

Is this true or is there a better way?  

it's pretty much true.

on the other hand, if you can get done what you want with a shaped
window, that would be far more efficient.  basically, you use the shape
extension and a mask bitmap to tell X that parts of your window simply
don't exist.  this is how desktop icons and bizarrely shaped skins for
xmms and xine are done[1]; there's a "wheelbarrow" sample that comes
with gtk that shows how to create a shaped window (using a wheelbarrow
pixmap).


you'll be dealing with gdk a lot, because that's where this sort of
stuff happens.

http://developer.gnome.org/doc/API/2.0/gdk/gdk-Windows.html
    gdk_window_shape_combine_mask ()
    gdk_window_set_back_pixmap ()

http://developer.gnome.org/doc/API/2.0/gdk/gdk-Drawing-Primitives.html
    gdk_drawable_get_image ()  /* grab pixels to the client */
    gdk_draw_image () /* set pixels from the client */
  versus
    gdk_draw_drawable () /* copy pixels from one window to another 
                            completely on the server side */



[1] i believe oclock was originally a demo of the shaped window
extension, but now that i try it out with metacity, it doesn't seem to
work quite right.  :-(

-- 
muppet <scott asofyet org>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]