summaryrefslogtreecommitdiffstats
path: root/src/widgets/gradient-image.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/gradient-image.h')
-rw-r--r--src/widgets/gradient-image.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/widgets/gradient-image.h b/src/widgets/gradient-image.h
new file mode 100644
index 0000000..4fcc4ca
--- /dev/null
+++ b/src/widgets/gradient-image.h
@@ -0,0 +1,65 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+#ifndef SEEN_SP_GRADIENT_IMAGE_H
+#define SEEN_SP_GRADIENT_IMAGE_H
+
+/**
+ * A simple gradient preview
+ *
+ * Author:
+ * Lauris Kaplinski <lauris@kaplinski.com>
+ *
+ * Copyright (C) 2001-2002 Lauris Kaplinski
+ * Copyright (C) 2001 Ximian, Inc.
+ *
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+#include <gtk/gtk.h>
+#include <glibmm/refptr.h>
+
+class SPGradient;
+class SPStop;
+namespace Gdk {
+ class Pixbuf;
+}
+
+#include <sigc++/connection.h>
+
+#define SP_TYPE_GRADIENT_IMAGE (sp_gradient_image_get_type ())
+#define SP_GRADIENT_IMAGE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_GRADIENT_IMAGE, SPGradientImage))
+#define SP_GRADIENT_IMAGE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), SP_TYPE_GRADIENT_IMAGE, SPGradientImageClass))
+#define SP_IS_GRADIENT_IMAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SP_TYPE_GRADIENT_IMAGE))
+#define SP_IS_GRADIENT_IMAGE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SP_TYPE_GRADIENT_IMAGE))
+
+struct SPGradientImage {
+ GtkWidget widget;
+ SPGradient *gradient;
+
+ sigc::connection release_connection;
+ sigc::connection modified_connection;
+};
+
+struct SPGradientImageClass {
+ GtkWidgetClass parent_class;
+};
+
+GType sp_gradient_image_get_type ();
+
+GtkWidget *sp_gradient_image_new (SPGradient *gradient);
+GdkPixbuf *sp_gradient_to_pixbuf (SPGradient *gr, int width, int height);
+Glib::RefPtr<Gdk::Pixbuf> sp_gradient_to_pixbuf_ref (SPGradient *gr, int width, int height);
+Glib::RefPtr<Gdk::Pixbuf> sp_gradstop_to_pixbuf_ref (SPStop *gr, int width, int height);
+void sp_gradient_image_set_gradient (SPGradientImage *gi, SPGradient *gr);
+
+#endif
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8 :