]> Pileus Git - ~andy/gtk/blob - gtk/gtkroundedboxprivate.h
roundedbox: Use GtkCssBorderCornerRadius type
[~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, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __GTK_ROUNDED_BOX_PRIVATE_H__
21 #define __GTK_ROUNDED_BOX_PRIVATE_H__
22
23 #include <glib-object.h>
24 #include <cairo.h>
25 #include <gtk/gtkenums.h>
26 #include <gtk/gtkthemingengine.h>
27
28 #include "gtkcsstypesprivate.h"
29
30 G_BEGIN_DECLS
31
32 typedef struct _GtkRoundedBox GtkRoundedBox;
33
34 struct _GtkRoundedBox {
35   /*< private >*/
36   cairo_rectangle_t        box;
37   GtkCssBorderCornerRadius top_left;
38   GtkCssBorderCornerRadius top_right;
39   GtkCssBorderCornerRadius bottom_right;
40   GtkCssBorderCornerRadius bottom_left;
41 };
42
43 void            _gtk_rounded_box_init_rect                      (GtkRoundedBox       *box,
44                                                                  double               x,
45                                                                  double               y,
46                                                                  double               width,
47                                                                  double               height);
48
49 void            _gtk_rounded_box_apply_border_radius            (GtkRoundedBox       *box,
50                                                                  GtkThemingEngine    *engine,
51                                                                  GtkStateFlags        state,
52                                                                  GtkJunctionSides     junction);
53 void            _gtk_rounded_box_shrink                         (GtkRoundedBox       *box,
54                                                                  double               top,
55                                                                  double               right,
56                                                                  double               bottom,
57                                                                  double               left);
58 void            _gtk_rounded_box_move                           (GtkRoundedBox       *box,
59                                                                  double               dx,
60                                                                  double               dy);
61
62 void            _gtk_rounded_box_path                           (const GtkRoundedBox *box,
63                                                                  cairo_t             *cr);
64 void            _gtk_rounded_box_path_top                       (const GtkRoundedBox *outer,
65                                                                  const GtkRoundedBox *inner,
66                                                                  cairo_t             *cr);
67 void            _gtk_rounded_box_path_right                     (const GtkRoundedBox *outer,
68                                                                  const GtkRoundedBox *inner,
69                                                                  cairo_t             *cr);
70 void            _gtk_rounded_box_path_bottom                    (const GtkRoundedBox *outer,
71                                                                  const GtkRoundedBox *inner,
72                                                                  cairo_t             *cr);
73 void            _gtk_rounded_box_path_left                      (const GtkRoundedBox *outer,
74                                                                  const GtkRoundedBox *inner,
75                                                                  cairo_t             *cr);
76 void            _gtk_rounded_box_clip_path                      (const GtkRoundedBox *box,
77                                                                  cairo_t             *cr);
78
79 G_END_DECLS
80
81 #endif /* __GTK_ROUNDED_BOX_PRIVATE_H__ */