GCC Code Coverage Report


Directory: ./
File: panels/background/cc-background-item.h
Date: 2024-05-04 07:58:27
Exec Total Coverage
Lines: 0 1 0.0%
Functions: 0 4 0.0%
Branches: 0 7 0.0%

Line Branch Exec Source
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2010-2011 Red Hat, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 *
18 */
19
20 #pragma once
21
22 #include <glib-object.h>
23 #include <gdk-pixbuf/gdk-pixbuf.h>
24 #include <libgnome-desktop/gnome-desktop-thumbnail.h>
25 #include <gdesktop-enums.h>
26 #include <gnome-bg/gnome-bg.h>
27
28 G_BEGIN_DECLS
29
30 #define CC_TYPE_BACKGROUND_ITEM (cc_background_item_get_type ())
31 G_DECLARE_FINAL_TYPE (CcBackgroundItem, cc_background_item, CC, BACKGROUND_ITEM, GObject)
32
33 typedef enum {
34 CC_BACKGROUND_ITEM_HAS_SHADING = 1 << 0,
35 CC_BACKGROUND_ITEM_HAS_PLACEMENT = 1 << 1,
36 CC_BACKGROUND_ITEM_HAS_PCOLOR = 1 << 2,
37 CC_BACKGROUND_ITEM_HAS_SCOLOR = 1 << 3,
38 CC_BACKGROUND_ITEM_HAS_URI = 1 << 4,
39 CC_BACKGROUND_ITEM_HAS_URI_DARK = 1 << 5
40 } CcBackgroundItemFlags;
41
42 #define CC_BACKGROUND_ITEM_HAS_ALL (CC_BACKGROUND_ITEM_HAS_SHADING & \
43 CC_BACKGROUND_ITEM_HAS_PLACEMENT & \
44 CC_BACKGROUND_ITEM_HAS_PCOLOR & \
45 CC_BACKGROUND_ITEM_HAS_SCOLOR & \
46 CC_BACKGROUND_ITEM_HAS_FNAME)
47
48 CcBackgroundItem * cc_background_item_new (const char *uri);
49 CcBackgroundItem * cc_background_item_copy (CcBackgroundItem *item);
50 gboolean cc_background_item_load (CcBackgroundItem *item,
51 GFileInfo *info);
52 gboolean cc_background_item_changes_with_time (CcBackgroundItem *item);
53 gboolean cc_background_item_has_dark_version (CcBackgroundItem *item);
54
55 GdkPixbuf * cc_background_item_get_thumbnail (CcBackgroundItem *item,
56 GnomeDesktopThumbnailFactory *thumbs,
57 int width,
58 int height,
59 int scale_factor,
60 gboolean dark);
61 GdkPixbuf * cc_background_item_get_frame_thumbnail (CcBackgroundItem *item,
62 GnomeDesktopThumbnailFactory *thumbs,
63 int width,
64 int height,
65 int scale_factor,
66 int frame,
67 gboolean dark);
68
69 GDesktopBackgroundStyle cc_background_item_get_placement (CcBackgroundItem *item);
70 GDesktopBackgroundShading cc_background_item_get_shading (CcBackgroundItem *item);
71 const char * cc_background_item_get_uri (CcBackgroundItem *item);
72 const char * cc_background_item_get_uri_dark (CcBackgroundItem *item);
73 const char * cc_background_item_get_source_url (CcBackgroundItem *item);
74 const char * cc_background_item_get_source_xml (CcBackgroundItem *item);
75 CcBackgroundItemFlags cc_background_item_get_flags (CcBackgroundItem *item);
76 const char * cc_background_item_get_pcolor (CcBackgroundItem *item);
77 const char * cc_background_item_get_scolor (CcBackgroundItem *item);
78 const char * cc_background_item_get_name (CcBackgroundItem *item);
79 const char * cc_background_item_get_size (CcBackgroundItem *item);
80 gboolean cc_background_item_get_needs_download (CcBackgroundItem *item);
81 guint64 cc_background_item_get_modified (CcBackgroundItem *item);
82
83 gboolean cc_background_item_compare (CcBackgroundItem *saved,
84 CcBackgroundItem *configured);
85 void cc_background_item_dump (CcBackgroundItem *item);
86
87 G_END_DECLS
88