2011-02-10 20:30:57 +00:00
|
|
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
|
2010-08-10 15:26:07 +01:00
|
|
|
*
|
2011-02-10 20:30:57 +00:00
|
|
|
* Copyright (C) 2010-2011 Red Hat, Inc.
|
2010-08-10 15:26:07 +01:00
|
|
|
*
|
2011-02-10 20:30:57 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
2010-08-10 15:26:07 +01:00
|
|
|
*
|
2011-02-10 20:30:57 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2010-08-10 15:26:07 +01:00
|
|
|
*
|
2011-02-10 20:30:57 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
2014-01-23 12:57:27 +01:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2010-08-10 15:26:07 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2011-02-10 20:30:57 +00:00
|
|
|
#ifndef __CC_BACKGROUND_ITEM_H
|
|
|
|
#define __CC_BACKGROUND_ITEM_H
|
|
|
|
|
|
|
|
#include <glib-object.h>
|
2014-08-12 23:48:46 +02:00
|
|
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
2011-02-10 20:30:57 +00:00
|
|
|
#include <libgnome-desktop/gnome-desktop-thumbnail.h>
|
2011-02-17 20:59:55 +01:00
|
|
|
#include <gdesktop-enums.h>
|
2011-02-10 20:30:57 +00:00
|
|
|
#include <libgnome-desktop/gnome-bg.h>
|
2010-08-10 15:26:07 +01:00
|
|
|
|
2011-02-10 20:30:57 +00:00
|
|
|
G_BEGIN_DECLS
|
2010-08-10 15:26:07 +01:00
|
|
|
|
2017-09-25 14:16:09 -04:00
|
|
|
#define CC_TYPE_BACKGROUND_ITEM (cc_background_item_get_type ())
|
|
|
|
G_DECLARE_FINAL_TYPE (CcBackgroundItem, cc_background_item, CC, BACKGROUND_ITEM, GObject)
|
2010-08-10 15:26:07 +01:00
|
|
|
|
2011-02-10 20:30:57 +00:00
|
|
|
typedef enum {
|
2011-02-11 18:04:57 +00:00
|
|
|
CC_BACKGROUND_ITEM_HAS_SHADING = 1 << 0,
|
2011-02-10 20:30:57 +00:00
|
|
|
CC_BACKGROUND_ITEM_HAS_PLACEMENT = 1 << 1,
|
2011-02-11 18:04:57 +00:00
|
|
|
CC_BACKGROUND_ITEM_HAS_PCOLOR = 1 << 2,
|
|
|
|
CC_BACKGROUND_ITEM_HAS_SCOLOR = 1 << 3,
|
|
|
|
CC_BACKGROUND_ITEM_HAS_URI = 1 << 4
|
2011-02-10 20:30:57 +00:00
|
|
|
} CcBackgroundItemFlags;
|
2010-08-10 15:26:07 +01:00
|
|
|
|
2011-02-10 20:30:57 +00:00
|
|
|
#define CC_BACKGROUND_ITEM_HAS_ALL (CC_BACKGROUND_ITEM_HAS_SHADING & \
|
|
|
|
CC_BACKGROUND_ITEM_HAS_PLACEMENT & \
|
|
|
|
CC_BACKGROUND_ITEM_HAS_PCOLOR & \
|
|
|
|
CC_BACKGROUND_ITEM_HAS_SCOLOR & \
|
|
|
|
CC_BACKGROUND_ITEM_HAS_FNAME)
|
2010-08-10 15:26:07 +01:00
|
|
|
|
2011-02-11 18:04:57 +00:00
|
|
|
CcBackgroundItem * cc_background_item_new (const char *uri);
|
2011-02-11 12:48:28 +00:00
|
|
|
CcBackgroundItem * cc_background_item_copy (CcBackgroundItem *item);
|
2011-02-10 20:30:57 +00:00
|
|
|
gboolean cc_background_item_load (CcBackgroundItem *item,
|
|
|
|
GFileInfo *info);
|
|
|
|
gboolean cc_background_item_changes_with_time (CcBackgroundItem *item);
|
2010-08-10 15:26:07 +01:00
|
|
|
|
2014-08-12 23:48:46 +02:00
|
|
|
GdkPixbuf * cc_background_item_get_thumbnail (CcBackgroundItem *item,
|
2011-02-10 20:30:57 +00:00
|
|
|
GnomeDesktopThumbnailFactory *thumbs,
|
|
|
|
int width,
|
2014-06-30 15:47:24 +02:00
|
|
|
int height,
|
|
|
|
int scale_factor);
|
2014-08-12 23:48:46 +02:00
|
|
|
GdkPixbuf * cc_background_item_get_frame_thumbnail (CcBackgroundItem *item,
|
2011-02-10 20:30:57 +00:00
|
|
|
GnomeDesktopThumbnailFactory *thumbs,
|
|
|
|
int width,
|
|
|
|
int height,
|
2014-06-30 15:47:24 +02:00
|
|
|
int scale_factor,
|
2011-03-29 23:44:58 -04:00
|
|
|
int frame,
|
|
|
|
gboolean force_size);
|
2010-08-10 15:26:07 +01:00
|
|
|
|
2011-02-10 20:30:57 +00:00
|
|
|
GDesktopBackgroundStyle cc_background_item_get_placement (CcBackgroundItem *item);
|
|
|
|
GDesktopBackgroundShading cc_background_item_get_shading (CcBackgroundItem *item);
|
2011-02-11 18:04:57 +00:00
|
|
|
const char * cc_background_item_get_uri (CcBackgroundItem *item);
|
2011-02-10 20:30:57 +00:00
|
|
|
const char * cc_background_item_get_source_url (CcBackgroundItem *item);
|
|
|
|
const char * cc_background_item_get_source_xml (CcBackgroundItem *item);
|
|
|
|
CcBackgroundItemFlags cc_background_item_get_flags (CcBackgroundItem *item);
|
|
|
|
const char * cc_background_item_get_pcolor (CcBackgroundItem *item);
|
|
|
|
const char * cc_background_item_get_scolor (CcBackgroundItem *item);
|
|
|
|
const char * cc_background_item_get_name (CcBackgroundItem *item);
|
|
|
|
const char * cc_background_item_get_size (CcBackgroundItem *item);
|
2011-02-14 17:47:01 +00:00
|
|
|
gboolean cc_background_item_get_needs_download (CcBackgroundItem *item);
|
2013-01-25 11:56:58 +00:00
|
|
|
guint64 cc_background_item_get_modified (CcBackgroundItem *item);
|
2010-08-10 15:26:07 +01:00
|
|
|
|
2011-02-13 02:49:03 +00:00
|
|
|
gboolean cc_background_item_compare (CcBackgroundItem *saved,
|
|
|
|
CcBackgroundItem *configured);
|
2011-02-11 03:35:50 +00:00
|
|
|
void cc_background_item_dump (CcBackgroundItem *item);
|
|
|
|
|
2011-02-10 20:30:57 +00:00
|
|
|
G_END_DECLS
|
2010-08-10 15:26:07 +01:00
|
|
|
|
2011-02-10 20:30:57 +00:00
|
|
|
#endif /* __CC_BACKGROUND_ITEM_H */
|