]> Pileus Git - ~andy/gtk/blob - gtk/gtkthemingbackgroundprivate.h
cssvalue: Add GtkCssShadowsValue
[~andy/gtk] / gtk / gtkthemingbackgroundprivate.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 2011 Red Hat, Inc.
3  * 
4  * Author: Cosimo Cecchi <cosimoc@gnome.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
18  */
19
20 #ifndef __GTK_THEMING_BACKGROUND_PRIVATE_H__
21 #define __GTK_THEMING_BACKGROUND_PRIVATE_H__
22
23 #include <glib-object.h>
24 #include <cairo.h>
25
26 #include "gtkcssimageprivate.h"
27 #include "gtkstylecontextprivate.h"
28 #include "gtkroundedboxprivate.h"
29
30 G_BEGIN_DECLS
31
32 typedef struct _GtkThemingBackground GtkThemingBackground;
33
34 struct _GtkThemingBackground {
35   GtkStyleContext *context;
36
37   cairo_rectangle_t paint_area;
38   cairo_rectangle_t image_rect;
39
40   GtkJunctionSides junction;
41   GtkCssImage *image;
42
43   GtkRoundedBox padding_box;
44   GtkRoundedBox clip_box;
45
46   GtkStateFlags flags;
47   GtkBorder border;
48   GtkBorder padding;
49   GdkRGBA bg_color;
50 };
51
52 void _gtk_theming_background_init (GtkThemingBackground *bg,
53                                    GtkThemingEngine     *engine,
54                                    gdouble               x,
55                                    gdouble               y,
56                                    gdouble               width,
57                                    gdouble               height,
58                                    GtkJunctionSides      junction);
59
60 void _gtk_theming_background_init_from_context (GtkThemingBackground *bg,
61                                                 GtkStyleContext      *context,
62                                                 gdouble               x,
63                                                 gdouble               y,
64                                                 gdouble               width,
65                                                 gdouble               height,
66                                                 GtkJunctionSides      junction);
67
68 void _gtk_theming_background_render (GtkThemingBackground *bg,
69                                      cairo_t              *cr);
70
71 gboolean _gtk_theming_background_has_background_image (GtkThemingBackground *bg);
72
73 G_END_DECLS
74
75 #endif /* __GTK_THEMING_BACKGROUND_PRIVATE_H__ */