| 1 | /* GTK - The GIMP Toolkit |
| 2 | * Copyright (C) 2007-2010 Openismus GmbH |
| 3 | * |
| 4 | * Authors: |
| 5 | * Mathias Hasselmann <mathias@openismus.com> |
| 6 | * Tristan Van Berkom <tristan.van.berkom@gmail.com> |
| 7 | * |
| 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. |
| 12 | * |
| 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. |
| 17 | * |
| 18 | * You should have received a copy of the GNU Library General Public |
| 19 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 20 | */ |
| 21 | |
| 22 | #ifndef __GTK_SIZE_REQUEST_H__ |
| 23 | #define __GTK_SIZE_REQUEST_H__ |
| 24 | |
| 25 | #include <gtk/gtkwidget.h> |
| 26 | |
| 27 | G_BEGIN_DECLS |
| 28 | |
| 29 | typedef struct _GtkRequestedSize GtkRequestedSize; |
| 30 | |
| 31 | /** |
| 32 | * GtkRequestedSize: |
| 33 | * @data: A client pointer |
| 34 | * @minimum_size: The minimum size needed for allocation in a given orientation |
| 35 | * @natural_size: The natural size for allocation in a given orientation |
| 36 | * |
| 37 | * Represents a request of a screen object in a given orientation. These |
| 38 | * are primarily used in container implementations when allocating a natural |
| 39 | * size for children calling. See gtk_distribute_natural_allocation(). |
| 40 | */ |
| 41 | struct _GtkRequestedSize |
| 42 | { |
| 43 | gpointer data; |
| 44 | gint minimum_size; |
| 45 | gint natural_size; |
| 46 | }; |
| 47 | |
| 48 | |
| 49 | /* General convenience function to aid in allocating natural sizes */ |
| 50 | GDK_AVAILABLE_IN_ALL |
| 51 | gint gtk_distribute_natural_allocation (gint , |
| 52 | guint n_requested_sizes, |
| 53 | GtkRequestedSize *sizes); |
| 54 | |
| 55 | |
| 56 | G_END_DECLS |
| 57 | |
| 58 | #endif /* __GTK_SIZE_REQUEST_H__ */ |
| 59 | |