2 terminatorX - realtime audio scratching software
3 Copyright (C) 1999-2016 Alexander König
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 Description: Header to tX_widget.c
33 #endif /* __cplusplus */
35 #define GTK_TX(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_tx_get_type (), GtkTx)
36 #define GTK_TX_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_tx_get_type (), GtkTxClass)
37 #define GTK_IS_TX(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_tx_get_type ())
39 typedef struct _GtkTx GtkTx;
40 typedef struct _GtkTxClass GtkTxClass;
42 typedef enum tx_widget_motion {
48 #define GTK_TX_HISTORY_LENGTH 4
58 GdkRGBA history_colors[GTK_TX_HISTORY_LENGTH];
63 GdkRGBA *audio_colors_focus;
64 GdkRGBA *audio_colors_nofocus;
77 int cursor_history[GTK_TX_HISTORY_LENGTH];
78 int cursor_history_offset;
83 #ifdef USE_DISPLAY_NORMALIZE
87 cairo_surface_t* surface;
91 GtkWidgetClass parent_class;
94 GtkWidget* gtk_tx_new (int16_t *wavdata, int wavsamples);
95 GType gtk_tx_get_type (void);
96 void gtk_tx_set_data (GtkTx *tx, int16_t *wavdata, int wavsamples);
97 void gtk_tx_cleanup_pos_display (GtkTx *tx);
98 void gtk_tx_update_pos_display (GtkTx *tx, int sample, int mute);
99 void gtk_tx_show_focus(GtkTx *tx, int show);
100 void gtk_tx_set_zoom(GtkTx *tx, f_prec zoom, int is_playing);
101 void gtk_tx_update_colors(GtkTx *tx);
102 f_prec gtk_tx_get_zoom(GtkTx *tx);
106 #endif /* __cplusplus */