## MateBG MateBG |

## Synopsis

    #include <libmateui/mate-bg.h>

                        MateBG;
    enum                MateBGColorType;
    enum                MateBGPlacement;
    MateBG *            mate_bg_new                         (void);
    void                mate_bg_load_from_preferences       (MateBG *bg);
    void                mate_bg_save_to_preferences         (MateBG *bg);
    void                mate_bg_set_filename                (MateBG *bg,
                                                             const char *filename);
    void                mate_bg_set_placement               (MateBG *bg,
                                                             MateBGPlacement placement);
    void                mate_bg_set_color                   (MateBG *bg,
                                                             MateBGColorType type,
                                                             GdkColor *primary,
                                                             GdkColor *secondary);
    const gchar *       mate_bg_get_filename                (MateBG *bg);
    MateBGPlacement     mate_bg_get_placement               (MateBG *bg);
    void                mate_bg_get_color                   (MateBG *bg,
                                                             MateBGColorType *type,
                                                             GdkColor *primary,
                                                             GdkColor *secondary);
    void                mate_bg_draw                        (MateBG *bg,
                                                             GdkPixbuf *dest,
                                                             GdkScreen *screen,
                                                             gboolean is_root);
    gboolean            mate_bg_get_image_size              (MateBG *bg,
                                                             MateDesktopThumbnailFactory *factory,
                                                             int best_width,
                                                             int best_height,
                                                             int *width,
                                                             int *height);
    GdkPixbuf *         mate_bg_create_thumbnail            (MateBG *bg,
                                                             MateDesktopThumbnailFactory *factory,
                                                             GdkScreen *screen,
                                                             int dest_width,
                                                             int dest_height);
    gboolean            mate_bg_is_dark                     (MateBG *bg,
                                                             int dest_width,
                                                             int dest_height);
    void                mate_bg_set_pixmap_as_root          (GdkScreen *screen,
                                                             GdkPixmap *pixmap);

## Object Hierarchy

      GObject
       +----MateBG

## Signals

      "changed"                                        : Run Last
      "transitioned"                                   : Run Last

## Description

## Details

### MateBG

    typedef struct _MateBG MateBG;

### enum MateBGColorType

    typedef enum {
    	MATE_BG_COLOR_SOLID,
    	MATE_BG_COLOR_H_GRADIENT,
    	MATE_BG_COLOR_V_GRADIENT
    } MateBGColorType;

### enum MateBGPlacement

    typedef enum {
    	MATE_BG_PLACEMENT_TILED,
    	MATE_BG_PLACEMENT_ZOOMED,
    	MATE_BG_PLACEMENT_CENTERED,
    	MATE_BG_PLACEMENT_SCALED,
    	MATE_BG_PLACEMENT_FILL_SCREEN,
    	MATE_BG_PLACEMENT_SPANNED
    } MateBGPlacement;

### mate_bg_new ()

    MateBG *            mate_bg_new                         (void);

### mate_bg_load_from_preferences ()

    void                mate_bg_load_from_preferences       (MateBG *bg);

### mate_bg_save_to_preferences ()

    void                mate_bg_save_to_preferences         (MateBG *bg);

### mate_bg_set_filename ()

    void                mate_bg_set_filename                (MateBG *bg,
                                                             const char *filename);

### mate_bg_set_placement ()

    void                mate_bg_set_placement               (MateBG *bg,
                                                             MateBGPlacement placement);

### mate_bg_set_color ()

    void                mate_bg_set_color                   (MateBG *bg,
                                                             MateBGColorType type,
                                                             GdkColor *primary,
                                                             GdkColor *secondary);

### mate_bg_get_filename ()

    const gchar *       mate_bg_get_filename                (MateBG *bg);

### mate_bg_get_placement ()

    MateBGPlacement     mate_bg_get_placement               (MateBG *bg);

### mate_bg_get_color ()

    void                mate_bg_get_color                   (MateBG *bg,
                                                             MateBGColorType *type,
                                                             GdkColor *primary,
                                                             GdkColor *secondary);

### mate_bg_draw ()

    void                mate_bg_draw                        (MateBG *bg,
                                                             GdkPixbuf *dest,
                                                             GdkScreen *screen,
                                                             gboolean is_root);

### mate_bg_get_image_size ()

    gboolean            mate_bg_get_image_size              (MateBG *bg,
                                                             MateDesktopThumbnailFactory *factory,
                                                             int best_width,
                                                             int best_height,
                                                             int *width,
                                                             int *height);

### mate_bg_create_thumbnail ()

    GdkPixbuf *         mate_bg_create_thumbnail            (MateBG *bg,
                                                             MateDesktopThumbnailFactory *factory,
                                                             GdkScreen *screen,
                                                             int dest_width,
                                                             int dest_height);

### mate_bg_is_dark ()

    gboolean            mate_bg_is_dark                     (MateBG *bg,
                                                             int dest_width,
                                                             int dest_height);

### mate_bg_set_pixmap_as_root ()

    void                mate_bg_set_pixmap_as_root          (GdkScreen *screen,
                                                             GdkPixmap *pixmap);

## Signal Details

### The `"changed"` signal

    void                user_function                      (MateBG  *matebg,
                                                            gpointer user_data)      : Run Last

`bg` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"transitioned"` signal

    void                user_function                      (MateBG  *matebg,
                                                            gpointer user_data)      : Run Last

`bg` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.