Package: gtk

Function gtk-entry-layout

Lambda List

gtk-entry-layout (entry)

Arguments

entry -- a gtk-entry widget

Return Value

The pango-layout object for the entry.

Details

Gets the Pango layout used to display the entry. The Pano layout is useful to e.g. convert text positions to pixel positions, in combination with the gtk-entry-layout-offsets function. The returned Pango layout is owned by the entry and must not be modified or freed by the caller.

Keep in mind that the Pango layout text may contain a preedit string, so the gtk-entry-layout-index-to-text-index and gtk-entry-text-index-to-layout-index functions are needed to convert byte indices in the Pango layout to byte indices in the entry contents.
 

See also

2021-11-3