Package: gtk

Accessor gtk-widget-opacity

Lambda List

gtk-widget-opacity (object)

Syntax

(gtk-widget-opacity object) => opacity
(setf (gtk-widget-opacity object) opacity)

Arguments

object -- a gtk-widget object

Details

Accessor of the slot opacity of the gtk-widget class.

The generic function gtk-widget-opacity fetches the requested opacity for this widget.

The generic function (setf gtk-widget-opacity) request the widget to be rendered partially transparent, with opacity 0 being fully transparent and 1 fully opaque.

Opacity values are clamped to the [0,1] range. This works on both toplevel widget, and child widgets, although there are some limitations:
  • For toplevel widgets this depends on the capabilities of the windowing system. On X11 this has any effect only on X screens with a compositing manager running. See the function gtk-widget-is-composited. On Windows it should work always, although setting a window's opacity after the window has been shown causes it to flicker once on Windows.
  • For child widgets it does not work if any affected widget has a native window, or disables double buffering.
Since 3.8
 

See also

2014-2-9