Method
GtkIconInfoload_symbolic
since: 3.0
Declaration [src]
GdkPixbuf*
gtk_icon_info_load_symbolic (
GtkIconInfo* icon_info,
const GdkRGBA* fg,
const GdkRGBA* success_color,
const GdkRGBA* warning_color,
const GdkRGBA* error_color,
gboolean* was_symbolic,
GError** error
)
Description [src]
Loads an icon, modifying it to match the system colours for the foreground, success, warning and error colors provided. If the icon is not a symbolic one, the function will return the result from gtk_icon_info_load_icon().
This allows loading symbolic icons that will match the system theme.
Unless you are implementing a widget, you will want to use
g_themed_icon_new_with_default_fallbacks()
to load the icon.
As implementation details, the icon loaded needs to be of SVG type, contain the “symbolic” term as the last component of the icon name, and use the “fg”, “success”, “warning” and “error” CSS styles in the SVG file itself.
See the Symbolic Icons Specification for more information about symbolic icons.
Available since: 3.0
Parameters
fg
-
Type:
GdkRGBA
A
GdkRGBA
representing the foreground color of the icon.The data is owned by the caller of the method. success_color
-
Type:
GdkRGBA
A
GdkRGBA
representing the warning color of the icon orNULL
to use the default color.The argument can be NULL
.The data is owned by the caller of the method. warning_color
-
Type:
GdkRGBA
A
GdkRGBA
representing the warning color of the icon orNULL
to use the default color.The argument can be NULL
.The data is owned by the caller of the method. error_color
-
Type:
GdkRGBA
A
GdkRGBA
representing the error color of the icon orNULL
to use the default color (allow-none).The argument can be NULL
.The data is owned by the caller of the method. was_symbolic
-
Type:
gboolean*
A #gboolean, returns whether the loaded icon was a symbolic one and whether the
fg
color was applied to it.The argument will be set by the function. The argument can be NULL
. error
-
Type:
GError **
The return location for a recoverable error.
The argument can be NULL
.If the return location is not NULL
, then you must initialize it to aNULL
GError*
.The argument will be left initialized to NULL
by the method if there are no errors.In case of error, the argument will be set to a newly allocated GError
; the caller will take ownership of the data, and be responsible for freeing it.
Return value
Type: GdkPixbuf
A GdkPixbuf
representing the loaded icon.
The caller of the method takes ownership of the returned data, and is responsible for freeing it. |