1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 2010 Carlos Garnacho <carlosg@gnome.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
18 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
19 #error "Only <gtk/gtk.h> can be included directly."
22 #ifndef __GTK_GRADIENT_H__
23 #define __GTK_GRADIENT_H__
26 #include <gtk/gtkstylecontext.h>
27 #include <gtk/gtkstyleproperties.h>
28 #include <gtk/gtksymboliccolor.h>
32 #define GTK_TYPE_GRADIENT (gtk_gradient_get_type ())
34 GType gtk_gradient_get_type (void) G_GNUC_CONST;
36 GtkGradient * gtk_gradient_new_linear (gdouble x0,
40 GtkGradient * gtk_gradient_new_radial (gdouble x0,
47 void gtk_gradient_add_color_stop (GtkGradient *gradient,
49 GtkSymbolicColor *color);
51 GtkGradient * gtk_gradient_ref (GtkGradient *gradient);
52 void gtk_gradient_unref (GtkGradient *gradient);
54 gboolean gtk_gradient_resolve (GtkGradient *gradient,
55 GtkStyleProperties *props,
56 cairo_pattern_t **resolved_gradient);
58 gtk_gradient_resolve_for_context
59 (GtkGradient *gradient,
60 GtkStyleContext *context);
62 char * gtk_gradient_to_string (GtkGradient *gradient);
66 #endif /* __GTK_GRADIENT_H__ */