]> Pileus Git - ~andy/gtk/blob - gtk/gtkgrid.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gtk / gtkgrid.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 2010 Red Hat, Inc.
3  * Author: Matthias Clasen
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17  */
18
19 #ifndef __GTK_GRID_H__
20 #define __GTK_GRID_H__
21
22
23 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
24 #error "Only <gtk/gtk.h> can be included directly."
25 #endif
26
27 #include <gtk/gtkcontainer.h>
28
29
30 G_BEGIN_DECLS
31
32 #define GTK_TYPE_GRID                   (gtk_grid_get_type ())
33 #define GTK_GRID(obj)                   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_GRID, GtkGrid))
34 #define GTK_GRID_CLASS(klass)           (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_GRID, GtkGridClass))
35 #define GTK_IS_GRID(obj)                (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_GRID))
36 #define GTK_IS_GRID_CLASS(klass)        (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_GRID))
37 #define GTK_GRID_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_GRID, GtkGridClass))
38
39
40 typedef struct _GtkGrid              GtkGrid;
41 typedef struct _GtkGridPrivate       GtkGridPrivate;
42 typedef struct _GtkGridClass         GtkGridClass;
43
44 struct _GtkGrid
45 {
46   /*< private >*/
47   GtkContainer container;
48
49   GtkGridPrivate *priv;
50 };
51
52 struct _GtkGridClass
53 {
54   GtkContainerClass parent_class;
55
56   void (*_gtk_reserved1) (void);
57   void (*_gtk_reserved2) (void);
58   void (*_gtk_reserved3) (void);
59   void (*_gtk_reserved4) (void);
60   void (*_gtk_reserved5) (void);
61   void (*_gtk_reserved6) (void);
62   void (*_gtk_reserved7) (void);
63   void (*_gtk_reserved8) (void);
64 };
65
66 GType      gtk_grid_get_type               (void) G_GNUC_CONST;
67 GtkWidget* gtk_grid_new                    (void);
68 void       gtk_grid_attach                 (GtkGrid         *grid,
69                                             GtkWidget       *child,
70                                             gint             left,
71                                             gint             top,
72                                             gint             width,
73                                             gint             height);
74 void       gtk_grid_attach_next_to         (GtkGrid         *grid,
75                                             GtkWidget       *child,
76                                             GtkWidget       *sibling,
77                                             GtkPositionType  side,
78                                             gint             width,
79                                             gint             height);
80 GDK_AVAILABLE_IN_3_2
81 GtkWidget *gtk_grid_get_child_at           (GtkGrid         *grid,
82                                             gint             left,
83                                             gint             top);
84 GDK_AVAILABLE_IN_3_2
85 void       gtk_grid_insert_row             (GtkGrid         *grid,
86                                             gint             position);
87 GDK_AVAILABLE_IN_3_2
88 void       gtk_grid_insert_column          (GtkGrid         *grid,
89                                             gint             position);
90 GDK_AVAILABLE_IN_3_2
91 void       gtk_grid_insert_next_to         (GtkGrid         *grid,
92                                             GtkWidget       *sibling,
93                                             GtkPositionType  side);
94 void       gtk_grid_set_row_homogeneous    (GtkGrid         *grid,
95                                             gboolean         homogeneous);
96 gboolean   gtk_grid_get_row_homogeneous    (GtkGrid         *grid);
97 void       gtk_grid_set_row_spacing        (GtkGrid         *grid,
98                                             guint            spacing);
99 guint      gtk_grid_get_row_spacing        (GtkGrid         *grid);
100 void       gtk_grid_set_column_homogeneous (GtkGrid         *grid,
101                                             gboolean         homogeneous);
102 gboolean   gtk_grid_get_column_homogeneous (GtkGrid         *grid);
103 void       gtk_grid_set_column_spacing     (GtkGrid         *grid,
104                                             guint            spacing);
105 guint      gtk_grid_get_column_spacing     (GtkGrid         *grid);
106
107
108 G_END_DECLS
109
110 #endif /* __GTK_GRID_H__ */