IconInfo.loadSurface

Renders an icon previously looked up in an icon theme using IconTheme.lookupIcon; the size will be based on the size passed to IconTheme.lookupIcon. 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 gtk.IconInfo If this flag has been specified, the pixbuf returned by this function will be scaled to the exact size.

class IconInfo
loadSurface

Parameters

forWindow Window

gdk.Window to optimize drawing for, or NULL

Return Value

Type: Surface

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 Surface.destroy to release your reference to the icon.

Throws

GException on failure.

Meta

Since

3.10