GnomeBGCrossfade: GNOME Desktop Library Reference Manual

## GnomeBGCrossfade GnomeBGCrossfade |

## Functions

GnomeBGCrossfade * | gnome_bg_crossfade_new ()
gboolean | gnome_bg_crossfade_set_start_surface ()
gboolean | gnome_bg_crossfade_set_end_surface ()
void | gnome_bg_crossfade_start ()
gboolean | gnome_bg_crossfade_is_started ()
void | gnome_bg_crossfade_stop ()

## Types and Values

struct | GnomeBGCrossfade
struct | GnomeBGCrossfadeClass
| GnomeBGCrossfadePrivate

## Description

## Functions

### gnome_bg_crossfade_new ()

    GnomeBGCrossfade *
    gnome_bg_crossfade_new (int width,
                            int height);

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

#### Parameters

width | The width of the crossfading window |
height | The height of the crossfading window |

#### Returns

the new GnomeBGCrossfade

### gnome_bg_crossfade_set_start_surface ()

    gboolean
    gnome_bg_crossfade_set_start_surface (GnomeBGCrossfade *fade,
                                          cairo_surface_t *surface);

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

#### Parameters

fade | a GnomeBGCrossfade |
surface | The cairo surface to fade from |

#### Returns

`TRUE` if successful, or `FALSE` if the surface could not be copied.

### gnome_bg_crossfade_set_end_surface ()

    gboolean
    gnome_bg_crossfade_set_end_surface (GnomeBGCrossfade *fade,
                                        cairo_surface_t *surface);

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

#### Parameters

fade | a GnomeBGCrossfade |
surface | The cairo surface to fade to |

#### Returns

`TRUE` if successful, or `FALSE` if the surface could not be copied.

### gnome_bg_crossfade_start ()

    void
    gnome_bg_crossfade_start (GnomeBGCrossfade *fade,
                              GdkWindow *window);

This function initiates a quick crossfade between two surfaces on the background of `window` . Before initiating the crossfade both `gnome_bg_crossfade_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.

#### Parameters

fade | a GnomeBGCrossfade |
window | The GdkWindow to draw crossfade on |

### gnome_bg_crossfade_is_started ()

    gboolean
    gnome_bg_crossfade_is_started (GnomeBGCrossfade *fade);

This function reveals whether or not `fade` is currently running on a window. See `gnome_bg_crossfade_start()` for information on how to initiate a crossfade.

#### Parameters

fade | a GnomeBGCrossfade |

#### Returns

`TRUE` if fading, or `FALSE` if not fading

### gnome_bg_crossfade_stop ()

    void
    gnome_bg_crossfade_stop (GnomeBGCrossfade *fade);

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

#### Parameters

fade | a GnomeBGCrossfade |

## Types and Values

### struct GnomeBGCrossfade

    struct GnomeBGCrossfade {
    	GObject parent_object;

    	GnomeBGCrossfadePrivate *priv;
    };

### struct GnomeBGCrossfadeClass

    struct GnomeBGCrossfadeClass {
    	GObjectClass parent_class;

    	void (* finished) (GnomeBGCrossfade *fade, GdkWindow *window);
    };

### GnomeBGCrossfadePrivate

    typedef struct _GnomeBGCrossfadePrivate GnomeBGCrossfadePrivate;