]> Pileus Git - ~andy/gtk/blob - gtk/gtkgradient.h
gtkiconview: Use symbolic names for button numbers
[~andy/gtk] / gtk / gtkgradient.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 2010 Carlos Garnacho <carlosg@gnome.org>
3  *
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.
8  *
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.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
21 #error "Only <gtk/gtk.h> can be included directly."
22 #endif
23
24 #ifndef __GTK_GRADIENT_H__
25 #define __GTK_GRADIENT_H__
26
27 #include <gdk/gdk.h>
28 #include <gtk/gtkstylecontext.h>
29 #include <gtk/gtkstyleproperties.h>
30 #include <gtk/gtksymboliccolor.h>
31
32 G_BEGIN_DECLS
33
34 #define GTK_TYPE_GRADIENT (gtk_gradient_get_type ())
35
36 GType         gtk_gradient_get_type       (void) G_GNUC_CONST;
37
38 GtkGradient * gtk_gradient_new_linear     (gdouble              x0,
39                                            gdouble              y0,
40                                            gdouble              x1,
41                                            gdouble              y1);
42 GtkGradient * gtk_gradient_new_radial     (gdouble              x0,
43                                            gdouble              y0,
44                                            gdouble              radius0,
45                                            gdouble              x1,
46                                            gdouble              y1,
47                                            gdouble              radius1);
48
49 void          gtk_gradient_add_color_stop (GtkGradient         *gradient,
50                                            gdouble              offset,
51                                            GtkSymbolicColor    *color);
52
53 GtkGradient * gtk_gradient_ref            (GtkGradient         *gradient);
54 void          gtk_gradient_unref          (GtkGradient         *gradient);
55
56 gboolean      gtk_gradient_resolve        (GtkGradient         *gradient,
57                                            GtkStyleProperties  *props,
58                                            cairo_pattern_t    **resolved_gradient);
59 cairo_pattern_t *
60               gtk_gradient_resolve_for_context
61                                           (GtkGradient         *gradient,
62                                            GtkStyleContext     *context);
63
64 char *        gtk_gradient_to_string      (GtkGradient         *gradient);
65
66 G_END_DECLS
67
68 #endif /* __GTK_GRADIENT_H__ */