[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Shadow and translucency support in NSWindow
From: |
Yen-Ju Chen |
Subject: |
Shadow and translucency support in NSWindow |
Date: |
Mon, 13 Aug 2007 11:16:21 -0700 |
Shadow and translucency is not supported in GNUstep,
but we have a way to do so in Etoile.
Here is a screenshot:
https://mail.gna.org/public/etoile-discuss/2007-08/pngcVHU5SBJso.png
In order to achieve this visual effect, GNUstep has to implement these
missing part:
First, for – setHasShadow: and -hasShadow in NSWindow,
GNUstep has to push it into backend.
Since there is no EWMH standard for shadow,
GNUstep can probably add it in _GNUSTEP_WM_ATTR,
just like GSDocumentEditedFlag.
- invalidateShadow has no effect on X because shadow is always calculated.
Second, for – setAlphaValue, -alphaValue, -setOpaque, -opaque,
GNUstep has it, but the number in backend is not right if I remember
it correctly.
There is a non-offficial EWMH property for that:
_NET_WM_WINDOW_OPACITY (opaque is 0xffffffff)
As long as GNUstep can push this property, like what it does on window level
(XGServerwindow -setwindowlevel:) with XChangeProperty() and XSendEvent(),
then we probably can make it work.
But I think the first thing is to be sure the correct alpha value is
passed to backend.
Because it involes the intergration between gui and back, I cannot
provide a patch.
If anyone who knows the interface between gui and back can do it
and push the correct values into backend, I can help from that.
Since both of these properties (alpha and translucency) are not in
EWMH standard,
it should not have effect on other window manager.
In another word, it will not break anything.
By the way, -setAlphaValue: seems to change the translucency of the
whole window.
If I want to have a transparent background but opaque foreground,
how do I do it with GNUstep/Cocoa ?
For example, some terminal emulator has transparent background, but
the text is opaque.
I don't see how it can be done with standard GNUstep/Cocoa methods.
Thanx.
Yen-Ju
- Shadow and translucency support in NSWindow,
Yen-Ju Chen <=