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