MateBG: MATE Desktop Library Reference Manual

## MateBG MateBG |

## Functions

MateBG * | mate_bg_new ()
void | mate_bg_load_from_preferences ()
void | mate_bg_save_to_preferences ()
void | mate_bg_set_filename ()
void | mate_bg_set_placement ()
void | mate_bg_set_color ()
const gchar * | mate_bg_get_filename ()
MateBGPlacement | mate_bg_get_placement ()
void | mate_bg_get_color ()
void | mate_bg_draw ()
gboolean | mate_bg_get_image_size ()
GdkPixbuf * | mate_bg_create_thumbnail ()
gboolean | mate_bg_is_dark ()
void | mate_bg_set_pixmap_as_root ()

## Signals

void | changed | Run Last
void | transitioned | Run Last

## Types and Values

| MateBG
enum | MateBGColorType
enum | MateBGPlacement

## Object Hierarchy

        GObject
        ╰── MateBG

## Includes

    #include <mate-bg.h>

## Description

## Functions

### 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);

#### Returns

a GdkPixbuf showing the background as a thumbnail.

[transfer full]

### 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);

## Types and Values

### MateBG

    typedef struct _MateBG MateBG;

### enum MateBGColorType

#### Members

MATE_BG_COLOR_SOLID |  |
MATE_BG_COLOR_H_GRADIENT |  |
MATE_BG_COLOR_V_GRADIENT |  |

### enum MateBGPlacement

#### Members

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 |  |

## Signal Details

### The `“changed”` signal

    void
    user_function (MateBG  *matebg,
                   gpointer user_data)

#### Parameters

matebg | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“transitioned”` signal

    void
    user_function (MateBG  *matebg,
                   gpointer user_data)

#### Parameters

matebg | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last