]> Pileus Git - ~andy/gtk/blob - gtk/gtkadjustment.h
stylecontext: Do invalidation on first resize container
[~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, see <http://www.gnu.org/licenses/>.
16  */
17
18 /*
19  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
20  * file for a list of people on the GTK+ Team.  See the ChangeLog
21  * files for a list of changes.  These files are distributed with
22  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
23  */
24
25 #ifndef __GTK_ADJUSTMENT_H__
26 #define __GTK_ADJUSTMENT_H__
27
28 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
29 #error "Only <gtk/gtk.h> can be included directly."
30 #endif
31
32 #include <gdk/gdk.h>
33 #include <gtk/gtktypes.h>
34
35 G_BEGIN_DECLS
36
37 #define GTK_TYPE_ADJUSTMENT                  (gtk_adjustment_get_type ())
38 #define GTK_ADJUSTMENT(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ADJUSTMENT, GtkAdjustment))
39 #define GTK_ADJUSTMENT_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ADJUSTMENT, GtkAdjustmentClass))
40 #define GTK_IS_ADJUSTMENT(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ADJUSTMENT))
41 #define GTK_IS_ADJUSTMENT_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ADJUSTMENT))
42 #define GTK_ADJUSTMENT_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ADJUSTMENT, GtkAdjustmentClass))
43
44
45 typedef struct _GtkAdjustmentPrivate  GtkAdjustmentPrivate;
46 typedef struct _GtkAdjustmentClass    GtkAdjustmentClass;
47
48 /**
49  * GtkAdjustment:
50  *
51  * The #GtkAdjustment struct contains only private fields and
52  * should not be directly accessed.
53  */
54 struct _GtkAdjustment
55 {
56   GInitiallyUnowned parent_instance;
57
58   GtkAdjustmentPrivate *priv;
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 GtkAdjustment*   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 GDK_AVAILABLE_IN_3_2
117 gdouble    gtk_adjustment_get_minimum_increment (GtkAdjustment   *adjustment);
118
119 G_END_DECLS
120
121 #endif /* __GTK_ADJUSTMENT_H__ */