1 /*
2  * Copyright (C) 2003 Red Hat, Inc.
3  *
4  * This is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Library General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this program; if not, write to the Free Software
16  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  */
18 
19 #ifndef vte_vtebg_included
20 #define vte_vtebg_included
21 
22 #include <gtk/gtk.h>
23 
24 G_BEGIN_DECLS
25 
26 #define VTE_TYPE_BG            (vte_bg_get_type())
27 #define VTE_BG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), VTE_TYPE_BG, VteBg))
28 #define VTE_BG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  VTE_TYPE_BG, VteBgClass))
29 #define VTE_IS_BG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VTE_TYPE_BG))
30 #define VTE_IS_BG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  VTE_TYPE_BG))
31 #define VTE_BG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  VTE_TYPE_BG, VteBgClass))
32 
33 typedef struct _VteBg         VteBg;
34 typedef struct _VteBgPrivate  VteBgPrivate;
35 typedef struct _VteBgClass    VteBgClass;
36 
37 struct _VteBg {
38 	GObject parent;
39 
40         /*< private >*/
41 	VteBgPrivate *pvt;
42 };
43 
44 struct _VteBgClass {
45 	GObjectClass parent_class;
46 };
47 
48 GType vte_bg_get_type(void);
49 
50 VteBg *vte_bg_get_for_screen(GdkScreen *screen);
51 
52 typedef enum {
53 	VTE_BG_SOURCE_NONE,
54 	VTE_BG_SOURCE_ROOT,
55 	VTE_BG_SOURCE_PIXBUF,
56 	VTE_BG_SOURCE_FILE
57 } VteBgSourceType;
58 
59 cairo_surface_t *
60 vte_bg_get_surface(VteBg *bg,
61 		   VteBgSourceType source_type,
62 		   GdkPixbuf *source_pixbuf,
63 		   const char *source_file,
64 		   const PangoColor *tint,
65 		   double saturation,
66 		   cairo_surface_t *other);
67 
68 G_END_DECLS
69 
70 #endif
71