Basics
Guides
API Reference
Basics
Guides
API Reference
[31:7] extends: object
Places “overlay” widgets on top of a single main child.
GtkOverlay container, whereas an overlay with halign set to
%GTK_ALIGN_CENTER and valign set to %GTK_ALIGN_END will be placed a the
bottom edge of the GtkOverlay, horizontally centered. The position can be
adjusted by setting the margin properties of the child to non-zero values.
More complicated placement of overlays is possible by connecting to the
[signal@Gtk.Overlay::get-child-position] signal. An overlay’s minimum and
natural sizes are those of its main child. The sizes of overlay children are
not considered when measuring these preferred sizes. # GtkOverlay as
GtkBuildable The GtkOverlay implementation of the GtkBuildable interface
supports placing a child as an overlay by specifying “overlay” as the “type”
attribute of a <child> element. # CSS nodes GtkOverlay has a single CSS
node with the name “overlay”. Overlay children whose alignments cause them to
be positioned at an edge get the style classes “.left”, “.right”, “.top”,
and/or “.bottom” according to their position.
Overlay ()
Creates a new
GtkOverlay.
toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asWidget ()
Wraps this handle as
Widget.
A Widget object.asAccessible ()
Wraps this handle as
Accessible.
A Accessible object.asBuildable ()
Wraps this handle as
Buildable.
A Buildable object.asConstraintTarget ()
Wraps this handle as
ConstraintTarget.
A ConstraintTarget object.connectSignal (string Name, CallbackObj)
Connects one generated callback wrapper to a named signal.
Name is the signal name.CallbackObj is the generated callback wrapper to connect.The connected handler id.disconnectSignalHandler (int HandlerId)
Disconnects one retained signal handler id.
HandlerId is the signal handler id to disconnect.None.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setChild (object Value)
The main child widget.
Value is the new property value.None.add_overlay (object widget)
Adds @widget to @overlay. The widget will be stacked on top of the main widget added with [method@Gtk.Overlay.set_child]. The position at which
is placed is determined from its [property@Gtk.Widget:halign] and [property@Gtk.Widget:valign] properties.widget is a GtkWidget to be added to the container.None.get_child ()
Gets the child widget of @overlay.
get_clip_overlay (object widget)
Gets whether @widget should be clipped within the parent.
widget is an overlay child of GtkOverlay.get_measure_overlay (object widget)
Gets whether @widget's size is included in the measurement of @overlay.
widget is an overlay child of GtkOverlay.remove_overlay (object widget)
Removes an overlay that was added with gtk_overlay_add_overlay().
widget is a GtkWidget to be removed.None.set_child (object child)
Sets the child widget of @overlay.
child is the child widget.None.set_clip_overlay (object widget, bool clip_overlay)
Sets whether @widget should be clipped within the parent.
widget is an overlay child of GtkOverlay.clip_overlay is whether the child should be clipped.None.set_measure_overlay (object widget, bool measure)
Sets whether @widget is included in the measured size of @overlay. The overlay will request the size of the largest child that has this property set to %TRUE. Children who are not included may be drawn outside of
allocation if they are too large.widget is an overlay child of GtkOverlay.measure is whether the child should be measured.None.[286:14] static extends: object
Generated metadata helpers for Overlay class surfaces.
properties ()
Returns property metadata for
Overlay.
A list.signals ()
Returns signal metadata for
Overlay.
A list.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.