Ardour  9.0-pre0-582-g084a23a80d
gtkcontainer.h
Go to the documentation of this file.
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 Lesser 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  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser 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 
20 /*
21  * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22  * file for a list of people on the GTK+ Team. See the ChangeLog
23  * files for a list of changes. These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25  */
26 
27 #ifndef __GTK_CONTAINER_H__
28 #define __GTK_CONTAINER_H__
29 
30 
31 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
32 #error "Only <gtk/gtk.h> can be included directly."
33 #endif
34 
35 #include <gtk/gtkwidget.h>
36 #include <gtk/gtkadjustment.h>
37 
38 
39 G_BEGIN_DECLS
40 
41 #define GTK_TYPE_CONTAINER (gtk_container_get_type ())
42 #define GTK_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CONTAINER, GtkContainer))
43 #define GTK_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CONTAINER, GtkContainerClass))
44 #define GTK_IS_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CONTAINER))
45 #define GTK_IS_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CONTAINER))
46 #define GTK_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CONTAINER, GtkContainerClass))
47 
48 #define GTK_IS_RESIZE_CONTAINER(widget) (GTK_IS_CONTAINER (widget) && ((GtkContainer*) (widget))->resize_mode != GTK_RESIZE_PARENT)
49 
50 
51 typedef struct _GtkContainer GtkContainer;
53 
55 {
57 
58  GtkWidget *GSEAL (focus_child);
59 
60  guint GSEAL (border_width) : 16;
61 
62  /*< private >*/
63  guint GSEAL (need_resize) : 1;
64  guint GSEAL (resize_mode) : 2;
65  guint GSEAL (reallocate_redraws) : 1;
66  guint GSEAL (has_focus_chain) : 1;
67 };
68 
70 {
72 
73  void (*add) (GtkContainer *container,
74  GtkWidget *widget);
75  void (*remove) (GtkContainer *container,
76  GtkWidget *widget);
77  void (*check_resize) (GtkContainer *container);
78  void (*forall) (GtkContainer *container,
79  gboolean include_internals,
80  GtkCallback callback,
81  gpointer callback_data);
82  void (*set_focus_child) (GtkContainer *container,
83  GtkWidget *widget);
84  GType (*child_type) (GtkContainer *container);
85  gchar* (*composite_name) (GtkContainer *container,
86  GtkWidget *child);
87  void (*set_child_property) (GtkContainer *container,
88  GtkWidget *child,
89  guint property_id,
90  const GValue *value,
91  GParamSpec *pspec);
92  void (*get_child_property) (GtkContainer *container,
93  GtkWidget *child,
94  guint property_id,
95  GValue *value,
96  GParamSpec *pspec);
97 
98  /* Padding for future expansion */
99  void (*_gtk_reserved1) (void);
100  void (*_gtk_reserved2) (void);
101  void (*_gtk_reserved3) (void);
102  void (*_gtk_reserved4) (void);
103 };
104 
105 /* Application-level methods */
106 
107 GType gtk_container_get_type (void) G_GNUC_CONST;
109  guint border_width);
112  GtkWidget *widget);
114  GtkWidget *widget);
115 
117  GtkResizeMode resize_mode);
119 
121 
123  GtkCallback callback,
124  gpointer callback_data);
125 #ifndef GTK_DISABLE_DEPRECATED
127  GtkCallback callback,
128  GtkCallbackMarshal marshal,
129  gpointer callback_data,
130  GDestroyNotify notify);
131 #endif
132 
134 
135 #ifndef GTK_DISABLE_DEPRECATED
136 #define gtk_container_children gtk_container_get_children
137 #endif
138 
140  GtkWidget *child,
141  GdkEventExpose *event);
142 
144  GList *focusable_widgets);
146  GList **focusable_widgets);
148 
149 /* Widget-level methods */
150 
152  gboolean needs_redraws);
154  GtkWidget *child);
155 GtkWidget *
158  GtkAdjustment *adjustment);
161  GtkAdjustment *adjustment);
163 
165 
167 
168 
170  guint property_id,
171  GParamSpec *pspec);
172 GParamSpec* gtk_container_class_find_child_property (GObjectClass *cclass,
173  const gchar *property_name);
174 GParamSpec** gtk_container_class_list_child_properties (GObjectClass *cclass,
175  guint *n_properties);
177  GtkWidget *widget,
178  const gchar *first_prop_name,
179  ...) G_GNUC_NULL_TERMINATED;
181  GtkWidget *child,
182  const gchar *first_prop_name,
183  ...) G_GNUC_NULL_TERMINATED;
185  GtkWidget *child,
186  const gchar *first_prop_name,
187  ...) G_GNUC_NULL_TERMINATED;
189  GtkWidget *child,
190  const gchar *first_property_name,
191  va_list var_args);
193  GtkWidget *child,
194  const gchar *first_property_name,
195  va_list var_args);
197  GtkWidget *child,
198  const gchar *property_name,
199  const GValue *value);
201  GtkWidget *child,
202  const gchar *property_name,
203  GValue *value);
204 
205 #define GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID(object, property_id, pspec) \
206  G_OBJECT_WARN_INVALID_PSPEC ((object), "child property id", (property_id), (pspec))
207 
208 
210  GtkCallback callback,
211  gpointer callback_data);
212 
213 /* Non-public methods */
217  GtkWidget *child);
220  GList *children,
221  GtkDirectionType direction,
222  GtkWidget *old_focus);
223 
224 #ifndef GTK_DISABLE_DEPRECATED
225 #define gtk_container_border_width gtk_container_set_border_width
226 #endif /* GTK_DISABLE_DEPRECATED */
227 
228 G_END_DECLS
229 
230 #endif /* __GTK_CONTAINER_H__ */
void gtk_container_child_get(GtkContainer *container, GtkWidget *child, const gchar *first_prop_name,...) G_GNUC_NULL_TERMINATED
void gtk_container_child_set(GtkContainer *container, GtkWidget *child, const gchar *first_prop_name,...) G_GNUC_NULL_TERMINATED
GParamSpec * gtk_container_class_find_child_property(GObjectClass *cclass, const gchar *property_name)
gboolean gtk_container_get_focus_chain(GtkContainer *container, GList **focusable_widgets)
void gtk_container_add_with_properties(GtkContainer *container, GtkWidget *widget, const gchar *first_prop_name,...) G_GNUC_NULL_TERMINATED
void gtk_container_check_resize(GtkContainer *container)
void gtk_container_forall(GtkContainer *container, GtkCallback callback, gpointer callback_data)
GType gtk_container_get_type(void) G_GNUC_CONST
GtkAdjustment * gtk_container_get_focus_hadjustment(GtkContainer *container)
guint gtk_container_get_border_width(GtkContainer *container)
void gtk_container_set_focus_child(GtkContainer *container, GtkWidget *child)
void gtk_container_set_focus_chain(GtkContainer *container, GList *focusable_widgets)
GList * _gtk_container_focus_sort(GtkContainer *container, GList *children, GtkDirectionType direction, GtkWidget *old_focus)
void gtk_container_class_install_child_property(GtkContainerClass *cclass, guint property_id, GParamSpec *pspec)
void _gtk_container_queue_resize(GtkContainer *container)
void gtk_container_child_get_valist(GtkContainer *container, GtkWidget *child, const gchar *first_property_name, va_list var_args)
void gtk_container_resize_children(GtkContainer *container)
void _gtk_container_clear_resize_widgets(GtkContainer *container)
void gtk_container_foreach(GtkContainer *container, GtkCallback callback, gpointer callback_data)
GtkAdjustment * gtk_container_get_focus_vadjustment(GtkContainer *container)
void gtk_container_set_focus_vadjustment(GtkContainer *container, GtkAdjustment *adjustment)
void gtk_container_unset_focus_chain(GtkContainer *container)
void gtk_container_child_get_property(GtkContainer *container, GtkWidget *child, const gchar *property_name, GValue *value)
GType gtk_container_child_type(GtkContainer *container)
void gtk_container_set_focus_hadjustment(GtkContainer *container, GtkAdjustment *adjustment)
void _gtk_container_dequeue_resize_handler(GtkContainer *container)
void gtk_container_set_border_width(GtkContainer *container, guint border_width)
void gtk_container_propagate_expose(GtkContainer *container, GtkWidget *child, GdkEventExpose *event)
GParamSpec ** gtk_container_class_list_child_properties(GObjectClass *cclass, guint *n_properties)
gchar * _gtk_container_child_composite_name(GtkContainer *container, GtkWidget *child)
GtkWidget * gtk_container_get_focus_child(GtkContainer *container)
GList * gtk_container_get_children(GtkContainer *container)
void gtk_container_child_set_property(GtkContainer *container, GtkWidget *child, const gchar *property_name, const GValue *value)
void gtk_container_remove(GtkContainer *container, GtkWidget *widget)
void gtk_container_foreach_full(GtkContainer *container, GtkCallback callback, GtkCallbackMarshal marshal, gpointer callback_data, GDestroyNotify notify)
void gtk_container_child_set_valist(GtkContainer *container, GtkWidget *child, const gchar *first_property_name, va_list var_args)
void gtk_container_add(GtkContainer *container, GtkWidget *widget)
GtkResizeMode gtk_container_get_resize_mode(GtkContainer *container)
void gtk_container_set_reallocate_redraws(GtkContainer *container, gboolean needs_redraws)
void gtk_container_set_resize_mode(GtkContainer *container, GtkResizeMode resize_mode)
GtkResizeMode
Definition: gtkenums.h:338
GtkDirectionType
Definition: gtkenums.h:123
void(* GtkCallbackMarshal)(GtkObject *object, gpointer data, guint n_args, GtkArg *args)
Definition: gtktypeutils.h:52
void(* GtkCallback)(GtkWidget *widget, gpointer data)
Definition: gtkwidget.h:508
void(* forall)(GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data)
Definition: gtkcontainer.h:78
void(* get_child_property)(GtkContainer *container, GtkWidget *child, guint property_id, GValue *value, GParamSpec *pspec)
Definition: gtkcontainer.h:92
void(* _gtk_reserved2)(void)
Definition: gtkcontainer.h:100
void(* _gtk_reserved4)(void)
Definition: gtkcontainer.h:102
void(* _gtk_reserved1)(void)
Definition: gtkcontainer.h:99
GtkWidgetClass parent_class
Definition: gtkcontainer.h:71
void(* remove)(GtkContainer *container, GtkWidget *widget)
Definition: gtkcontainer.h:75
void(* add)(GtkContainer *container, GtkWidget *widget)
Definition: gtkcontainer.h:73
void(* _gtk_reserved3)(void)
Definition: gtkcontainer.h:101
void(* check_resize)(GtkContainer *container)
Definition: gtkcontainer.h:77
void(* set_focus_child)(GtkContainer *container, GtkWidget *widget)
Definition: gtkcontainer.h:82
GType(* child_type)(GtkContainer *container)
Definition: gtkcontainer.h:84
void(* set_child_property)(GtkContainer *container, GtkWidget *child, guint property_id, const GValue *value, GParamSpec *pspec)
Definition: gtkcontainer.h:87
GtkWidget * GSEAL(focus_child)
GtkWidget widget
Definition: gtkcontainer.h:56