Method

GtkIconSetrender_icon_surface

deprecated: 3.10 since: 3.10

Declaration [src]

cairo_surface_t*
gtk_icon_set_render_icon_surface (
  GtkIconSet* icon_set,
  GtkStyleContext* context,
  GtkIconSize size,
  int scale,
  GdkWindow* for_window
)

Description [src]

Renders an icon using gtk_render_icon_pixbuf() and converts it to a cairo surface.

This function never returns NULL; if the icon can’t be rendered (perhaps because an image file fails to load), a default “missing image” icon will be returned instead.

Available since: 3.10

Deprecated since: 3.10

Use GtkIconTheme instead.

Parameters

context

Type: GtkStyleContext

A GtkStyleContext.

The data is owned by the caller of the method.
size

Type: GtkIconSize

Icon size (GtkIconSize). A size of (GtkIconSize)-1 means render at the size of the source and don’t scale.

scale

Type: int

The window scale to render for.

for_window

Type: GdkWindow

GdkWindow to optimize drawing for, or NULL.

The argument can be NULL.
The data is owned by the caller of the method.

Return value

Type: cairo_surface_t

A #cairo_surface_t to be displayed.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.