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 Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 #ifndef __GTK_CONTAINER_H__
19 #define __GTK_CONTAINER_H__
23 #include <gtk/gtkenums.h>
24 #include <gtk/gtkwidget.h>
29 #endif /* __cplusplus */
32 #define GTK_CONTAINER(obj) GTK_CHECK_CAST (obj, gtk_container_get_type (), GtkContainer)
33 #define GTK_CONTAINER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_container_get_type, GtkContainerClass)
34 #define GTK_IS_CONTAINER(obj) GTK_CHECK_TYPE (obj, gtk_container_get_type ())
36 #define GTK_TYPE_CONTAINER (gtk_container_get_type ())
38 typedef struct _GtkContainer GtkContainer;
39 typedef struct _GtkContainerClass GtkContainerClass;
45 GtkWidget *focus_child;
48 guint auto_resize : 1;
49 guint need_resize : 1;
50 guint block_resize : 1;
53 /* The list of children that requested a resize
55 GSList *resize_widgets;
58 struct _GtkContainerClass
60 GtkWidgetClass parent_class;
62 void (* add) (GtkContainer *container,
64 void (* remove) (GtkContainer *container,
66 gint (* need_resize) (GtkContainer *container);
67 void (* foreach) (GtkContainer *container,
69 gpointer callbabck_data);
70 gint (* focus) (GtkContainer *container,
71 GtkDirectionType direction);
76 guint gtk_container_get_type (void);
77 void gtk_container_border_width (GtkContainer *container,
79 void gtk_container_add (GtkContainer *container,
81 void gtk_container_remove (GtkContainer *container,
83 void gtk_container_disable_resize (GtkContainer *container);
84 void gtk_container_enable_resize (GtkContainer *container);
85 void gtk_container_block_resize (GtkContainer *container);
86 void gtk_container_unblock_resize (GtkContainer *container);
87 gint gtk_container_need_resize (GtkContainer *container);
88 void gtk_container_foreach (GtkContainer *container,
90 gpointer callback_data);
91 void gtk_container_foreach_interp (GtkContainer *container,
92 GtkCallbackMarshal marshal,
93 gpointer callback_data,
94 GtkDestroyNotify notify);
95 void gtk_container_foreach_full (GtkContainer *container,
97 GtkCallbackMarshal marshal,
98 gpointer callback_data,
99 GtkDestroyNotify notify);
100 gint gtk_container_focus (GtkContainer *container,
101 GtkDirectionType direction);
102 GList* gtk_container_children (GtkContainer *container);
104 void gtk_container_register_toplevel (GtkContainer *container);
105 void gtk_container_unregister_toplevel (GtkContainer *container);
110 #endif /* __cplusplus */
113 #endif /* __GTK_CONTAINER_H__ */