1 /* 2 * Sweep, a sound wave editor. 3 * 4 * time_ruler, modified from hruler in GTK+ 1.2.x 5 * by Conrad Parker 2000 for Sweep. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 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 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 */ 21 22 /* 23 * GTK - The GIMP Toolkit 24 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald 25 */ 26 27 /* 28 * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS 29 * file for a list of people on the GTK+ Team. See the ChangeLog 30 * files for a list of changes. These files are distributed with 31 * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 32 */ 33 34 #ifndef __TIME_RULER_H__ 35 #define __TIME_RULER_H__ 36 37 38 #include <gdk/gdk.h> 39 #include <gtk/gtkruler.h> 40 41 #include <sweep/sweep_types.h> 42 43 #ifdef __cplusplus 44 extern "C" { 45 #endif /* __cplusplus */ 46 47 48 #define TIME_RULER(obj) GTK_CHECK_CAST (obj, time_ruler_get_type (), TimeRuler) 49 #define TIME_RULER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, time_ruler_get_type (), TimeRulerClass) 50 #define GTK_IS_TIME_RULER(obj) GTK_CHECK_TYPE (obj, time_ruler_get_type ()) 51 52 53 typedef struct _TimeRuler TimeRuler; 54 typedef struct _TimeRulerClass TimeRulerClass; 55 56 struct _TimeRuler 57 { 58 GtkRuler ruler; 59 60 gint samplerate; 61 }; 62 63 struct _TimeRulerClass 64 { 65 GtkRulerClass parent_class; 66 }; 67 68 69 GType time_ruler_get_type (void); 70 GtkWidget* time_ruler_new (void); 71 void time_ruler_set_format (TimeRuler * time_ruler, sw_format * f); 72 73 #ifdef __cplusplus 74 } 75 #endif /* __cplusplus */ 76 77 78 #endif /* __TIME_RULER_H__ */ 79