## Wallpaper Wallpaper — Set desktop backgrounds |

## Functions

void | xdp_portal_set_wallpaper ()
gboolean | xdp_portal_set_wallpaper_finish ()

## Types and Values

enum | XdpWallpaperFlags

## Description

These functions let applications set desktop backgrounds.

The underlying portal is org.freedesktop.portal.Wallpaper.

## Functions

### xdp_portal_set_wallpaper ()

    void
    xdp_portal_set_wallpaper (XdpPortal *portal,
                              XdpParent *parent,
                              const char *uri,
                              XdpWallpaperFlags flags,
                              GCancellable *cancellable,
                              GAsyncReadyCallback callback,
                              gpointer data);

Sets a desktop background image, given by a uri.

#### Parameters

portal | a XdpPortal |
parent | parent window information |
uri | the URI to use |
flags | options for this call |
cancellable | optional GCancellable. | [nullable]
callback | a callback to call when the request is done. | [scope async]
data | data to pass to `callback` . | [closure]

### xdp_portal_set_wallpaper_finish ()

    gboolean
    xdp_portal_set_wallpaper_finish (XdpPortal *portal,
                                     GAsyncResult *result,
                                     GError **error);

Finishes the open-uri request, and returns the result in the form of a boolean.

#### Parameters

portal | a XdpPortal |
result | a GAsyncResult |
error | return location for an error |

#### Returns

`TRUE` if the call succeeded

## Types and Values

### enum XdpWallpaperFlags

The values of this enumeration determine where the wallpaper is being set.

#### Members

XDP_WALLPAPER_FLAG_NONE | No flags |
XDP_WALLPAPER_FLAG_BACKGROUND | Set wallpaper on the desktop background |
XDP_WALLPAPER_FLAG_LOCKSCREEN | Set wallpaper on the lockscreen |
XDP_WALLPAPER_FLAG_PREVIEW | Request the preview to be shown |