CinnamonDesktop.BGCrossfade

g CinnamonDesktop.BGCrossfade CinnamonDesktop.BGCrossfade GObject.Object GObject.Object GObject.Object->CinnamonDesktop.BGCrossfade

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (width, height)

is_started ()

set_end_surface (surface)

set_start_surface (surface)

start (window)

stop ()

Virtual Methods

Inherited:

GObject.Object (7)

do_finished (window)

Properties

Name

Type

Flags

Short Description

height

int

r/w/co

Height of window to fade on

width

int

r/w/co

Width of window to fade

Signals

Inherited:

GObject.Object (1)

Name

Short Description

finished

When a crossfade finishes, window will have a copy of the end surface as its background, and this signal will get emitted.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_object

GObject.Object

r

Class Details

class CinnamonDesktop.BGCrossfade(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

CinnamonDesktop.BGCrossfadeClass

classmethod new(width, height)
Parameters:
  • width (int) – The width of the crossfading window

  • height (int) – The height of the crossfading window

Returns:

the new CinnamonDesktop.BGCrossfade

Return type:

CinnamonDesktop.BGCrossfade

Creates a new object to manage crossfading a window background between two cairo.Surfaces.

is_started()
Returns:

True if fading, or False if not fading

Return type:

bool

This function reveals whether or not self is currently running on a window. See CinnamonDesktop.BGCrossfade.start() for information on how to initiate a crossfade.

set_end_surface(surface)
Parameters:

surface (cairo.Surface) – The cairo surface to fade to

Returns:

True if successful, or False if the surface could not be copied.

Return type:

bool

Before initiating a crossfade with CinnamonDesktop.BGCrossfade.start() a start and end surface have to be set. This function sets the surface shown at the end of the crossfade effect.

set_start_surface(surface)
Parameters:

surface (cairo.Surface) – The cairo surface to fade from

Returns:

True if successful, or False if the surface could not be copied.

Return type:

bool

Before initiating a crossfade with CinnamonDesktop.BGCrossfade.start() a start and end surface have to be set. This function sets the surface shown at the beginning of the crossfade effect.

start(window)
Parameters:

window (Gdk.Window) – The Gdk.Window to draw crossfade on

This function initiates a quick crossfade between two surfaces on the background of window. Before initiating the crossfade both CinnamonDesktop.BGCrossfade.start() and gnome_bg_crossfade_end() need to be called. If animations are disabled, the crossfade is skipped, and the window background is set immediately to the end surface.

stop()

This function stops any in progress crossfades that may be happening. It’s harmless to call this function if self is already stopped.

do_finished(window) virtual
Parameters:

window (Gdk.Window) –

Signal Details

CinnamonDesktop.BGCrossfade.signals.finished(b_g_crossfade, window)
Signal Name:

finished

Flags:

RUN_LAST

Parameters:

When a crossfade finishes, window will have a copy of the end surface as its background, and this signal will get emitted.

Property Details

CinnamonDesktop.BGCrossfade.props.height
Name:

height

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

When a crossfade is running, this is height of the fading surface.

CinnamonDesktop.BGCrossfade.props.width
Name:

width

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

When a crossfade is running, this is width of the fading surface.