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
30G_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
40typedef struct _GtkGrid GtkGrid;
41typedef struct _GtkGridPrivate GtkGridPrivate;
42typedef struct _GtkGridClass GtkGridClass;
43
44struct _GtkGrid
45{
46 /*< private >*/
47 GtkContainer container;
48
49 GtkGridPrivate *priv;
50};
51
52/**
53 * GtkGridClass:
54 * @parent_class: The parent class.
55 */
56struct _GtkGridClass
57{
58 GtkContainerClass parent_class;
59
60 /*< private >*/
61
62 void (*_gtk_reserved1) (void);
63 void (*_gtk_reserved2) (void);
64 void (*_gtk_reserved3) (void);
65 void (*_gtk_reserved4) (void);
66 void (*_gtk_reserved5) (void);
67 void (*_gtk_reserved6) (void);
68 void (*_gtk_reserved7) (void);
69 void (*_gtk_reserved8) (void);
70};
71
72GDK_AVAILABLE_IN_ALL
73GType gtk_grid_get_type (void) G_GNUC_CONST;
74GDK_AVAILABLE_IN_ALL
75GtkWidget* gtk_grid_new (void);
76GDK_AVAILABLE_IN_ALL
77void gtk_grid_attach (GtkGrid *grid,
78 GtkWidget *child,
79 gint left,
80 gint top,
81 gint width,
82 gint height);
83GDK_AVAILABLE_IN_ALL
84void gtk_grid_attach_next_to (GtkGrid *grid,
85 GtkWidget *child,
86 GtkWidget *sibling,
87 GtkPositionType side,
88 gint width,
89 gint height);
90GDK_AVAILABLE_IN_3_2
91GtkWidget *gtk_grid_get_child_at (GtkGrid *grid,
92 gint left,
93 gint top);
94GDK_AVAILABLE_IN_3_2
95void gtk_grid_insert_row (GtkGrid *grid,
96 gint position);
97GDK_AVAILABLE_IN_3_2
98void gtk_grid_insert_column (GtkGrid *grid,
99 gint position);
100GDK_AVAILABLE_IN_3_10
101void gtk_grid_remove_row (GtkGrid *grid,
102 gint position);
103GDK_AVAILABLE_IN_3_10
104void gtk_grid_remove_column (GtkGrid *grid,
105 gint position);
106GDK_AVAILABLE_IN_3_2
107void gtk_grid_insert_next_to (GtkGrid *grid,
108 GtkWidget *sibling,
109 GtkPositionType side);
110GDK_AVAILABLE_IN_ALL
111void gtk_grid_set_row_homogeneous (GtkGrid *grid,
112 gboolean homogeneous);
113GDK_AVAILABLE_IN_ALL
114gboolean gtk_grid_get_row_homogeneous (GtkGrid *grid);
115GDK_AVAILABLE_IN_ALL
116void gtk_grid_set_row_spacing (GtkGrid *grid,
117 guint spacing);
118GDK_AVAILABLE_IN_ALL
119guint gtk_grid_get_row_spacing (GtkGrid *grid);
120GDK_AVAILABLE_IN_ALL
121void gtk_grid_set_column_homogeneous (GtkGrid *grid,
122 gboolean homogeneous);
123GDK_AVAILABLE_IN_ALL
124gboolean gtk_grid_get_column_homogeneous (GtkGrid *grid);
125GDK_AVAILABLE_IN_ALL
126void gtk_grid_set_column_spacing (GtkGrid *grid,
127 guint spacing);
128GDK_AVAILABLE_IN_ALL
129guint gtk_grid_get_column_spacing (GtkGrid *grid);
130GDK_AVAILABLE_IN_3_10
131void gtk_grid_set_row_baseline_position (GtkGrid *grid,
132 gint row,
133 GtkBaselinePosition pos);
134GDK_AVAILABLE_IN_3_10
135GtkBaselinePosition gtk_grid_get_row_baseline_position (GtkGrid *grid,
136 gint row);
137GDK_AVAILABLE_IN_3_10
138void gtk_grid_set_baseline_row (GtkGrid *grid,
139 gint row);
140GDK_AVAILABLE_IN_3_10
141gint gtk_grid_get_baseline_row (GtkGrid *grid);
142
143
144G_END_DECLS
145
146#endif /* __GTK_GRID_H__ */
147

source code of include/gtk-3.0/gtk/gtkgrid.h