Crusher: fix UI crash
[calf.git] / src / calf / ctl_knob.h
blobba72cbfc0eac65ebe330b26d46277e079fbe0f5a
1 /* Calf DSP Library
2 * A knob (dial) widget.
4 * Copyright (C) 2008-2010 Krzysztof Foltman, Torben Hohn, Markus
5 * Schmidt and others
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General
18 * Public License along with this program; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02111-1307, USA.
23 #ifndef CALF_CTL_KNOB_H
24 #define CALF_CTL_KNOB_H
26 #include <gtk/gtk.h>
28 G_BEGIN_DECLS
30 #define CALF_TYPE_KNOB (calf_knob_get_type())
31 #define CALF_KNOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALF_TYPE_KNOB, CalfKnob))
32 #define CALF_IS_KNOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALF_TYPE_KNOB))
33 #define CALF_KNOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALF_TYPE_KNOB, CalfKnobClass))
34 #define CALF_IS_KNOB_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALF_TYPE_KNOB))
36 struct CalfKnob
38 GtkRange parent;
39 int knob_type;
40 int knob_size;
41 double start_x, start_y, last_y, start_value, default_value;
44 struct CalfKnobClass
46 GtkRangeClass parent_class;
47 GdkPixbuf *knob_image[5];
50 extern GtkWidget *calf_knob_new();
51 extern GtkWidget *calf_knob_new_with_adjustment(GtkAdjustment *_adjustment);
53 extern GType calf_knob_get_type();
55 G_END_DECLS
57 #endif