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
35G_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
45typedef struct _GtkAdjustmentPrivate GtkAdjustmentPrivate;
46typedef struct _GtkAdjustmentClass GtkAdjustmentClass;
47
48/**
49 * GtkAdjustment:
50 *
51 * The #GtkAdjustment-struct contains only private fields and
52 * should not be directly accessed.
53 */
54struct _GtkAdjustment
55{
56 GInitiallyUnowned parent_instance;
57
58 GtkAdjustmentPrivate *priv;
59};
60
61struct _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
76GDK_AVAILABLE_IN_ALL
77GType gtk_adjustment_get_type (void) G_GNUC_CONST;
78GDK_AVAILABLE_IN_ALL
79GtkAdjustment* gtk_adjustment_new (gdouble value,
80 gdouble lower,
81 gdouble upper,
82 gdouble step_increment,
83 gdouble page_increment,
84 gdouble page_size);
85
86GDK_DEPRECATED_IN_3_18
87void gtk_adjustment_changed (GtkAdjustment *adjustment);
88GDK_DEPRECATED_IN_3_18
89void gtk_adjustment_value_changed (GtkAdjustment *adjustment);
90GDK_AVAILABLE_IN_ALL
91void gtk_adjustment_clamp_page (GtkAdjustment *adjustment,
92 gdouble lower,
93 gdouble upper);
94
95GDK_AVAILABLE_IN_ALL
96gdouble gtk_adjustment_get_value (GtkAdjustment *adjustment);
97GDK_AVAILABLE_IN_ALL
98void gtk_adjustment_set_value (GtkAdjustment *adjustment,
99 gdouble value);
100GDK_AVAILABLE_IN_ALL
101gdouble gtk_adjustment_get_lower (GtkAdjustment *adjustment);
102GDK_AVAILABLE_IN_ALL
103void gtk_adjustment_set_lower (GtkAdjustment *adjustment,
104 gdouble lower);
105GDK_AVAILABLE_IN_ALL
106gdouble gtk_adjustment_get_upper (GtkAdjustment *adjustment);
107GDK_AVAILABLE_IN_ALL
108void gtk_adjustment_set_upper (GtkAdjustment *adjustment,
109 gdouble upper);
110GDK_AVAILABLE_IN_ALL
111gdouble gtk_adjustment_get_step_increment (GtkAdjustment *adjustment);
112GDK_AVAILABLE_IN_ALL
113void gtk_adjustment_set_step_increment (GtkAdjustment *adjustment,
114 gdouble step_increment);
115GDK_AVAILABLE_IN_ALL
116gdouble gtk_adjustment_get_page_increment (GtkAdjustment *adjustment);
117GDK_AVAILABLE_IN_ALL
118void gtk_adjustment_set_page_increment (GtkAdjustment *adjustment,
119 gdouble page_increment);
120GDK_AVAILABLE_IN_ALL
121gdouble gtk_adjustment_get_page_size (GtkAdjustment *adjustment);
122GDK_AVAILABLE_IN_ALL
123void gtk_adjustment_set_page_size (GtkAdjustment *adjustment,
124 gdouble page_size);
125
126GDK_AVAILABLE_IN_ALL
127void gtk_adjustment_configure (GtkAdjustment *adjustment,
128 gdouble value,
129 gdouble lower,
130 gdouble upper,
131 gdouble step_increment,
132 gdouble page_increment,
133 gdouble page_size);
134GDK_AVAILABLE_IN_3_2
135gdouble gtk_adjustment_get_minimum_increment (GtkAdjustment *adjustment);
136
137G_END_DECLS
138
139#endif /* __GTK_ADJUSTMENT_H__ */
140