1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 2007-2010 Openismus GmbH
5 * Mathias Hasselmann <mathias@openismus.com>
6 * Tristan Van Berkom <tristan.van.berkom@gmail.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 #ifndef __GTK_SIZE_REQUEST_H__
25 #define __GTK_SIZE_REQUEST_H__
27 #include <gtk/gtkwidget.h>
31 #define GTK_TYPE_SIZE_REQUEST (gtk_size_request_get_type ())
32 #define GTK_SIZE_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SIZE_REQUEST, GtkSizeRequest))
33 #define GTK_SIZE_REQUEST_CLASS(klass) ((GtkSizeRequestIface*)g_type_interface_peek ((klass), GTK_TYPE_SIZE_REQUEST))
34 #define GTK_IS_SIZE_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SIZE_REQUEST))
35 #define GTK_SIZE_REQUEST_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_TYPE_SIZE_REQUEST, GtkSizeRequestIface))
37 typedef struct _GtkSizeRequest GtkSizeRequest;
38 typedef struct _GtkSizeRequestIface GtkSizeRequestIface;
41 struct _GtkSizeRequestIface
43 GTypeInterface g_iface;
46 GtkSizeRequestMode (* get_request_mode) (GtkSizeRequest *widget);
48 void (* get_height) (GtkSizeRequest *widget,
50 gint *natural_height);
51 void (* get_width_for_height) (GtkSizeRequest *widget,
55 void (* get_width) (GtkSizeRequest *widget,
58 void (* get_height_for_width) (GtkSizeRequest *widget,
61 gint *natural_height);
64 GType gtk_size_request_get_type (void) G_GNUC_CONST;
66 GtkSizeRequestMode gtk_size_request_get_request_mode (GtkSizeRequest *widget);
67 void gtk_size_request_get_width (GtkSizeRequest *widget,
70 void gtk_size_request_get_height_for_width (GtkSizeRequest *widget,
73 gint *natural_height);
74 void gtk_size_request_get_height (GtkSizeRequest *widget,
76 gint *natural_height);
77 void gtk_size_request_get_width_for_height (GtkSizeRequest *widget,
81 void gtk_size_request_get_size (GtkSizeRequest *widget,
82 GtkRequisition *minimum_size,
83 GtkRequisition *natural_size);
87 #endif /* __GTK_SIZE_REQUEST_H__ */