~ubuntu-branches/ubuntu/vivid/gnome-desktop3/vivid-proposed

« back to all changes in this revision

Viewing changes to .pc/git_revert_draw_background.patch/libgnome-desktop/gnome-bg.h

  • Committer: Package Import Robot
  • Author(s): Tim Lunn
  • Date: 2013-05-28 09:10:46 UTC
  • mfrom: (1.6.1) (21.1.10 experimental)
  • Revision ID: package-import@ubuntu.com-20130528091046-b0oc28za9l97fgq1
Tags: 3.8.2-0ubuntu1
* New upstream release
* Sync with Debian (LP: #1184812) Remaining changes:
  - debian/patches:
    + 04_compute_average_color.patch: Compute the avergage color in
      gnome-desktop itself, not in unity to fix some races (LP #963140)
    + tweak_color_computation.patch, Patch from Gord, no patch header,
      no bug link.
    + git_revert_draw_background.patch
    + ubuntu_language.patch, Ported relevant bits from g-c-c 
      52_region_language.patch, as required for gnome 3.8 region panel
    + ubuntu_language_list_from_SUPPORTED.patch,
      adds api to get list of available languages from SUPPORTED file.
      To be used by gnome 3.8 region panel language installation.
  - debian/control.in:
    + Don't break gnome-shell << 3.7.90
    + Use source:Version for gnome-desktop3-data Depend
    + Add epoch to gnome-desktop3-data's Breaks/Replaces, as our old
      gnome-desktop source package introduced an epoch. This needs to be
      kept until after 14.04 LTS.
 - Install helper tools into a versioned directory (by overriding
   libexecdir). They could alternatively be installed in a separate package
* Dropped changes:
  - 02_refuse_to_break_GL_compositors.patch:
    + Doesn't appear to be needed any more
 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* gnome-bg.h - 
 
2
 
 
3
   Copyright 2007, Red Hat, Inc.
 
4
 
 
5
   This file is part of the Gnome Library.
 
6
 
 
7
   The Gnome Library is free software; you can redistribute it and/or
 
8
   modify it under the terms of the GNU Library General Public License as
 
9
   published by the Free Software Foundation; either version 2 of the
 
10
   License, or (at your option) any later version.
 
11
   
 
12
   The Gnome Library is distributed in the hope that it will be useful,
 
13
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
   Library General Public License for more details.
 
16
   
 
17
   You should have received a copy of the GNU Library General Public
 
18
   License along with the Gnome Library; see the file COPYING.LIB.  If not,
 
19
   write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
20
   Boston, MA 02110-1301, USA.
 
21
 
 
22
   Author: Soren Sandmann <sandmann@redhat.com>
 
23
*/
 
24
 
 
25
#ifndef __GNOME_BG_H__
 
26
#define __GNOME_BG_H__
 
27
 
 
28
#ifndef GNOME_DESKTOP_USE_UNSTABLE_API
 
29
#error    GnomeBG is unstable API. You must define GNOME_DESKTOP_USE_UNSTABLE_API before including gnome-bg.h
 
30
#endif
 
31
 
 
32
#include <gdk/gdk.h>
 
33
#include <gio/gio.h>
 
34
#include <gdesktop-enums.h>
 
35
#include <libgnome-desktop/gnome-desktop-thumbnail.h>
 
36
#include <libgnome-desktop/gnome-bg-crossfade.h>
 
37
#include <gdesktop-enums.h>
 
38
 
 
39
G_BEGIN_DECLS
 
40
 
 
41
#define GNOME_TYPE_BG            (gnome_bg_get_type ())
 
42
#define GNOME_BG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_BG, GnomeBG))
 
43
#define GNOME_BG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GNOME_TYPE_BG, GnomeBGClass))
 
44
#define GNOME_IS_BG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_BG))
 
45
#define GNOME_IS_BG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  GNOME_TYPE_BG))
 
46
#define GNOME_BG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  GNOME_TYPE_BG, GnomeBGClass))
 
47
 
 
48
typedef struct _GnomeBG GnomeBG;
 
49
typedef struct _GnomeBGClass GnomeBGClass;
 
50
 
 
51
GType            gnome_bg_get_type              (void);
 
52
GnomeBG *        gnome_bg_new                   (void);
 
53
void             gnome_bg_load_from_preferences (GnomeBG               *bg,
 
54
                                                 GSettings             *settings);
 
55
void             gnome_bg_save_to_preferences   (GnomeBG               *bg,
 
56
                                                 GSettings             *settings);
 
57
/* Setters */
 
58
void             gnome_bg_set_filename          (GnomeBG               *bg,
 
59
                                                 const char            *filename);
 
60
void             gnome_bg_set_placement         (GnomeBG               *bg,
 
61
                                                 GDesktopBackgroundStyle placement);
 
62
void             gnome_bg_set_color             (GnomeBG               *bg,
 
63
                                                 GDesktopBackgroundShading type,
 
64
                                                 GdkColor              *primary,
 
65
                                                 GdkColor              *secondary);
 
66
 
 
67
/* Getters */
 
68
GDesktopBackgroundStyle gnome_bg_get_placement  (GnomeBG               *bg);
 
69
void             gnome_bg_get_color             (GnomeBG               *bg,
 
70
                                                 GDesktopBackgroundShading *type,
 
71
                                                 GdkColor              *primary,
 
72
                                                 GdkColor              *secondary);
 
73
const gchar *    gnome_bg_get_filename          (GnomeBG               *bg);
 
74
 
 
75
/* Drawing and thumbnailing */
 
76
void             gnome_bg_draw                  (GnomeBG               *bg,
 
77
                                                 GdkPixbuf             *dest,
 
78
                                                 GdkScreen             *screen,
 
79
                                                 gboolean               is_root);
 
80
cairo_surface_t *gnome_bg_create_surface        (GnomeBG               *bg,
 
81
                                                 GdkWindow             *window,
 
82
                                                 int                    width,
 
83
                                                 int                    height,
 
84
                                                 gboolean               root);
 
85
gboolean         gnome_bg_get_image_size        (GnomeBG               *bg,
 
86
                                                 GnomeDesktopThumbnailFactory *factory,
 
87
                                                 int                    best_width,
 
88
                                                 int                    best_height,
 
89
                                                 int                   *width,
 
90
                                                 int                   *height);
 
91
GdkPixbuf *      gnome_bg_create_thumbnail      (GnomeBG               *bg,
 
92
                                                 GnomeDesktopThumbnailFactory *factory,
 
93
                                                 GdkScreen             *screen,
 
94
                                                 int                    dest_width,
 
95
                                                 int                    dest_height);
 
96
gboolean         gnome_bg_is_dark               (GnomeBG               *bg,
 
97
                                                 int                    dest_width,
 
98
                                                 int                    dest_height);
 
99
gboolean         gnome_bg_has_multiple_sizes    (GnomeBG               *bg);
 
100
gboolean         gnome_bg_changes_with_time     (GnomeBG               *bg);
 
101
GdkPixbuf *      gnome_bg_create_frame_thumbnail (GnomeBG              *bg,
 
102
                                                 GnomeDesktopThumbnailFactory *factory,
 
103
                                                 GdkScreen             *screen,
 
104
                                                 int                    dest_width,
 
105
                                                 int                    dest_height,
 
106
                                                 int                    frame_num);
 
107
 
 
108
/* Set a surface as root - not a GnomeBG method. At some point
 
109
 * if we decide to stabilize the API then we may want to make
 
110
 * these object methods, drop gnome_bg_create_surface, etc.
 
111
 */
 
112
void             gnome_bg_set_surface_as_root   (GdkScreen             *screen,
 
113
                                                 cairo_surface_t       *surface);
 
114
 
 
115
GnomeBGCrossfade *gnome_bg_set_surface_as_root_with_crossfade (GdkScreen *screen,
 
116
                                                              cairo_surface_t *surface);
 
117
cairo_surface_t *gnome_bg_get_surface_from_root (GdkScreen *screen);
 
118
 
 
119
G_END_DECLS
 
120
 
 
121
#endif