1 /* 2 * Copyright (C) 2019, Matthias Clasen 3 * 4 * This file is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU Lesser General Public License as 6 * published by the Free Software Foundation, version 3.0 of the 7 * License. 8 * 9 * This file is distributed in the hope that it will be useful, but 10 * WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * 17 * SPDX-License-Identifier: LGPL-3.0-only 18 */ 19 20 #pragma once 21 22 #include <libportal/types.h> 23 24 G_BEGIN_DECLS 25 26 /** 27 * XdpWallpaperFlags: 28 * @XDP_WALLPAPER_FLAG_NONE: No flags 29 * @XDP_WALLPAPER_FLAG_BACKGROUND: Set wallpaper on the desktop background 30 * @XDP_WALLPAPER_FLAG_LOCKSCREEN: Set wallpaper on the lockscreen 31 * @XDP_WALLPAPER_FLAG_PREVIEW: Request the preview to be shown 32 * 33 * The values of this enumeration determine where the wallpaper is being set. 34 */ 35 typedef enum { 36 XDP_WALLPAPER_FLAG_NONE = 0, 37 XDP_WALLPAPER_FLAG_BACKGROUND = 1 << 0, 38 XDP_WALLPAPER_FLAG_LOCKSCREEN = 1 << 1, 39 XDP_WALLPAPER_FLAG_PREVIEW = 1 << 2 40 } XdpWallpaperFlags; 41 42 #define XDP_WALLPAPER_TARGET_BOTH (XDP_WALLPAPER_TARGET_BACKGROUND|XDP_WALLPAPER_TARGET_LOCKSCREEN) 43 44 XDP_PUBLIC 45 void xdp_portal_set_wallpaper (XdpPortal *portal, 46 XdpParent *parent, 47 const char *uri, 48 XdpWallpaperFlags flags, 49 GCancellable *cancellable, 50 GAsyncReadyCallback callback, 51 gpointer data); 52 53 XDP_PUBLIC 54 gboolean xdp_portal_set_wallpaper_finish (XdpPortal *portal, 55 GAsyncResult *result, 56 GError **error); 57 58 G_END_DECLS 59