summaryrefslogtreecommitdiff
path: root/src/theme.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2002-05-31 21:18:11 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-05-31 21:18:11 +0000
commitd4b91dc6540e438cf4bda1dac647caa31df7856d (patch)
tree18940a46594ef754db48c8f4dafd2090915c2649 /src/theme.h
parent8da3b943a9fda038ab5113a7f093faea96aef66e (diff)
downloadmetacity-d4b91dc6540e438cf4bda1dac647caa31df7856d.tar.gz
metacity-d4b91dc6540e438cf4bda1dac647caa31df7856d.tar.bz2
now just uses meta_gradient_add_alpha (draw_op_as_pixbuf): implement alpha
2002-05-31 Havoc Pennington <hp@redhat.com> * src/theme.c (multiply_alpha): now just uses meta_gradient_add_alpha (draw_op_as_pixbuf): implement alpha gradients for tint, gradient, and image draw ops, so I can implement garrett's stuff. * src/gradient.c (meta_gradient_add_alpha): new function to multiply the alpha channel of a pixbuf by an alpha gradient
Diffstat (limited to 'src/theme.h')
-rw-r--r--src/theme.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/theme.h b/src/theme.h
index 6345a2e..f93157a 100644
--- a/src/theme.h
+++ b/src/theme.h
@@ -31,6 +31,7 @@ typedef struct _MetaFrameStyleSet MetaFrameStyleSet;
typedef struct _MetaDrawOp MetaDrawOp;
typedef struct _MetaDrawOpList MetaDrawOpList;
typedef struct _MetaGradientSpec MetaGradientSpec;
+typedef struct _MetaAlphaGradientSpec MetaAlphaGradientSpec;
typedef struct _MetaColorSpec MetaColorSpec;
typedef struct _MetaFrameLayout MetaFrameLayout;
typedef struct _MetaFrameGeometry MetaFrameGeometry;
@@ -169,6 +170,13 @@ struct _MetaGradientSpec
GSList *color_specs;
};
+struct _MetaAlphaGradientSpec
+{
+ MetaGradientType type;
+ unsigned char *alphas;
+ int n_alphas;
+};
+
struct _MetaDrawInfo
{
GdkPixbuf *mini_icon;
@@ -256,7 +264,7 @@ struct _MetaDrawOp
struct {
MetaColorSpec *color_spec;
- double alpha;
+ MetaAlphaGradientSpec *alpha_spec;
char *x;
char *y;
char *width;
@@ -265,7 +273,7 @@ struct _MetaDrawOp
struct {
MetaGradientSpec *gradient_spec;
- double alpha;
+ MetaAlphaGradientSpec *alpha_spec;
char *x;
char *y;
char *width;
@@ -274,6 +282,7 @@ struct _MetaDrawOp
struct {
MetaColorSpec *colorize_spec;
+ MetaAlphaGradientSpec *alpha_spec;
GdkPixbuf *pixbuf;
double alpha;
char *x;
@@ -312,7 +321,7 @@ struct _MetaDrawOp
} gtk_vline;
struct {
- double alpha;
+ MetaAlphaGradientSpec *alpha_spec;
char *x;
char *y;
char *width;
@@ -618,6 +627,10 @@ GdkPixbuf* meta_gradient_spec_render (const MetaGradientSpec *desc,
gboolean meta_gradient_spec_validate (MetaGradientSpec *spec,
GError **error);
+MetaAlphaGradientSpec* meta_alpha_gradient_spec_new (MetaGradientType type,
+ int n_alphas);
+void meta_alpha_gradient_spec_free (MetaAlphaGradientSpec *spec);
+
MetaFrameStyle* meta_frame_style_new (MetaFrameStyle *parent);
void meta_frame_style_ref (MetaFrameStyle *style);