Mercurial > audlegacy
diff src/audacious/ui_vis.h @ 3020:6065d70cb790 trunk
replace old Vis with UiVis
| author | Tomasz Mon <desowin@gmail.com> |
|---|---|
| date | Tue, 10 Jul 2007 11:32:54 +0200 |
| parents | |
| children | 883713b145f8 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/audacious/ui_vis.h Tue Jul 10 11:32:54 2007 +0200 @@ -0,0 +1,100 @@ +/* + * Audacious - a cross-platform multimedia player + * Copyright (c) 2007 Audacious development team. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; under version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef UIVIS_H +#define UIVIS_H + +#include <gdk/gdk.h> +#include <gtk/gtkadjustment.h> +#include <gtk/gtkwidget.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#define UI_VIS(obj) GTK_CHECK_CAST (obj, ui_vis_get_type (), UiVis) +#define UI_VIS_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, ui_vis_get_type (), UiVisClass) +#define UI_IS_VIS(obj) GTK_CHECK_TYPE (obj, ui_vis_get_type ()) + +typedef enum { + VIS_ANALYZER, VIS_SCOPE, VIS_VOICEPRINT, VIS_OFF +} VisType; + +typedef enum { + ANALYZER_NORMAL, ANALYZER_FIRE, ANALYZER_VLINES +} AnalyzerMode; + +typedef enum { + ANALYZER_LINES, ANALYZER_BARS +} AnalyzerType; + +typedef enum { + SCOPE_DOT, SCOPE_LINE, SCOPE_SOLID +} ScopeMode; +typedef enum { + VOICEPRINT_NORMAL, VOICEPRINT_FIRE, VOICEPRINT_ICE +} VoiceprintMode; + + +typedef enum { + VU_NORMAL, VU_SMOOTH +} VUMode; + +typedef enum { + REFRESH_FULL, REFRESH_HALF, REFRESH_QUARTER, REFRESH_EIGTH +} RefreshRate; + +typedef enum { + FALLOFF_SLOWEST, FALLOFF_SLOW, FALLOFF_MEDIUM, FALLOFF_FAST, + FALLOFF_FASTEST +} FalloffSpeed; + +typedef struct _UiVis UiVis; +typedef struct _UiVisClass UiVisClass; + +struct _UiVis { + GtkWidget widget; + + gint x, y, width, height; + gfloat data[75], peak[75], peak_speed[75]; + gint refresh_delay; + gboolean double_size; + GtkWidget *fixed; + gboolean visible_window; +}; + +struct _UiVisClass { + GtkWidgetClass parent_class; + void (* clicked) (UiVis *vis); + void (* right_clicked) (UiVis *vis); + void (* doubled) (UiVis *vis); +}; + +GtkWidget* ui_vis_new (GtkWidget *fixed, gint x, gint y, gint width); +GtkType ui_vis_get_type(void); +void ui_vis_set_vis(GtkWidget *widget, gint num); +void ui_vis_clear_data(GtkWidget *widget); +void ui_vis_clear(GtkWidget *widget); +void ui_vis_timeout_func(GtkWidget *widget, guchar * data); +void ui_vis_set_visible(GtkWidget *widget, gboolean window_is_visible); + +#ifdef __cplusplus +} +#endif + +#endif
