![](gtk-logo.svg)

###  [ Gtk ](index.html)

API Version: 3.0

Library Version: 3.24

#####  Type

[ Bin ](class.Bin.html#description)

#####  Instance methods

[ get_child ](method.Bin.get_child.html)

Generated by [ gi-docgen ](https://gitlab.gnome.org/GNOME/gi-docgen) 2023.4

###  Class

#  [ Gtk ](index.html) Bin

####  Description  [ [src]
](https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/gtkbin.c#L25 "go to
source location")

    
    
    abstract class Gtk.Bin : Gtk.Container
      implements Atk.ImplementorIface, Gtk.Buildable {
      /* No available fields */
    }

The ` GtkBin ` widget is a container with just one child. It is not very
useful itself, but it is useful for deriving subclasses, since it provides
common code needed for handling a single child widget.

Many  GTK  \+ widgets are subclasses of ` GtkBin ` , including ` GtkWindow ` ,
` GtkButton ` , ` GtkFrame ` , ` GtkHandleBox ` or ` GtkScrolledWindow ` .

####  Hierarchy

hierarchy  this  GtkBin  implements_0  AtkImplementorIface  this--implements_0
implements_1  GtkBuildable  this--implements_1  ancestor_0  GtkContainer
ancestor_0--this  ancestor_1  GtkWidget  ancestor_1--ancestor_0  ancestor_2
GInitiallyUnowned  ancestor_2--ancestor_1  ancestor_3  GObject  ancestor_3--
ancestor_2

####  Ancestors

  * [ GtkContainer ](class.Container.html "Container")
  * [ GtkWidget ](class.Widget.html "Widget")
  * [ GInitiallyUnowned ](javascript:void\(0\))
  * [ GObject ](javascript:void\(0\))

####  Descendants

  * [ GtkActionBar ](class.ActionBar.html "ActionBar")
  * [ GtkAlignment ](class.Alignment.html "Alignment")
  * [ GtkButton ](class.Button.html "Button")
  * [ GtkComboBox ](class.ComboBox.html "ComboBox")
  * [ GtkEventBox ](class.EventBox.html "EventBox")
  * [ GtkExpander ](class.Expander.html "Expander")
  * [ GtkFlowBoxChild ](class.FlowBoxChild.html "FlowBoxChild")
  * [ GtkFrame ](class.Frame.html "Frame")
  * [ GtkHandleBox ](class.HandleBox.html "HandleBox")
  * [ GtkListBoxRow ](class.ListBoxRow.html "ListBoxRow")
  * [ GtkMenuItem ](class.MenuItem.html "MenuItem")
  * [ GtkOverlay ](class.Overlay.html "Overlay")
  * [ GtkPopover ](class.Popover.html "Popover")
  * [ GtkRevealer ](class.Revealer.html "Revealer")
  * [ GtkScrolledWindow ](class.ScrolledWindow.html "ScrolledWindow")
  * [ GtkSearchBar ](class.SearchBar.html "SearchBar")
  * [ GtkStackSidebar ](class.StackSidebar.html "StackSidebar")
  * [ GtkToolItem ](class.ToolItem.html "ToolItem")
  * [ GtkViewport ](class.Viewport.html "Viewport")
  * [ GtkWindow ](class.Window.html "Window")

####  Implements

  * [ AtkImplementorIface ](javascript:void\(0\))
  * [ GtkBuildable ](iface.Buildable.html "Buildable")

####  Instance methods

######  [ gtk_bin_get_child ](method.Bin.get_child.html)

Gets the child of the ` GtkBin ` , or ` NULL ` if the bin contains no child
widget. The returned widget does not have a reference added, so you do not
need to unref it.

#####  Methods inherited from [ GtkContainer ](class.Container.html) (33)

Please see [ GtkContainer ](class.Container.html#methods) for a full list of
methods.

#####  Methods inherited from [ GtkWidget ](class.Widget.html) (263)

Please see [ GtkWidget ](class.Widget.html#methods) for a full list of
methods.

#####  Methods inherited from [ GObject ](javascript:void\(0\)) (43)

Please see [ GObject ](javascript:void\(0\)) for a full list of methods.

#####  Methods inherited from [ GtkBuildable ](iface.Buildable.html) (10)

######  [ gtk_buildable_add_child ](method.Buildable.add_child.html)

Adds a child to ` buildable ` . ` type ` is an optional string describing how
the child should be added.

since: 2.12

######  [ gtk_buildable_construct_child
](method.Buildable.construct_child.html)

Constructs a child of ` buildable ` with the name ` name ` .

since: 2.12

######  [ gtk_buildable_custom_finished
](method.Buildable.custom_finished.html)

This is similar to ` gtk_buildable_parser_finished() ` but is called once for
each