## gnome-bg

gnome-bg

## Functions

GnomeBG * | gnome_bg_new ()
void | gnome_bg_load_from_preferences ()
void | gnome_bg_save_to_preferences ()
void | gnome_bg_set_filename ()
void | gnome_bg_set_placement ()
void | gnome_bg_set_rgba ()
GDesktopBackgroundStyle | gnome_bg_get_placement ()
void | gnome_bg_get_rgba ()
const gchar * | gnome_bg_get_filename ()
void | gnome_bg_draw ()
cairo_surface_t * | gnome_bg_create_surface ()
gboolean | gnome_bg_get_image_size ()
GdkPixbuf * | gnome_bg_create_thumbnail ()
gboolean | gnome_bg_is_dark ()
gboolean | gnome_bg_has_multiple_sizes ()
gboolean | gnome_bg_changes_with_time ()
GdkPixbuf * | gnome_bg_create_frame_thumbnail ()

## Types and Values

| GnomeBG
| GnomeBGClass

## Description

## Functions

### gnome_bg_new ()

    GnomeBG *
    gnome_bg_new (void);

### gnome_bg_load_from_preferences ()

    void
    gnome_bg_load_from_preferences (GnomeBG *bg,
                                    GSettings *settings);

### gnome_bg_save_to_preferences ()

    void
    gnome_bg_save_to_preferences (GnomeBG *bg,
                                  GSettings *settings);

### gnome_bg_set_filename ()

    void
    gnome_bg_set_filename (GnomeBG *bg,
                           const char *filename);

### gnome_bg_set_placement ()

    void
    gnome_bg_set_placement (GnomeBG *bg,
                            GDesktopBackgroundStyle placement);

### gnome_bg_set_rgba ()

    void
    gnome_bg_set_rgba (GnomeBG *bg,
                       GDesktopBackgroundShading type,
                       GdkRGBA *primary,
                       GdkRGBA *secondary);

### gnome_bg_get_placement ()

    GDesktopBackgroundStyle
    gnome_bg_get_placement (GnomeBG *bg);

### gnome_bg_get_rgba ()

    void
    gnome_bg_get_rgba (GnomeBG *bg,
                       GDesktopBackgroundShading *type,
                       GdkRGBA *primary,
                       GdkRGBA *secondary);

### gnome_bg_get_filename ()

    const gchar *
    gnome_bg_get_filename (GnomeBG *bg);

### gnome_bg_draw ()

    void
    gnome_bg_draw (GnomeBG *bg,
                   GdkPixbuf *dest);

### gnome_bg_create_surface ()

    cairo_surface_t *
    gnome_bg_create_surface (GnomeBG *bg,
                             GdkWindow *window,
                             int width,
                             int height);

Create a surface that can be set as background for `window` .

#### Parameters

bg | GnomeBG |

#### Returns

`NULL` on error (e.g. out of X connections)

### gnome_bg_get_image_size ()

    gboolean
    gnome_bg_get_image_size (GnomeBG *bg,
                             GnomeDesktopThumbnailFactory *factory,
                             int best_width,
                             int best_height,
                             int *width,
                             int *height);

### gnome_bg_create_thumbnail ()

    GdkPixbuf *
    gnome_bg_create_thumbnail (GnomeBG *bg,
                               GnomeDesktopThumbnailFactory *factory,
                               GdkScreen *screen,
                               int dest_width,
                               int dest_height);

#### Returns

a GdkPixbuf showing the background as a thumbnail.

[transfer full]

### gnome_bg_is_dark ()

    gboolean
    gnome_bg_is_dark (GnomeBG *bg,
                      int dest_width,
                      int dest_height);

### gnome_bg_has_multiple_sizes ()

    gboolean
    gnome_bg_has_multiple_sizes (GnomeBG *bg);

### gnome_bg_changes_with_time ()

    gboolean
    gnome_bg_changes_with_time (GnomeBG *bg);

### gnome_bg_create_frame_thumbnail ()

    GdkPixbuf *
    gnome_bg_create_frame_thumbnail (GnomeBG *bg,
                                     GnomeDesktopThumbnailFactory *factory,
                                     GdkScreen *screen,
                                     int dest_width,
                                     int dest_height,
                                     int frame_num);

Creates a thumbnail for a certain frame, where 'frame' is somewhat vaguely defined as 'suitable point to show while single-stepping through the slideshow'.

#### Returns

the newly created thumbnail or or NULL if frame_num is out of bounds.

[transfer full]

## Types and Values

### GnomeBG

    typedef struct _GnomeBG GnomeBG;

### GnomeBGClass

    typedef struct _GnomeBGClass GnomeBGClass;