]> Pileus Git - ~andy/gtk/blob - gtk/gtkthemingbackgroundprivate.h
stylecontext: Do invalidation on first resize container
[~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   GtkRoundedBox border_box;
39   GtkRoundedBox padding_box;
40   GtkRoundedBox content_box;
41
42   GtkJunctionSides junction;
43   GdkRGBA bg_color;
44 };
45
46 void _gtk_theming_background_init (GtkThemingBackground *bg,
47                                    GtkThemingEngine     *engine,
48                                    gdouble               x,
49                                    gdouble               y,
50                                    gdouble               width,
51                                    gdouble               height,
52                                    GtkJunctionSides      junction);
53
54 void _gtk_theming_background_init_from_context (GtkThemingBackground *bg,
55                                                 GtkStyleContext      *context,
56                                                 gdouble               x,
57                                                 gdouble               y,
58                                                 gdouble               width,
59                                                 gdouble               height,
60                                                 GtkJunctionSides      junction);
61
62 void _gtk_theming_background_render (GtkThemingBackground *bg,
63                                      cairo_t              *cr);
64
65 gboolean _gtk_theming_background_has_background_image (GtkThemingBackground *bg);
66
67 G_END_DECLS
68
69 #endif /* __GTK_THEMING_BACKGROUND_PRIVATE_H__ */