| 1 |
/* |
|---|
| 2 |
* Sweep, a sound wave editor. |
|---|
| 3 |
* |
|---|
| 4 |
* db_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 __DB_RULER_H__ |
|---|
| 35 |
#define __DB_RULER_H__ |
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
#include <gdk/gdk.h> |
|---|
| 39 |
#include <gtk/gtkruler.h> |
|---|
| 40 |
#include <glib.h> |
|---|
| 41 |
|
|---|
| 42 |
#include <sweep/sweep_types.h> |
|---|
| 43 |
|
|---|
| 44 |
#ifdef __cplusplus |
|---|
| 45 |
extern "C" { |
|---|
| 46 |
#endif /* __cplusplus */ |
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
#define DB_RULER(obj) GTK_CHECK_CAST (obj, db_ruler_get_type (), DbRuler) |
|---|
| 50 |
#define DB_RULER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, db_ruler_get_type (), DbRulerClass) |
|---|
| 51 |
#define GTK_IS_DB_RULER(obj) GTK_CHECK_TYPE (obj, db_ruler_get_type ()) |
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
typedef struct _DbRuler DbRuler; |
|---|
| 55 |
typedef struct _DbRulerClass DbRulerClass; |
|---|
| 56 |
|
|---|
| 57 |
struct _DbRuler |
|---|
| 58 |
{ |
|---|
| 59 |
GtkRuler ruler; |
|---|
| 60 |
|
|---|
| 61 |
gfloat y; |
|---|
| 62 |
gboolean dragging; |
|---|
| 63 |
}; |
|---|
| 64 |
|
|---|
| 65 |
struct _DbRulerClass |
|---|
| 66 |
{ |
|---|
| 67 |
GtkRulerClass parent_class; |
|---|
| 68 |
|
|---|
| 69 |
void (*changed) (DbRuler * ruler); |
|---|
| 70 |
}; |
|---|
| 71 |
|
|---|
| 72 |
|
|---|
| 73 |
GType db_ruler_get_type (void); |
|---|
| 74 |
GtkWidget* db_ruler_new (void); |
|---|
| 75 |
|
|---|
| 76 |
#ifdef __cplusplus |
|---|
| 77 |
} |
|---|
| 78 |
#endif /* __cplusplus */ |
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 |
#endif /* __DB_RULER_H__ */ |
|---|