the missing flush call for plugins
[ardour2.git] / gtk2_ardour / canvas-ruler.h
blob1444de553b8a68576393f24c29473b759c788d82
1 /* libgnomecanvas/gnome-canvas-ruler.h: GnomeCanvas item for simple rects
3 * Copyright (C) 2001 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_RULER_H__
23 #define __GNOME_CANVAS_RULER_H__
25 #include <stdint.h>
27 #include "libgnomecanvas/libgnomecanvas.h"
29 G_BEGIN_DECLS
31 /* Wave viewer item for canvas.
34 #define GNOME_CANVAS_TYPE_CANVAS_RULER (gnome_canvas_ruler_get_type ())
35 #define GNOME_CANVAS_RULER(obj) (GTK_CHECK_CAST ((obj), GNOME_CANVAS_TYPE_CANVAS_RULER, GnomeCanvasRuler))
36 #define GNOME_CANVAS_RULER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_CANVAS_TYPE_CANVAS_RULER, GnomeCanvasRulerClass))
37 #define GNOME_CANVAS_IS_CANVAS_RULER(obj) (GTK_CHECK_TYPE ((obj), GNOME_CANVAS_TYPE_CANVAS_RULER))
38 #define GNOME_CANVAS_IS_CANVAS_RULER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_CANVAS_TYPE_CANVAS_RULER))
40 typedef struct _GnomeCanvasRuler GnomeCanvasRuler;
41 typedef struct _GnomeCanvasRulerClass GnomeCanvasRulerClass;
43 struct _GnomeCanvasRuler
45 GnomeCanvasItem item;
46 double x1, y1, x2, y2;
47 uint32_t fill_color;
48 uint32_t tick_color;
49 uint32_t frames_per_unit;
51 /* cached values set during update/used during render */
53 unsigned char fill_r, fill_b, fill_g, fill_a;
54 unsigned char tick_r, tick_b, tick_g;
55 guint32 bbox_ulx, bbox_uly;
56 guint32 bbox_lrx, bbox_lry;
59 struct _GnomeCanvasRulerClass {
60 GnomeCanvasItemClass parent_class;
63 GtkType gnome_canvas_ruler_get_type (void);
65 G_END_DECLS
67 #endif /* __GNOME_CANVAS_RULER_H__ */