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

source code of gtk/gtk/gtkgrid.h