Method
GtkWidgetrender_icon
Declaration [src]
GdkPixbuf*
gtk_widget_render_icon (
GtkWidget* widget,
const gchar* stock_id,
GtkIconSize size,
const gchar* detail
)
Description [src]
A convenience function that uses the theme settings for widget
to look up stock_id
and render it to a pixbuf. stock_id
should
be a stock icon ID such as #GTK_STOCK_OPEN or #GTK_STOCK_OK. size
should be a size such as #GTK_ICON_SIZE_MENU. detail
should be a
string that identifies the widget or code doing the rendering, so
that theme engines can special-case rendering for that widget or code.
The pixels in the returned GdkPixbuf
are shared with the rest of
the application and should not be modified. The pixbuf should be
freed after use with g_object_unref().
Deprecated since: | 3.0 |
Use |
Parameters
stock_id |
const gchar* |
A stock ID. |
|
The data is owned by the caller of the function. | |
The value is a NUL terminated UTF-8 string. | |
size |
GtkIconSize |
A stock size ( |
|
detail |
const gchar* |
Render detail to pass to theme engine. |
|
The argument can be NULL . | |
The data is owned by the caller of the function. | |
The value is a NUL terminated UTF-8 string. |
Return value
Returns: | GdkPixbuf |
A new pixbuf, or |
|
The caller of the method takes ownership of the data, and is responsible for freeing it. | |
The return value can be NULL . |