Zoom session when the mouse pointer is moved up and down during a playhead drag.
[ardour2.git] / gtk2_ardour / canvas-curve.h
blobcad92704545a24ca3318decc19fa6b3160fe1985
1 /* libgnomecanvas/gnome-canvas-curve.h: GnomeCanvas item for constrained spline curves
3 * Copyright (C) 2003 Paul Davis <pbd@op.net>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library 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 GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
22 #ifndef __GNOME_CANVAS_CURVE_H__
23 #define __GNOME_CANVAS_CURVE_H__
25 #include <libgnomecanvas/libgnomecanvas.h>
27 G_BEGIN_DECLS
29 /* Wave viewer item for canvas.
32 #define GNOME_CANVAS_TYPE_CANVAS_CURVE (gnome_canvas_curve_get_type ())
33 #define GNOME_CANVAS_CURVE(obj) (GTK_CHECK_CAST ((obj), GNOME_CANVAS_TYPE_CANVAS_CURVE, GnomeCanvasCurve))
34 #define GNOME_CANVAS_CURVE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_CANVAS_TYPE_CANVAS_CURVE, GnomeCanvasCurveClass))
35 #define GNOME_CANVAS_IS_CANVAS_CURVE(obj) (GTK_CHECK_TYPE ((obj), GNOME_CANVAS_TYPE_CANVAS_CURVE))
36 #define GNOME_CANVAS_IS_CANVAS_CURVE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_CANVAS_TYPE_CANVAS_CURVE))
38 typedef struct _GnomeCanvasCurve GnomeCanvasCurve;
39 typedef struct _GnomeCanvasCurveClass GnomeCanvasCurveClass;
41 struct _GnomeCanvasCurve
43 GnomeCanvasItem item;
44 double x1, y1, x2, y2;
45 void* curve_arg;
46 float* vector;
47 size_t veclen;
48 uint32_t color;
50 /* cached values set during update/used during render */
52 unsigned char r, b, g, a;
53 guint32 bbox_ulx, bbox_uly;
54 guint32 bbox_lrx, bbox_lry;
57 struct _GnomeCanvasCurveClass {
58 GnomeCanvasItemClass parent_class;
61 GtkType gnome_canvas_curve_get_type (void);
63 G_END_DECLS
65 #endif /* __GNOME_CANVAS_CURVE_H__ */