~kroq-gar78/ubuntu/precise/gnome-control-center/fix-885947

« back to all changes in this revision

Viewing changes to panels/background/cc-background-item.h

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Moya
  • Date: 2011-05-17 10:47:27 UTC
  • mfrom: (0.1.11 experimental) (1.1.45 upstream)
  • Revision ID: james.westby@ubuntu.com-20110517104727-lqel6m8vhfw5jby1
Tags: 1:3.0.1.1-1ubuntu1
* Rebase on Debian, remaining Ubuntu changes:
* debian/control:
  - Build-Depend on hardening-wrapper, dpkg-dev and dh-autoreconf
  - Add dependency on ubuntu-system-service
  - Remove dependency on gnome-icon-theme-symbolic
  - Move dependency on apg, gnome-icon-theme-symbolic and accountsservice to
    be a Recommends: until we get them in main
* debian/rules:
  - Use autoreconf
  - Add binary-post-install rule for gnome-control-center-data
  - Run dh-autoreconf
* debian/gnome-control-center.dirs:
* debian/gnome-control-center.links:
  - Add a link to the control center shell for indicators
* debian/patches/00_disable-nm.patch:
  - Temporary patch to disable building with NetworkManager until we get
    the new one in the archive
* debian/patches/01_git_remove_gettext_calls.patch:
  - Remove calls to AM_GNU_GETTEXT, IT_PROG_INTLTOOL should be enough
* debian/patches/01_git_kill_warning.patch:
  - Kill warning
* debian/patches/50_ubuntu_systemwide_prefs.patch:
  - Ubuntu specific proxy preferences
* debian/patches/51_ubuntu_system_keyboard.patch:
  - Implement the global keyboard spec at https://wiki.ubuntu.com/DefaultKeyboardSettings

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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, write to the Free Software
 
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
18
 *
 
19
 */
 
20
 
 
21
#ifndef __CC_BACKGROUND_ITEM_H
 
22
#define __CC_BACKGROUND_ITEM_H
 
23
 
 
24
#include <glib-object.h>
 
25
 
 
26
#include <libgnome-desktop/gnome-desktop-thumbnail.h>
 
27
#include <gdesktop-enums.h>
 
28
#include <libgnome-desktop/gnome-bg.h>
 
29
 
 
30
G_BEGIN_DECLS
 
31
 
 
32
#define CC_TYPE_BACKGROUND_ITEM         (cc_background_item_get_type ())
 
33
#define CC_BACKGROUND_ITEM(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), CC_TYPE_BACKGROUND_ITEM, CcBackgroundItem))
 
34
#define CC_BACKGROUND_ITEM_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), CC_TYPE_BACKGROUND_ITEM, CcBackgroundItemClass))
 
35
#define CC_IS_BACKGROUND_ITEM(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), CC_TYPE_BACKGROUND_ITEM))
 
36
#define CC_IS_BACKGROUND_ITEM_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), CC_TYPE_BACKGROUND_ITEM))
 
37
#define CC_BACKGROUND_ITEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CC_TYPE_BACKGROUND_ITEM, CcBackgroundItemClass))
 
38
 
 
39
typedef enum {
 
40
        CC_BACKGROUND_ITEM_HAS_SHADING   = 1 << 0,
 
41
        CC_BACKGROUND_ITEM_HAS_PLACEMENT = 1 << 1,
 
42
        CC_BACKGROUND_ITEM_HAS_PCOLOR    = 1 << 2,
 
43
        CC_BACKGROUND_ITEM_HAS_SCOLOR    = 1 << 3,
 
44
        CC_BACKGROUND_ITEM_HAS_URI       = 1 << 4
 
45
} CcBackgroundItemFlags;
 
46
 
 
47
#define CC_BACKGROUND_ITEM_HAS_ALL (CC_BACKGROUND_ITEM_HAS_SHADING &    \
 
48
                                    CC_BACKGROUND_ITEM_HAS_PLACEMENT &  \
 
49
                                    CC_BACKGROUND_ITEM_HAS_PCOLOR &     \
 
50
                                    CC_BACKGROUND_ITEM_HAS_SCOLOR &     \
 
51
                                    CC_BACKGROUND_ITEM_HAS_FNAME)
 
52
 
 
53
typedef struct CcBackgroundItemPrivate CcBackgroundItemPrivate;
 
54
 
 
55
typedef struct
 
56
{
 
57
        GObject                  parent;
 
58
        CcBackgroundItemPrivate *priv;
 
59
} CcBackgroundItem;
 
60
 
 
61
typedef struct
 
62
{
 
63
        GObjectClass   parent_class;
 
64
} CcBackgroundItemClass;
 
65
 
 
66
GType              cc_background_item_get_type (void);
 
67
 
 
68
CcBackgroundItem * cc_background_item_new                 (const char                   *uri);
 
69
CcBackgroundItem * cc_background_item_copy                (CcBackgroundItem             *item);
 
70
gboolean           cc_background_item_load                (CcBackgroundItem             *item,
 
71
                                                           GFileInfo                    *info);
 
72
gboolean           cc_background_item_changes_with_time   (CcBackgroundItem             *item);
 
73
 
 
74
GIcon     *        cc_background_item_get_thumbnail       (CcBackgroundItem             *item,
 
75
                                                           GnomeDesktopThumbnailFactory *thumbs,
 
76
                                                           int                           width,
 
77
                                                           int                           height);
 
78
GIcon     *        cc_background_item_get_frame_thumbnail (CcBackgroundItem             *item,
 
79
                                                           GnomeDesktopThumbnailFactory *thumbs,
 
80
                                                           int                           width,
 
81
                                                           int                           height,
 
82
                                                           int                           frame,
 
83
                                                           gboolean                      force_size);
 
84
 
 
85
GDesktopBackgroundStyle   cc_background_item_get_placement  (CcBackgroundItem *item);
 
86
GDesktopBackgroundShading cc_background_item_get_shading    (CcBackgroundItem *item);
 
87
const char *              cc_background_item_get_uri        (CcBackgroundItem *item);
 
88
const char *              cc_background_item_get_source_url (CcBackgroundItem *item);
 
89
const char *              cc_background_item_get_source_xml (CcBackgroundItem *item);
 
90
CcBackgroundItemFlags     cc_background_item_get_flags      (CcBackgroundItem *item);
 
91
const char *              cc_background_item_get_pcolor     (CcBackgroundItem *item);
 
92
const char *              cc_background_item_get_scolor     (CcBackgroundItem *item);
 
93
const char *              cc_background_item_get_name       (CcBackgroundItem *item);
 
94
const char *              cc_background_item_get_size       (CcBackgroundItem *item);
 
95
gboolean                  cc_background_item_get_needs_download (CcBackgroundItem *item);
 
96
 
 
97
gboolean                  cc_background_item_compare        (CcBackgroundItem *saved,
 
98
                                                             CcBackgroundItem *configured);
 
99
 
 
100
void                      cc_background_item_dump           (CcBackgroundItem *item);
 
101
 
 
102
G_END_DECLS
 
103
 
 
104
#endif /* __CC_BACKGROUND_ITEM_H */