Wallpaper

Wallpaper — Set desktop backgrounds

Functions

Types and Values

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,
                          gboolean show_preview,
                          XdpWallpaperTarget target,
                          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

 

show_preview

whether to show a preview dialog

 

target

where to set the wallpaper

 

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 XdpWallpaperTarget

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

Members

XDP_WALLPAPER_TARGET_BACKGROUND

Set wallpaper on the desktop background

 

XDP_WALLPAPER_TARGET_LOCKSCREEN

Set wallpaper on the lockscreen