1 /* 2 * Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert 3 * 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. 8 * 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. 13 * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 */ 18 19 #ifndef __GX_RACK_TUNER_H__ 20 #define __GX_RACK_TUNER_H__ 21 22 #include "GxTuner.h" 23 24 G_BEGIN_DECLS 25 26 #define GX_TYPE_RACK_TUNER (gx_rack_tuner_get_type()) 27 #define GX_RACK_TUNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GX_TYPE_RACK_TUNER, GxRackTuner)) 28 #define GX_IS_RACK_TUNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GX_TYPE_RACK_TUNER)) 29 #define GX_RACK_TUNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GX_TYPE_RACK_TUNER, GxRackTunerClass)) 30 #define GX_IS_RACK_TUNER_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GX_TYPE_RACK_TUNER)) 31 32 typedef struct _GxRackTuner GxRackTuner; 33 typedef struct _GxRackTunerPrivate GxRackTunerPrivate; 34 typedef struct _GxRackTunerClass GxRackTunerClass; 35 36 #define RACKTUNER_MAXTARGETS (12) 37 struct _GxRackTuner 38 { 39 GxTuner parent; 40 GxRackTunerPrivate *priv; 41 }; 42 43 struct _GxRackTunerClass 44 { 45 GtkDrawingAreaClass parent_class; 46 void (*frequency_poll)(GxRackTuner *tuner); 47 void (*poll_status_changed)(GxRackTuner *tuner, gboolean status); 48 }; 49 50 51 GType gx_rack_tuner_get_type(); 52 53 gboolean gx_rack_tuner_get_poll_status(GxRackTuner *tuner); 54 void gx_rack_tuner_set_freq(GxRackTuner *tuner, double freq); 55 void gx_rack_tuner_set_scale_lim(GxRackTuner *tuner, double scale_lim); 56 double gx_rack_tuner_get_scale_lim(GxRackTuner *tuner); 57 void gx_rack_tuner_set_speed(GxRackTuner *tuner, double speed); 58 double gx_rack_tuner_get_speed(GxRackTuner *tuner); 59 void gx_rack_tuner_set_streaming(GxRackTuner *tuner, gboolean streaming); 60 gboolean gx_rack_tuner_get_streaming(GxRackTuner *tuner); 61 void gx_rack_tuner_set_display_flat(GxRackTuner *tuner, gboolean display_flat); 62 gboolean gx_rack_tuner_get_display_flat(GxRackTuner *tuner); 63 void gx_rack_tuner_set_timestep(GxRackTuner *tuner, gint timestep); 64 gint gx_rack_tuner_get_timestep(GxRackTuner *tuner); 65 void gx_rack_tuner_set_limit_timestep(GxRackTuner *tuner, gint in_limit_timestep); 66 gint gx_rack_tuner_get_limit_timestep(GxRackTuner *tuner); 67 void gx_rack_tuner_clear_notes(GxRackTuner *tuner); 68 gboolean gx_rack_tuner_push_note(GxRackTuner *tuner, gint note, gint A, gint TET); 69 void gx_rack_tuner_set_temperament(GxRackTuner *tuner, gint temperament); 70 gint gx_rack_tuner_get_temperament(GxRackTuner *tuner); 71 72 GtkWidget *gx_rack_tuner_new(void); 73 74 G_END_DECLS 75 76 #endif /* __GX_RACK_TUNER_H__ */ 77