Code

Stop background rendering once crash handler is triggered.
[inkscape.git] / src / widgets / sp-color-wheel.h
1 #ifndef __SP_COLOR_WHEEL_H__
2 #define __SP_COLOR_WHEEL_H__
4 /*
5  * A wheel color widget
6  *
7  * Authors:
8  *   Lauris Kaplinski <lauris@kaplinski.com>
9  *   Jon A. Cruz <jon@joncruz.org>
10  *
11  * Copyright (C) 2001-2002 Lauris Kaplinski
12  * Copyright (C) 2001-2004 Authors
13  *
14  * This code is in public domain
15  */
17 #include <gtk/gtkwidget.h>
19 #include <glib.h>
20 #include "color.h"
23 #define SP_TYPE_COLOR_WHEEL (sp_color_wheel_get_type ())
24 #define SP_COLOR_WHEEL(o) (GTK_CHECK_CAST ((o), SP_TYPE_COLOR_WHEEL, SPColorWheel))
25 #define SP_COLOR_WHEEL_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), SP_TYPE_COLOR_WHEEL, SPColorWheelClass))
26 #define SP_IS_COLOR_WHEEL(o) (GTK_CHECK_TYPE ((o), SP_TYPE_COLOR_WHEEL))
27 #define SP_IS_COLOR_WHEEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SP_TYPE_COLOR_WHEEL))
29 struct SPColorWheel {
30     GtkWidget widget;
32     gboolean dragging : 1;
34     gboolean _inTriangle;
35     gboolean _triDirty;
36     GdkRegion* _triangle;
37     GdkPoint _triPoints[3];
38     guchar *_triImage;
39     gint _triBs;
41     guchar *_image;
42     gint _bs;
44     gdouble _spotValue;
46     gdouble _hue;
47     gdouble _sat;
48     gdouble _value;
50     gint _inner;
51     gint _center;
52 };
54 struct SPColorWheelClass {
55     GtkWidgetClass parent_class;
57     void (* changed) (SPColorWheel *wheel);
58 };
60 GType sp_color_wheel_get_type(void);
62 GtkWidget *sp_color_wheel_new ();
64 void sp_color_wheel_get_color( SPColorWheel *wheel, SPColor* color );
65 void sp_color_wheel_set_color( SPColorWheel *wheel, const SPColor* color );
67 gboolean sp_color_wheel_is_adjusting( SPColorWheel *wheel );
69 #endif
71 /*
72   Local Variables:
73   mode:c++
74   c-file-style:"stroustrup"
75   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
76   indent-tabs-mode:nil
77   fill-column:99
78   End:
79 */
80 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :