load_surface


Description:

[ Version ( since = "3.10" ) ]
public Surface load_surface (Window? for_window) throws Error

Renders an icon previously looked up in an icon theme using lookup_icon; the size will be based on the size passed to lookup_icon.

Note that the resulting surface may not be exactly this size; an icon theme may have icons that differ slightly from their nominal sizes, and in addition GTK+ will avoid scaling icons that it considers sufficiently close to the requested size or for which the source image would have to be scaled up too far. (This maintains sharpness.). This behaviour can be changed by passing the gtk_icon_lookup_force_size flag when obtaining the IconInfo. If this flag has been specified, the pixbuf returned by this function will be scaled to the exact size.

Parameters:

this

a IconInfo from lookup_icon

for_window

Window to optimize drawing for, or null

Returns:

the rendered icon; this may be a newly created icon or a new reference to an internal icon, so you must not modify the icon. Use cairo_surface_destroy to release your reference to the icon.