StyleContext.getBackgroundColor

Gets the background color for a given state.

This function is far less useful than it seems, and it should not be used in newly written code. CSS has no concept of "background color", as a background can be an image, or a gradient, or any other pattern including solid colors.

The only reason why you would call gtk.style_context.StyleContext.getBackgroundColor is to use the returned value to draw the background with it; the correct way to achieve this result is to use gtk.global.renderBackground instead, along with CSS style classes to modify the color to be rendered.

More...
class StyleContext
void
getBackgroundColor

Parameters

state gtk.types.StateFlags

state to retrieve the color for

color gdk.rgba.RGBA

return value for the background color

Detailed Description

Deprecated: Use gtk.global.renderBackground instead.