1 /* gnome-bg-crossfade.h - fade window background between two surfaces
2 
3    Copyright 2008, 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: Ray Strode <rstrode@redhat.com>
23 */
24 
25 #ifndef __GNOME_BG_CROSSFADE_H__
26 #define __GNOME_BG_CROSSFADE_H__
27 
28 #ifndef GNOME_DESKTOP_USE_UNSTABLE_API
29 #error    GnomeBGCrossfade is unstable API. You must define GNOME_DESKTOP_USE_UNSTABLE_API before including gnome-bg-crossfade.h
30 #endif
31 
32 #include <gdk/gdk.h>
33 
34 G_BEGIN_DECLS
35 
36 #define GNOME_TYPE_BG_CROSSFADE            (gnome_bg_crossfade_get_type ())
37 #define GNOME_BG_CROSSFADE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_BG_CROSSFADE, GnomeBGCrossfade))
38 #define GNOME_BG_CROSSFADE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GNOME_TYPE_BG_CROSSFADE, GnomeBGCrossfadeClass))
39 #define GNOME_IS_BG_CROSSFADE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_BG_CROSSFADE))
40 #define GNOME_IS_BG_CROSSFADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  GNOME_TYPE_BG_CROSSFADE))
41 #define GNOME_BG_CROSSFADE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  GNOME_TYPE_BG_CROSSFADE, GnomeBGCrossfadeClass))
42 
43 typedef struct _GnomeBGCrossfadePrivate GnomeBGCrossfadePrivate;
44 typedef struct _GnomeBGCrossfade GnomeBGCrossfade;
45 typedef struct _GnomeBGCrossfadeClass GnomeBGCrossfadeClass;
46 
47 struct _GnomeBGCrossfade
48 {
49 	GObject parent_object;
50 
51 	GnomeBGCrossfadePrivate *priv;
52 };
53 
54 struct _GnomeBGCrossfadeClass
55 {
56 	GObjectClass parent_class;
57 
58 	void (* finished) (GnomeBGCrossfade *fade, GdkWindow *window);
59 };
60 
61 GType             gnome_bg_crossfade_get_type              (void);
62 GnomeBGCrossfade *gnome_bg_crossfade_new (int width, int height);
63 gboolean          gnome_bg_crossfade_set_start_surface (GnomeBGCrossfade *fade,
64                                                         cairo_surface_t *surface);
65 gboolean          gnome_bg_crossfade_set_end_surface (GnomeBGCrossfade *fade,
66                                                       cairo_surface_t *surface);
67 void              gnome_bg_crossfade_start (GnomeBGCrossfade *fade,
68                                             GdkWindow        *window);
69 gboolean          gnome_bg_crossfade_is_started (GnomeBGCrossfade *fade);
70 void              gnome_bg_crossfade_stop (GnomeBGCrossfade *fade);
71 
72 G_END_DECLS
73 
74 #endif
75