Re: [Java-gnome-developer] Transparent Window
Brought to you by:
afcowie
|
From: Rafael A. <fae...@gm...> - 2010-02-19 16:50:18
|
Ok. Thanks Try to find a solution by the gnome, I thought transset, maybe I get some success. Thanks again. 2010/2/18 Andrew Cowie <an...@op...> > On Thu, 2010-02-18 at 19:33 -0300, Rafael Arcanjo wrote: > > > > > Well I used the command AWTUtilities.setWindowOpacity (this, 0.5) and > > gave as incompatible types. > > > You can't mix toolkits. > > Two different libraries both trying to drive GTK will confuse the X > server and crash your Java VM. > > If you're using java-gnome (and of course we hope you do!) to build the > user interface layer for your application, then its native coverage of > the GTK toolkit is all you need to use. > > > is there any way to get the transparent window? > > Yes... > > Transparency is a somewhat advanced topic; we don't tend to need it much > in GNOME (and people are discouraged from trying to make fancy shaped > windows that ignore the window manager). > > Coverage in java-gnome has been prototyped but is still experimental and > not yet accepted for merging to 'mainline'. > > If you want to try it you'll need to learn how to build java-gnome from > Bazaar. If the branch works for you, then perhaps you will consider > helping us improve it to the point where it can be accepted into the > next release. > > > There are two parts: > > > 1. Set backing pixmap to transparent: > > screen = w.getScreen(); > colormap = screen.getColormapRGBA(); > w.setColormap(colormap); > > w.realize(); > underlying = w.getWindow(); > underlying.setBackingPixmap(null, false); > > 2. Clear to background in Widget.ExposeEvent: > > cr.setSource(1.0, 1.0, 1.0, 1.0); > cr.setOperator(Operator.CLEAR); > cr.paint(); > > > but as I said, it's still experimental and that API is not in a released > version of the library, nor in 'mainline'. > > If you want to work on it, my branch is at > 'hackers/andrew/cairo-transparency'. Come and chat with us in > #java-gnome on irc.gimp.net and we can explore it further. > > Otherwise, at the moment, > > > is there any way to get the transparent window? > > > No, sorry. > > AfC > Sydney > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer > > |