]> Pileus Git - ~andy/gtk/blob - gtk/gtkadjustment.h
Remove GtkObject completely
[~andy/gtk] / gtk / gtkadjustment.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
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 2 of the License, or (at your option) any later version.
8  *
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.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 /*
21  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
22  * file for a list of people on the GTK+ Team.  See the ChangeLog
23  * files for a list of changes.  These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25  */
26
27 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
28 #error "Only <gtk/gtk.h> can be included directly."
29 #endif
30
31 #ifndef __GTK_ADJUSTMENT_H__
32 #define __GTK_ADJUSTMENT_H__
33
34 #include <gdk/gdk.h>
35
36 G_BEGIN_DECLS
37
38 #define GTK_TYPE_ADJUSTMENT                  (gtk_adjustment_get_type ())
39 #define GTK_ADJUSTMENT(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ADJUSTMENT, GtkAdjustment))
40 #define GTK_ADJUSTMENT_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ADJUSTMENT, GtkAdjustmentClass))
41 #define GTK_IS_ADJUSTMENT(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ADJUSTMENT))
42 #define GTK_IS_ADJUSTMENT_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ADJUSTMENT))
43 #define GTK_ADJUSTMENT_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ADJUSTMENT, GtkAdjustmentClass))
44
45
46 typedef struct _GtkAdjustment       GtkAdjustment;
47 typedef struct _GtkAdjustmentClass  GtkAdjustmentClass;
48
49 struct _GtkAdjustment
50 {
51   GInitiallyUnowned parent_instance;
52
53   gdouble GSEAL (lower);
54   gdouble GSEAL (upper);
55   gdouble GSEAL (value);
56   gdouble GSEAL (step_increment);
57   gdouble GSEAL (page_increment);
58   gdouble GSEAL (page_size);
59 };
60
61 struct _GtkAdjustmentClass
62 {
63   GInitiallyUnownedClass parent_class;
64
65   void (* changed)       (GtkAdjustment *adjustment);
66   void (* value_changed) (GtkAdjustment *adjustment);
67
68   /* Padding for future expansion */
69   void (*_gtk_reserved1) (void);
70   void (*_gtk_reserved2) (void);
71   void (*_gtk_reserved3) (void);
72   void (*_gtk_reserved4) (void);
73 };
74
75
76 GType      gtk_adjustment_get_type              (void) G_GNUC_CONST;
77 GObject*   gtk_adjustment_new                   (gdouble          value,
78                                                  gdouble          lower,
79                                                  gdouble          upper,
80                                                  gdouble          step_increment,
81                                                  gdouble          page_increment,
82                                                  gdouble          page_size);
83
84 void       gtk_adjustment_changed               (GtkAdjustment   *adjustment);
85 void       gtk_adjustment_value_changed         (GtkAdjustment   *adjustment);
86 void       gtk_adjustment_clamp_page            (GtkAdjustment   *adjustment,
87                                                  gdouble          lower,
88                                                  gdouble          upper);
89
90 gdouble    gtk_adjustment_get_value             (GtkAdjustment   *adjustment);
91 void       gtk_adjustment_set_value             (GtkAdjustment   *adjustment,
92                                                  gdouble          value);
93 gdouble    gtk_adjustment_get_lower             (GtkAdjustment   *adjustment);
94 void       gtk_adjustment_set_lower             (GtkAdjustment   *adjustment,
95                                                  gdouble          lower);
96 gdouble    gtk_adjustment_get_upper             (GtkAdjustment   *adjustment);
97 void       gtk_adjustment_set_upper             (GtkAdjustment   *adjustment,
98                                                  gdouble          upper);
99 gdouble    gtk_adjustment_get_step_increment    (GtkAdjustment   *adjustment);
100 void       gtk_adjustment_set_step_increment    (GtkAdjustment   *adjustment,
101                                                  gdouble          step_increment);
102 gdouble    gtk_adjustment_get_page_increment    (GtkAdjustment   *adjustment);
103 void       gtk_adjustment_set_page_increment    (GtkAdjustment   *adjustment,
104                                                  gdouble          page_increment);
105 gdouble    gtk_adjustment_get_page_size         (GtkAdjustment   *adjustment);
106 void       gtk_adjustment_set_page_size         (GtkAdjustment   *adjustment,
107                                                  gdouble          page_size);
108
109 void       gtk_adjustment_configure             (GtkAdjustment   *adjustment,
110                                                  gdouble          value,
111                                                  gdouble          lower,
112                                                  gdouble          upper,
113                                                  gdouble          step_increment,
114                                                  gdouble          page_increment,
115                                                  gdouble          page_size);
116
117 G_END_DECLS
118
119 #endif /* __GTK_ADJUSTMENT_H__ */