]> Pileus Git - ~andy/gtk/blob - gtk/gtkcontainer.h
new functions gtk_selection_data_copy and gtk_selection_data_free.
[~andy/gtk] / gtk / gtkcontainer.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
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.
8  *
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.
13  *
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.
18  */
19 #ifndef __GTK_CONTAINER_H__
20 #define __GTK_CONTAINER_H__
21
22
23 #include <gdk/gdk.h>
24 #include <gtk/gtkenums.h>
25 #include <gtk/gtkwidget.h>
26 #include <gtk/gtkadjustment.h>
27
28
29 #ifdef __cplusplus
30 extern "C" {
31 #pragma }
32 #endif /* __cplusplus */
33
34
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))
40
41
42 typedef struct _GtkContainer       GtkContainer;
43 typedef struct _GtkContainerClass  GtkContainerClass;
44
45 struct _GtkContainer
46 {
47   GtkWidget widget;
48   
49   GtkWidget *focus_child;
50   
51   gint16 border_width;
52   guint auto_resize : 1;
53   guint need_resize : 1;
54   guint block_resize : 1;
55   
56   
57   /* The list of children that requested a resize
58    */
59   GSList *resize_widgets;
60 };
61
62 struct _GtkContainerClass
63 {
64   GtkWidgetClass parent_class;
65   
66   void (* add)                  (GtkContainer    *container,
67                                  GtkWidget       *widget);
68   void (* remove)               (GtkContainer    *container,
69                                  GtkWidget       *widget);
70   gint (* need_resize)          (GtkContainer    *container);
71   void (* foreach)              (GtkContainer    *container,
72                                  GtkCallback      callback,
73                                  gpointer         callbabck_data);
74   gint (* focus)                (GtkContainer    *container,
75                                  GtkDirectionType  direction);
76   void (* set_focus_child)      (GtkContainer    *container,
77                                  GtkWidget       *widget);
78 };
79
80
81
82 GtkType gtk_container_get_type           (void);
83 void    gtk_container_border_width       (GtkContainer     *container,
84                                           gint              border_width);
85 void    gtk_container_add                (GtkContainer     *container,
86                                           GtkWidget        *widget);
87 void    gtk_container_remove             (GtkContainer     *container,
88                                           GtkWidget        *widget);
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,
95                                           GtkCallback       callback,
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,
112                                             GtkWidget        *child);
113 void   gtk_container_set_focus_vadjustment (GtkContainer     *container,
114                                             GtkAdjustment    *adjustment);
115 void   gtk_container_set_focus_hadjustment (GtkContainer     *container,
116                                             GtkAdjustment    *adjustment);
117    
118
119
120
121
122
123 #ifdef __cplusplus
124 }
125 #endif /* __cplusplus */
126
127
128 #endif /* __GTK_CONTAINER_H__ */