gtkadjustment.h 5.44 KB
Newer Older
Cody Russell's avatar
Cody Russell committed
1
/* GTK - The GIMP Toolkit
Elliot Lee's avatar
Elliot Lee committed
2
3
4
 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
 *
 * This library is free software; you can redistribute it and/or
5
 * modify it under the terms of the GNU Lesser General Public
Elliot Lee's avatar
Elliot Lee committed
6
7
8
9
10
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Matthias Clasen's avatar
Matthias Clasen committed
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
 * Lesser General Public License for more details.
Elliot Lee's avatar
Elliot Lee committed
13
 *
14
 * You should have received a copy of the GNU Lesser General Public
Javier Jardón's avatar
Javier Jardón committed
15
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
Elliot Lee's avatar
Elliot Lee committed
16
 */
17
18

/*
19
 * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
20
21
 * file for a list of people on the GTK+ Team.  See the ChangeLog
 * files for a list of changes.  These files are distributed with
22
 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
23
24
 */

25
26
27
#ifndef __GTK_ADJUSTMENT_H__
#define __GTK_ADJUSTMENT_H__

28
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
29
30
31
#error "Only <gtk/gtk.h> can be included directly."
#endif

32
#include <gdk/gdk.h>
33
#include <gtk/gtktypes.h>
Elliot Lee's avatar
Elliot Lee committed
34

35
G_BEGIN_DECLS
Elliot Lee's avatar
Elliot Lee committed
36

37
#define GTK_TYPE_ADJUSTMENT                  (gtk_adjustment_get_type ())
Manish Singh's avatar
Manish Singh committed
38
39
40
41
42
#define GTK_ADJUSTMENT(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ADJUSTMENT, GtkAdjustment))
#define GTK_ADJUSTMENT_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ADJUSTMENT, GtkAdjustmentClass))
#define GTK_IS_ADJUSTMENT(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ADJUSTMENT))
#define GTK_IS_ADJUSTMENT_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ADJUSTMENT))
#define GTK_ADJUSTMENT_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ADJUSTMENT, GtkAdjustmentClass))
Elliot Lee's avatar
Elliot Lee committed
43
44


45
typedef struct _GtkAdjustmentClass    GtkAdjustmentClass;
Elliot Lee's avatar
Elliot Lee committed
46
47
48

struct _GtkAdjustment
{
49
  GInitiallyUnowned parent_instance;
Elliot Lee's avatar
Elliot Lee committed
50
51
52
53
};

struct _GtkAdjustmentClass
{
54
  GInitiallyUnownedClass parent_class;
55

Matthias Clasen's avatar
Matthias Clasen committed
56
  void (* changed)       (GtkAdjustment *adjustment);
Elliot Lee's avatar
Elliot Lee committed
57
  void (* value_changed) (GtkAdjustment *adjustment);
58

59
60
61
62
63
  /* Padding for future expansion */
  void (*_gtk_reserved1) (void);
  void (*_gtk_reserved2) (void);
  void (*_gtk_reserved3) (void);
  void (*_gtk_reserved4) (void);
Elliot Lee's avatar
Elliot Lee committed
64
65
66
};


67
GDK_AVAILABLE_IN_ALL
Matthias Clasen's avatar
Matthias Clasen committed
68
GType      gtk_adjustment_get_type              (void) G_GNUC_CONST;
69
GDK_AVAILABLE_IN_ALL
70
71
72
73
74
75
GtkAdjustment*   gtk_adjustment_new             (double           value,
                                                 double           lower,
                                                 double           upper,
                                                 double           step_increment,
                                                 double           page_increment,
                                                 double           page_size);
76

77
GDK_AVAILABLE_IN_ALL
Matthias Clasen's avatar
Matthias Clasen committed
78
void       gtk_adjustment_clamp_page            (GtkAdjustment   *adjustment,
79
80
                                                 double           lower,
                                                 double           upper);
81

82
GDK_AVAILABLE_IN_ALL
83
double     gtk_adjustment_get_value             (GtkAdjustment   *adjustment);
84
GDK_AVAILABLE_IN_ALL
Matthias Clasen's avatar
Matthias Clasen committed
85
void       gtk_adjustment_set_value             (GtkAdjustment   *adjustment,
86
                                                 double           value);
87
GDK_AVAILABLE_IN_ALL
88
double     gtk_adjustment_get_lower             (GtkAdjustment   *adjustment);
89
GDK_AVAILABLE_IN_ALL
90
void       gtk_adjustment_set_lower             (GtkAdjustment   *adjustment,
91
                                                 double           lower);
92
GDK_AVAILABLE_IN_ALL
93
double     gtk_adjustment_get_upper             (GtkAdjustment   *adjustment);
94
GDK_AVAILABLE_IN_ALL
95
void       gtk_adjustment_set_upper             (GtkAdjustment   *adjustment,
96
                                                 double           upper);
97
GDK_AVAILABLE_IN_ALL
98
double     gtk_adjustment_get_step_increment    (GtkAdjustment   *adjustment);
99
GDK_AVAILABLE_IN_ALL
100
void       gtk_adjustment_set_step_increment    (GtkAdjustment   *adjustment,
101
                                                 double           step_increment);
102
GDK_AVAILABLE_IN_ALL
103
double     gtk_adjustment_get_page_increment    (GtkAdjustment   *adjustment);
104
GDK_AVAILABLE_IN_ALL
105
void       gtk_adjustment_set_page_increment    (GtkAdjustment   *adjustment,
106
                                                 double           page_increment);
107
GDK_AVAILABLE_IN_ALL
108
double     gtk_adjustment_get_page_size         (GtkAdjustment   *adjustment);
109
GDK_AVAILABLE_IN_ALL
110
void       gtk_adjustment_set_page_size         (GtkAdjustment   *adjustment,
111
                                                 double           page_size);
112

113
GDK_AVAILABLE_IN_ALL
114
void       gtk_adjustment_configure             (GtkAdjustment   *adjustment,
115
116
117
118
119
120
121
122
                                                 double           value,
                                                 double           lower,
                                                 double           upper,
                                                 double           step_increment,
                                                 double           page_increment,
                                                 double           page_size);
GDK_AVAILABLE_IN_ALL
double     gtk_adjustment_get_minimum_increment (GtkAdjustment   *adjustment);
123

124
G_END_DECLS
Elliot Lee's avatar
Elliot Lee committed
125
126

#endif /* __GTK_ADJUSTMENT_H__ */