]> Pileus Git - ~andy/gtk/blob - gtk/gtkroundedboxprivate.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gtk / gtkroundedboxprivate.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 2011 Benjamin Otte <otte@gnome.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 #ifndef __GTK_ROUNDED_BOX_PRIVATE_H__
19 #define __GTK_ROUNDED_BOX_PRIVATE_H__
20
21 #include <glib-object.h>
22 #include <cairo.h>
23 #include <gtk/gtkenums.h>
24 #include <gtk/gtkthemingengine.h>
25
26 #include "gtkcsstypesprivate.h"
27
28 G_BEGIN_DECLS
29
30 typedef struct _GtkRoundedBox GtkRoundedBox;
31 typedef struct _GtkRoundedBoxCorner GtkRoundedBoxCorner;
32
33 struct _GtkRoundedBoxCorner {
34   double                   horizontal;
35   double                   vertical;
36 };
37
38 struct _GtkRoundedBox {
39   /*< private >*/
40   cairo_rectangle_t        box;
41   GtkRoundedBoxCorner      corner[4];
42 };
43
44 void            _gtk_rounded_box_init_rect                      (GtkRoundedBox       *box,
45                                                                  double               x,
46                                                                  double               y,
47                                                                  double               width,
48                                                                  double               height);
49
50 void            _gtk_rounded_box_apply_border_radius_for_engine (GtkRoundedBox       *box,
51                                                                  GtkThemingEngine    *engine,
52                                                                  GtkJunctionSides     junction);
53 void            _gtk_rounded_box_apply_border_radius_for_context (GtkRoundedBox    *box,
54                                                                   GtkStyleContext  *context,
55                                                                   GtkJunctionSides  junction);
56
57 void            _gtk_rounded_box_grow                           (GtkRoundedBox       *box,
58                                                                  double               top,
59                                                                  double               right,
60                                                                  double               bottom,
61                                                                  double               left);
62 void            _gtk_rounded_box_shrink                         (GtkRoundedBox       *box,
63                                                                  double               top,
64                                                                  double               right,
65                                                                  double               bottom,
66                                                                  double               left);
67 void            _gtk_rounded_box_move                           (GtkRoundedBox       *box,
68                                                                  double               dx,
69                                                                  double               dy);
70
71 double          _gtk_rounded_box_guess_length                   (const GtkRoundedBox *box,
72                                                                  GtkCssSide           side);
73
74 void            _gtk_rounded_box_path                           (const GtkRoundedBox *box,
75                                                                  cairo_t             *cr);
76 void            _gtk_rounded_box_path_side                      (const GtkRoundedBox *box,
77                                                                  cairo_t             *cr,
78                                                                  GtkCssSide           side);
79 void            _gtk_rounded_box_path_top                       (const GtkRoundedBox *outer,
80                                                                  const GtkRoundedBox *inner,
81                                                                  cairo_t             *cr);
82 void            _gtk_rounded_box_path_right                     (const GtkRoundedBox *outer,
83                                                                  const GtkRoundedBox *inner,
84                                                                  cairo_t             *cr);
85 void            _gtk_rounded_box_path_bottom                    (const GtkRoundedBox *outer,
86                                                                  const GtkRoundedBox *inner,
87                                                                  cairo_t             *cr);
88 void            _gtk_rounded_box_path_left                      (const GtkRoundedBox *outer,
89                                                                  const GtkRoundedBox *inner,
90                                                                  cairo_t             *cr);
91 void            _gtk_rounded_box_clip_path                      (const GtkRoundedBox *box,
92                                                                  cairo_t             *cr);
93
94 G_END_DECLS
95
96 #endif /* __GTK_ROUNDED_BOX_PRIVATE_H__ */