Function

GtkColorSelectionpalette_from_string

Declaration [src]

gboolean
gtk_color_selection_palette_from_string (
  const gchar* str,
  GdkColor** colors,
  gint* n_colors
)

Description [src]

Parses a color palette string; the string is a colon-separated list of color names readable by gdk_color_parse().

Parameters

str

Type: const gchar*

A string encoding a color palette.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
colors

Type: An array of GdkColor*

Return location for allocated array of GdkColor.

The argument will be set by the function.
The length of the array is specified in the n_colors argument.
The caller of the function takes ownership of the returned data, and is responsible for freeing it.
n_colors

Type: gint*

Return location for length of array.

The argument will be set by the function.

Return value

Type: gboolean

TRUE if a palette was successfully parsed.