1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library 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.
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 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library 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.
19 #ifndef __GTK_CONTAINER_H__
20 #define __GTK_CONTAINER_H__
24 #include <gtk/gtkenums.h>
25 #include <gtk/gtkwidget.h>
26 #include <gtk/gtkadjustment.h>
32 #endif /* __cplusplus */
35 #define GTK_TYPE_CONTAINER (gtk_container_get_type ())
36 #define GTK_CONTAINER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CONTAINER, GtkContainer))
37 #define GTK_CONTAINER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CONTAINER, GtkContainerClass))
38 #define GTK_IS_CONTAINER(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CONTAINER))
39 #define GTK_IS_CONTAINER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CONTAINER))
42 typedef struct _GtkContainer GtkContainer;
43 typedef struct _GtkContainerClass GtkContainerClass;
49 GtkWidget *focus_child;
52 guint auto_resize : 1;
53 guint need_resize : 1;
54 guint block_resize : 1;
57 /* The list of children that requested a resize
59 GSList *resize_widgets;
62 struct _GtkContainerClass
64 GtkWidgetClass parent_class;
66 void (* add) (GtkContainer *container,
68 void (* remove) (GtkContainer *container,
70 gint (* need_resize) (GtkContainer *container);
71 void (* foreach) (GtkContainer *container,
73 gpointer callbabck_data);
74 gint (* focus) (GtkContainer *container,
75 GtkDirectionType direction);
76 void (* set_focus_child) (GtkContainer *container,
82 GtkType gtk_container_get_type (void);
83 void gtk_container_border_width (GtkContainer *container,
85 void gtk_container_add (GtkContainer *container,
87 void gtk_container_remove (GtkContainer *container,
89 void gtk_container_disable_resize (GtkContainer *container);
90 void gtk_container_enable_resize (GtkContainer *container);
91 void gtk_container_block_resize (GtkContainer *container);
92 void gtk_container_unblock_resize (GtkContainer *container);
93 gint gtk_container_need_resize (GtkContainer *container);
94 void gtk_container_foreach (GtkContainer *container,
96 gpointer callback_data);
97 void gtk_container_foreach_interp (GtkContainer *container,
98 GtkCallbackMarshal marshal,
99 gpointer callback_data,
100 GtkDestroyNotify notify);
101 void gtk_container_foreach_full (GtkContainer *container,
102 GtkCallback callback,
103 GtkCallbackMarshal marshal,
104 gpointer callback_data,
105 GtkDestroyNotify notify);
106 GList* gtk_container_children (GtkContainer *container);
107 void gtk_container_register_toplevel (GtkContainer *container);
108 void gtk_container_unregister_toplevel (GtkContainer *container);
109 gint gtk_container_focus (GtkContainer *container,
110 GtkDirectionType direction);
111 void gtk_container_set_focus_child (GtkContainer *container,
113 void gtk_container_set_focus_vadjustment (GtkContainer *container,
114 GtkAdjustment *adjustment);
115 void gtk_container_set_focus_hadjustment (GtkContainer *container,
116 GtkAdjustment *adjustment);
125 #endif /* __cplusplus */
128 #endif /* __GTK_CONTAINER_H__ */