Re: transparent gtkwindow
- From: Tor Lillqvist <tml iki fi>
- To: gtk-app-devel-list gnome org
- Subject: Re: transparent gtkwindow
- Date: Wed, 7 Feb 2007 12:57:30 +0200
How to create a transparent gtkwindow with alpha values on Windows and
Linux?
Presumably you mean with the X11 backend (which is in no way Linux
specific) when you say "on Linux"?
gtk_widget_shape_combine_mask () could be what you want.
No, it wouldn't. That sets the shape of a window. That's nothing new,
it has been in GTK+ since ages. It does work on both X11 (as long as
the X server has the SHAPE extension, which I guess they practically
all do) and Windows.
Instead, take a look at testgtk.c in recent GTK+ distributions. Look
for the create_alpha_window() function.
But I'm afraid that this doesn't work on Windows. Sorry. The Windows
API one has to use to fully support per-pixel alpha is horribly broken
by design, and making gdk/win32 use it seems rather impossible. (I
spent one weekend looking into it, so trust me, this isn't just a gut
feeling. I would love to be proved wrong, of course.)
Using just one fixed alpha value for a whole window is much easier in
the Windows API, but then there is no API to request that in GTK+. I
probably should add a feature request for that to Bugzilla and maybe
even implement it.
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]