1 /* gAlan - Graphical Audio Language
2 * Copyright (C) 1999 Tony Garnock-Jones
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program 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
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __GTK_KNOB_H__
20 #define __GTK_KNOB_H__
23 #include <gtk/gtkadjustment.h>
24 #include <gtk/gtkwidget.h>
25 #include <gdk-pixbuf/gdk-pixbuf.h>
31 #define PIXMAPDIRIFY(filename) \
32 (SITE_PKGDATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S filename)
34 #define GTK_KNOB(obj) GTK_CHECK_CAST(obj, gtk_knob_get_type(), GtkKnob)
35 #define GTK_KNOB_CLASS(klass) GTK_CHECK_CLASS_CAST(klass, gtk_knob_get_type(), GtkKnobClass)
36 #define GTK_IS_KNOB(obj) GTK_CHECK_TYPE(obj, gtk_knob_get_type())
38 typedef struct _GtkKnob GtkKnob
;
39 typedef struct _GtkKnobClass GtkKnobClass
;
44 /* update policy (GTK_UPDATE_[CONTINUOUS/DELAYED/DISCONTINUOUS]) */
47 /* State of widget (to do with user interaction) */
49 gint saved_x
, saved_y
;
51 /* ID of update timer, or 0 if none */
56 /* Animation for knob... from animated gif */
59 /* Old values from adjustment stored so we know when something changes */
64 /* The adjustment object that stores the data for this knob */
65 GtkAdjustment
*adjustment
;
70 GtkWidgetClass parent_class
;
73 extern GtkWidget
*gtk_knob_new(GtkAdjustment
*adjustment
);
74 extern guint
gtk_knob_get_type(void);
76 extern GtkAdjustment
*gtk_knob_get_adjustment(GtkKnob
*knob
);
77 extern void gtk_knob_set_update_policy(GtkKnob
*knob
, GtkUpdateType policy
);
79 extern void gtk_knob_set_adjustment(GtkKnob
*knob
, GtkAdjustment
*adjustment
);