Blame gtk/gtkbox.h

Packit 98cdb6
/* GTK - The GIMP Toolkit
Packit 98cdb6
 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
Packit 98cdb6
 *
Packit 98cdb6
 * This library is free software; you can redistribute it and/or
Packit 98cdb6
 * modify it under the terms of the GNU Lesser General Public
Packit 98cdb6
 * License as published by the Free Software Foundation; either
Packit 98cdb6
 * version 2 of the License, or (at your option) any later version.
Packit 98cdb6
 *
Packit 98cdb6
 * This library is distributed in the hope that it will be useful,
Packit 98cdb6
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 98cdb6
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
Packit 98cdb6
 * Lesser General Public License for more details.
Packit 98cdb6
 *
Packit 98cdb6
 * You should have received a copy of the GNU Lesser General Public
Packit 98cdb6
 * License along with this library; if not, write to the
Packit 98cdb6
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Packit 98cdb6
 * Boston, MA 02111-1307, USA.
Packit 98cdb6
 */
Packit 98cdb6
Packit 98cdb6
/*
Packit 98cdb6
 * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
Packit 98cdb6
 * file for a list of people on the GTK+ Team.  See the ChangeLog
Packit 98cdb6
 * files for a list of changes.  These files are distributed with
Packit 98cdb6
 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
Packit 98cdb6
 */
Packit 98cdb6
Packit 98cdb6
#ifndef __GTK_BOX_H__
Packit 98cdb6
#define __GTK_BOX_H__
Packit 98cdb6
Packit 98cdb6
Packit 98cdb6
#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
Packit 98cdb6
#error "Only <gtk/gtk.h> can be included directly."
Packit 98cdb6
#endif
Packit 98cdb6
Packit 98cdb6
#include <gtk/gtkcontainer.h>
Packit 98cdb6
Packit 98cdb6
Packit 98cdb6
G_BEGIN_DECLS
Packit 98cdb6
Packit 98cdb6
Packit 98cdb6
#define GTK_TYPE_BOX            (gtk_box_get_type ())
Packit 98cdb6
#define GTK_BOX(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_BOX, GtkBox))
Packit 98cdb6
#define GTK_BOX_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_BOX, GtkBoxClass))
Packit 98cdb6
#define GTK_IS_BOX(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_BOX))
Packit 98cdb6
#define GTK_IS_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BOX))
Packit 98cdb6
#define GTK_BOX_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_BOX, GtkBoxClass))
Packit 98cdb6
Packit 98cdb6
Packit 98cdb6
typedef struct _GtkBox	      GtkBox;
Packit 98cdb6
typedef struct _GtkBoxClass   GtkBoxClass;
Packit 98cdb6
Packit 98cdb6
struct _GtkBox
Packit 98cdb6
{
Packit 98cdb6
  GtkContainer container;
Packit 98cdb6
Packit 98cdb6
  /*< public >*/
Packit 98cdb6
  GList *GSEAL (children);
Packit 98cdb6
  gint16 GSEAL (spacing);
Packit 98cdb6
  guint GSEAL (homogeneous) : 1;
Packit 98cdb6
};
Packit 98cdb6
Packit 98cdb6
struct _GtkBoxClass
Packit 98cdb6
{
Packit 98cdb6
  GtkContainerClass parent_class;
Packit 98cdb6
};
Packit 98cdb6
Packit 98cdb6
/**
Packit 98cdb6
 * GtkBoxChild:
Packit 98cdb6
 * @widget: the child widget, packed into the GtkBox.
Packit 98cdb6
 * @padding: the number of extra pixels to put between this child and its
Packit 98cdb6
 *  neighbors, set when packed, zero by default.
Packit 98cdb6
 * @expand: flag indicates whether extra space should be given to this child.
Packit 98cdb6
 *  Any extra space given to the parent GtkBox is divided up among all children
Packit 98cdb6
 *  with this attribute set to %TRUE; set when packed, %TRUE by default.
Packit 98cdb6
 * @fill: flag indicates whether any extra space given to this child due to its
Packit 98cdb6
 *  @expand attribute being set is actually allocated to the child, rather than
Packit 98cdb6
 *  being used as padding around the widget; set when packed, %TRUE by default.
Packit 98cdb6
 * @pack: one of #GtkPackType indicating whether the child is packed with
Packit 98cdb6
 *  reference to the start (top/left) or end (bottom/right) of the GtkBox.
Packit 98cdb6
 * @is_secondary: %TRUE if the child is secondary
Packit 98cdb6
 *
Packit 98cdb6
 * The #GtkBoxChild holds a child widget of #GtkBox and describes how the child
Packit 98cdb6
 * is to be packed into the #GtkBox. All fields of this #GtkBoxChild should be
Packit 98cdb6
 * considered read-only and they should never be set directly by an application.
Packit 98cdb6
 * Use gtk_box_query_child_packing() and gtk_box_set_child_packing() to query
Packit 98cdb6
 * and set the #GtkBoxChild.padding, #GtkBoxChild.expand, #GtkBoxChild.fill and
Packit 98cdb6
 * #GtkBoxChild.pack fields.
Packit 98cdb6
 *
Packit 98cdb6
 * Deprecated: 2.22: Use gtk_container_get_children() instead.
Packit 98cdb6
 */
Packit 98cdb6
#if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
Packit 98cdb6
typedef struct _GtkBoxChild   GtkBoxChild;
Packit 98cdb6
struct _GtkBoxChild
Packit 98cdb6
{
Packit 98cdb6
  GtkWidget *widget;
Packit 98cdb6
  guint16 padding;
Packit 98cdb6
  guint expand : 1;
Packit 98cdb6
  guint fill : 1;
Packit 98cdb6
  guint pack : 1;
Packit 98cdb6
  guint is_secondary : 1;
Packit 98cdb6
};
Packit 98cdb6
#endif
Packit 98cdb6
Packit 98cdb6
GType       gtk_box_get_type            (void) G_GNUC_CONST;
Packit 98cdb6
GtkWidget* _gtk_box_new                 (GtkOrientation  orientation,
Packit 98cdb6
                                         gboolean        homogeneous,
Packit 98cdb6
                                         gint            spacing);
Packit 98cdb6
Packit 98cdb6
void        gtk_box_pack_start          (GtkBox         *box,
Packit 98cdb6
                                         GtkWidget      *child,
Packit 98cdb6
                                         gboolean        expand,
Packit 98cdb6
                                         gboolean        fill,
Packit 98cdb6
                                         guint           padding);
Packit 98cdb6
void        gtk_box_pack_end            (GtkBox         *box,
Packit 98cdb6
                                         GtkWidget      *child,
Packit 98cdb6
                                         gboolean        expand,
Packit 98cdb6
                                         gboolean        fill,
Packit 98cdb6
                                         guint           padding);
Packit 98cdb6
Packit 98cdb6
#ifndef GTK_DISABLE_DEPRECATED
Packit 98cdb6
void        gtk_box_pack_start_defaults (GtkBox         *box,
Packit 98cdb6
                                         GtkWidget      *widget);
Packit 98cdb6
void        gtk_box_pack_end_defaults   (GtkBox         *box,
Packit 98cdb6
                                         GtkWidget      *widget);
Packit 98cdb6
#endif
Packit 98cdb6
Packit 98cdb6
void        gtk_box_set_homogeneous     (GtkBox         *box,
Packit 98cdb6
                                         gboolean        homogeneous);
Packit 98cdb6
gboolean    gtk_box_get_homogeneous     (GtkBox         *box);
Packit 98cdb6
void        gtk_box_set_spacing         (GtkBox         *box,
Packit 98cdb6
                                         gint            spacing);
Packit 98cdb6
gint        gtk_box_get_spacing         (GtkBox         *box);
Packit 98cdb6
Packit 98cdb6
void        gtk_box_reorder_child       (GtkBox         *box,
Packit 98cdb6
                                         GtkWidget      *child,
Packit 98cdb6
                                         gint            position);
Packit 98cdb6
Packit 98cdb6
void        gtk_box_query_child_packing (GtkBox         *box,
Packit 98cdb6
                                         GtkWidget      *child,
Packit 98cdb6
                                         gboolean       *expand,
Packit 98cdb6
                                         gboolean       *fill,
Packit 98cdb6
                                         guint          *padding,
Packit 98cdb6
                                         GtkPackType    *pack_type);
Packit 98cdb6
void        gtk_box_set_child_packing   (GtkBox         *box,
Packit 98cdb6
                                         GtkWidget      *child,
Packit 98cdb6
                                         gboolean        expand,
Packit 98cdb6
                                         gboolean        fill,
Packit 98cdb6
                                         guint           padding,
Packit 98cdb6
                                         GtkPackType     pack_type);
Packit 98cdb6
Packit 98cdb6
/* internal API */
Packit 98cdb6
void        _gtk_box_set_old_defaults   (GtkBox         *box);
Packit 98cdb6
gboolean    _gtk_box_get_spacing_set    (GtkBox         *box);
Packit 98cdb6
void        _gtk_box_set_spacing_set    (GtkBox         *box,
Packit 98cdb6
                                         gboolean        spacing_set);
Packit 98cdb6
Packit 98cdb6
G_END_DECLS
Packit 98cdb6
Packit 98cdb6
#endif /* __GTK_BOX_H__ */