1
/* LIBGIMP - The GIMP Library
2
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
4
* This library is free software: you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 3 of the License, or (at your option) any later version.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library. If not, see
16
* <http://www.gnu.org/licenses/>.
19
#ifndef __GIMP_RULER_H__
20
#define __GIMP_RULER_H__
22
/* This is not in the original gimp source code. */
23
#include <libgimpbase/gimpunit.h>
27
#define GIMP_TYPE_RULER (gimp_ruler_get_type ())
28
#define GIMP_RULER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_RULER, GimpRuler))
29
#define GIMP_RULER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_RULER, GimpRulerClass))
30
#define GIMP_IS_RULER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_RULER))
31
#define GIMP_IS_RULER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_RULER))
32
#define GIMP_RULER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_RULER, GimpRulerClass))
34
/* In the original gimp source code, this is in libgimpwidgets/gimpwidgetstypes.h */
35
typedef struct _GimpRuler GimpRuler;
37
typedef struct _GimpRulerClass GimpRulerClass;
41
GtkWidget parent_instance;
44
struct _GimpRulerClass
46
GtkWidgetClass parent_class;
48
/* Padding for future expansion */
49
void (*_gimp_reserved1) (void);
50
void (*_gimp_reserved2) (void);
51
void (*_gimp_reserved3) (void);
52
void (*_gimp_reserved4) (void);
57
GType gimp_ruler_get_type (void) G_GNUC_CONST;
59
GtkWidget * gimp_ruler_new (GtkOrientation orientation);
61
void gimp_ruler_add_track_widget (GimpRuler *ruler,
63
void gimp_ruler_remove_track_widget (GimpRuler *ruler,
66
void gimp_ruler_set_unit (GimpRuler *ruler,
68
GimpUnit gimp_ruler_get_unit (GimpRuler *ruler);
69
void gimp_ruler_set_position (GimpRuler *ruler,
71
gdouble gimp_ruler_get_position (GimpRuler *ruler);
72
void gimp_ruler_set_range (GimpRuler *ruler,
76
void gimp_ruler_get_range (GimpRuler *ruler,
83
#endif /* __GIMP_RULER_H__ */