Cristalle Azundris Sabon <cristalle(a)azundris.com> writes:
+;;; The following will activate those of tinting, shading and
+;;; transparency that are available. At present, these features are
+;;; only supported for GTK on X since GTK/FB and Win XP bring their
+;;; own flavour of transparency (real (alpha), not pseudo-), so
+;;; there is no point in duplicating that functionality in xemacs.
+;;; Without Imlib, tinting and shading will be disabled. For more
+;;; info, see C-h f gtk-put-transparency
+
+(if (featurep 'tinting)
+ (gtk-put-transparency (selected-frame)
+ '((trans . (tab text bg))
+ (shade . (240))
+ (red . (216))
+ (green . (0))
+ (blue . (256))))
+ (if (featurep 'shading)
+ (gtk-put-transparency (selected-frame)
+ '((trans . (tab text bg))
+ (shade . (192))))
+ (if (featurep 'transparency)
+ (gtk-put-transparency (selected-frame)
+ '((trans . (tab text bg)))))))
Extremely cool. May I propose some interface improvements?
* Plists are cooler than alists, as XEmacs uses plists in more places.
And less dots to type. :-)
(gtk-put-transparency (selected-frame)
'(trans (tab text bg) shade 240 ...))
* If it is a property of a frame, why not make it a frame property?
It would eliminate a "gtk-" specific function (always a good idea)
and provide a good hook for other window systems to follow. For
example:
(set-frame-properties (selected-frame)
'(transparency (tab text bg)
transparency-params (shaded (240)
red (216)
...)))
That is for one frame. If transparency is desired for all frames,
one can use the standard `default-frame-plist' and such.