Package: gtk

Function gtk-widget-pango-context

Lambda List

gtk-widget-pango-context (widget)

Arguments

widget -- a gtk-widget object

Return Value

The pango-context object for the widget.

Details

Gets a Pango context with the appropriate font map, font description, and base direction for this widget. Unlike the context returned by the gtk-widget-create-pango-context function, this context is owned by the widget, it can be used until the screen for the widget changes or the widget is removed from its toplevel, and will be updated to match any changes to the attributes of the widget.

If you create and keep a pango-layout object using this context, you must deal with changes to the context by calling the pango-layout-context-changed function on the layout in response to the "style-updated" and "direction-changed" signals for the widget.
 

See also

2021-9-19