~elementary-os/elementaryos/os-patch-mutter-bionic

« back to all changes in this revision

Viewing changes to src/meta/meta-background.h

  • Committer: RabbitBot
  • Date: 2018-04-11 14:49:36 UTC
  • Revision ID: rabbitbot@elementary.io-20180411144936-hgymqa9d8d1xfpbh
Initial import, version 3.28.0-2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 
2
/*
 
3
 * meta-background-actor.h:  for painting the root window background
 
4
 *
 
5
 * Copyright 2010 Red Hat, Inc.
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or
 
8
 * modify it under the terms of the GNU 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
 * This program is distributed in the hope that it will be useful, but
 
13
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
 * General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public License
 
18
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
 
19
 */
 
20
 
 
21
#ifndef META_BACKGROUND_H
 
22
#define META_BACKGROUND_H
 
23
 
 
24
#include <clutter/clutter.h>
 
25
#include <gsettings-desktop-schemas/gdesktop-enums.h>
 
26
#include <meta/screen.h>
 
27
 
 
28
/**
 
29
 * MetaBackground:
 
30
 *
 
31
 * This class handles tracking and painting the root window background.
 
32
 * By integrating with #MetaWindowGroup we can avoid painting parts of
 
33
 * the background that are obscured by other windows.
 
34
 */
 
35
 
 
36
#define META_TYPE_BACKGROUND            (meta_background_get_type ())
 
37
#define META_BACKGROUND(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_BACKGROUND, MetaBackground))
 
38
#define META_BACKGROUND_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_BACKGROUND, MetaBackgroundClass))
 
39
#define META_IS_BACKGROUND(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_BACKGROUND))
 
40
#define META_IS_BACKGROUND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_BACKGROUND))
 
41
#define META_BACKGROUND_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_BACKGROUND, MetaBackgroundClass))
 
42
 
 
43
typedef struct _MetaBackground        MetaBackground;
 
44
typedef struct _MetaBackgroundClass   MetaBackgroundClass;
 
45
typedef struct _MetaBackgroundPrivate MetaBackgroundPrivate;
 
46
 
 
47
struct _MetaBackgroundClass
 
48
{
 
49
  /*< private >*/
 
50
  GObjectClass parent_class;
 
51
};
 
52
 
 
53
struct _MetaBackground
 
54
{
 
55
  GObject parent;
 
56
 
 
57
  MetaBackgroundPrivate *priv;
 
58
};
 
59
 
 
60
void meta_background_refresh_all (void);
 
61
 
 
62
GType meta_background_get_type (void);
 
63
 
 
64
MetaBackground *meta_background_new  (MetaScreen *screen);
 
65
 
 
66
void meta_background_set_color    (MetaBackground            *self,
 
67
                                   ClutterColor              *color);
 
68
void meta_background_set_gradient (MetaBackground            *self,
 
69
                                   GDesktopBackgroundShading  shading_direction,
 
70
                                   ClutterColor              *color,
 
71
                                   ClutterColor              *second_color);
 
72
void meta_background_set_file     (MetaBackground            *self,
 
73
                                   GFile                     *file,
 
74
                                   GDesktopBackgroundStyle    style);
 
75
void meta_background_set_blend    (MetaBackground            *self,
 
76
                                   GFile                     *file1,
 
77
                                   GFile                     *file2,
 
78
                                   double                     blend_factor,
 
79
                                   GDesktopBackgroundStyle    style);
 
80
 
 
81
#endif /* META_BACKGROUND_H */