Add API to set palettes

I'm not really convinced by this; the API is a little complicated.
May need more thought.
This commit is contained in:
Matthias Clasen
2012-02-04 01:45:55 -05:00
parent d7cff0797e
commit 8f201d62d9
6 changed files with 250 additions and 90 deletions

View File

@ -197,3 +197,15 @@ gtk_color_chooser_set_use_alpha (GtkColorChooser *chooser,
g_object_set (chooser, "use-alpha", use_alpha, NULL);
}
void
gtk_color_chooser_add_palette (GtkColorChooser *chooser,
gboolean horizontal,
gint colors_per_line,
gint n_colors,
GdkRGBA *colors)
{
g_return_if_fail (GTK_IS_COLOR_CHOOSER (chooser));
GTK_COLOR_CHOOSER_GET_IFACE (chooser)->add_palette (chooser, horizontal, colors_per_line, n_colors, colors);
}