Basics
Guides
API Reference
Basics
Guides
API Reference
[31:7] extends: object
Contains information that is necessary position a [iface@Gdk.Popup] relative
to its parent. The positioning requires a negotiation with the windowing
system, since it depends on external constraints, such as the position of the
parent surface, and the screen dimensions. The basic ingredients are a
rectangle on the parent surface, and the anchor on both that rectangle and
the popup. The anchors specify a side or corner to place next to each other.
For cases where placing the anchors next
to each other would make the popup extend offscreen, the layout includes some
hints for how to resolve this problem. The hints may suggest to flip the
anchor position to the other side, or to 'slide' the popup along a side, or
to resize it.
These hints may be combined. Ultimatively, it is up
to the windowing system to determine the position and size of the popup. You
can learn about the result by calling [method@Gdk.Popup.get_position_x],
[method@Gdk.Popup.get_position_y], [method@Gdk.Popup.get_rect_anchor] and
[method@Gdk.Popup.get_surface_anchor] after the popup has been presented.
This can be used to adjust the rendering. For example,
GtkPopover changes its arrow position
accordingly. But you have to be careful avoid changing the size of the
popover, or it has to be presented again.
PopupLayout (Handle = null)
Creates a new
PopupLayoutby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.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.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.