Meta.BackgroundContent
Description: Reference for Meta.BackgroundContent

### Class

# MetaBackgroundContent

#### Description [src]

    final class Meta.BackgroundContent : GObject.Object
      implements Clutter.Content {
      /* No available fields */
    }

This class handles tracking and painting the root window background.

By integrating with `MetaWindowGroup` we can avoid painting parts of the background that are obscured by other windows.

The overall model drawing model of this content is that we have one texture, or two interpolated textures, possibly with alpha or margins that let the underlying background show through, blended over a solid color or a gradient. The result of that combination can then be affected by a “vignette” that darkens the background away from a central point (or as a no-GLSL fallback, simply darkens the background) and by overall opacity.

As of GNOME 3.14, GNOME is only using a fraction of this when the user sets the background through the control center - what can be set is:

A single image without a border An animation of images without a border that blend together, with the blend changing every 4-5 minutes A solid color with a repeated noise texture blended over it

This all is pretty easy to do in a fragment shader, except when:

A) We don’t have GLSL - in this case, the operation of interpolating the two textures and blending the result over the background can’t be expressed with Cogl’s fixed-function layer combining (which is confined to what GL’s texture environment combining can do) So we can only handle the above directly if there are no margins or alpha.

B) The image textures are sliced. Texture size limits on older hardware (pre-965 intel hardware, r300, etc.) is often 2048, and it would be common to use a texture larger than this for a background and expect it to be scaled down. Cogl can compensate for this by breaking the texture up into multiple textures, but can’t multitexture with sliced textures. So we can only handle the above if there’s a single texture.

However, even when we can represent everything in a single pass, it’s not necessarily efficient. If we want to draw a 1024x768 background, it’s pretty inefficient to bilinearly texture from two 2560x1440 images and mix that. So the drawing model we take here is that MetaBackground generates a single texture (which might be a 1x1 texture for a solid color, or a 1x2 texture for a gradient, or a repeated texture for wallpaper, or a pre-rendered texture the size of the screen), and we draw with that, possibly adding the vignette and opacity.

#### Hierarchy

#### Ancestors

- GObject

#### Implements

- ClutterContent

#### Functions

###### meta_background_content_new

Creates a new actor to draw the background for the given monitor.

#### Instance methods

###### meta_background_content_set_background

No description available.

###### meta_background_content_set_gradient

No description available.

###### meta_background_content_set_rounded_clip_bounds

Sets the bounding clip rectangle of the `MetaBackgroundContent` that’s used when a rounded clip set via `meta_background_content_set_rounded_clip_radius()` is in effect, set it to `NULL` to use no bounding clip, rounding the edges of the full texture.

###### meta_background_content_set_rounded_clip_radius

No description available.

###### meta_background_content_set_vignette

No description available.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from ClutterContent (3)

###### clutter_content_get_preferred_size

Retrieves the natural size of the `content`, if any.

###### clutter_content_invalidate

Invalidates a `ClutterContent`.

###### clutter_content_invalidate_size

Signals that `content`‘s size changed. Attached actors with request mode set to `CLUTTER_REQUEST_CONTENT_SIZE` will have a relayout queued.

#### Properties

###### Meta.BackgroundContent:background

No description available.

###### Meta.BackgroundContent:brightness

No description available.

###### Meta.BackgroundContent:gradient

No description available.

###### Meta.BackgroundContent:gradient-height

No description available.

###### Meta.BackgroundContent:gradient-max-darkness

No description available.

###### Meta.BackgroundContent:meta-display

No description available.

###### Meta.BackgroundContent:monitor

No description available.

###### Meta.BackgroundContent:rounded-clip-radius

No description available.

###### Meta.BackgroundContent:vignette

No description available.

###### Meta.BackgroundContent:vignette-sharpness

No description available.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

##### Signals inherited from ClutterContent (2)

###### ClutterContent::attached

This signal is emitted each time a `ClutterContent` implementation is assigned to a `ClutterActor`.

###### ClutterContent::detached

This signal is emitted each time a `ClutterContent` implementation is removed from a `ClutterActor`.

#### Class structure

    struct MetaBackgroundContentClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.