gtkadjustment.h 5.86 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 46
typedef struct _GtkAdjustmentPrivate  GtkAdjustmentPrivate;
typedef struct _GtkAdjustmentClass    GtkAdjustmentClass;
Elliot Lee's avatar
Elliot Lee committed
47

48 49 50
/**
 * GtkAdjustment:
 *
51
 * The #GtkAdjustment-struct contains only private fields and
Matthias Clasen's avatar
Matthias Clasen committed
52
 * should not be directly accessed.
53
 */
Elliot Lee's avatar
Elliot Lee committed
54 55
struct _GtkAdjustment
{
56
  GInitiallyUnowned parent_instance;
57

58
  GtkAdjustmentPrivate *priv;
Elliot Lee's avatar
Elliot Lee committed
59 60 61 62
};

struct _GtkAdjustmentClass
{
63
  GInitiallyUnownedClass parent_class;
64

Matthias Clasen's avatar
Matthias Clasen committed
65
  void (* changed)       (GtkAdjustment *adjustment);
Elliot Lee's avatar
Elliot Lee committed
66
  void (* value_changed) (GtkAdjustment *adjustment);
67

68 69 70 71 72
  /* 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
73 74 75
};


76
GDK_AVAILABLE_IN_ALL
Matthias Clasen's avatar
Matthias Clasen committed
77
GType      gtk_adjustment_get_type              (void) G_GNUC_CONST;
78
GDK_AVAILABLE_IN_ALL
Matthias Clasen's avatar
Matthias Clasen committed
79 80 81 82 83 84
GtkAdjustment*   gtk_adjustment_new             (gdouble          value,
                                                 gdouble          lower,
                                                 gdouble          upper,
                                                 gdouble          step_increment,
                                                 gdouble          page_increment,
                                                 gdouble          page_size);
85

Matthias Clasen's avatar
Matthias Clasen committed
86
GDK_DEPRECATED_IN_3_18
Matthias Clasen's avatar
Matthias Clasen committed
87
void       gtk_adjustment_changed               (GtkAdjustment   *adjustment);
Matthias Clasen's avatar
Matthias Clasen committed
88
GDK_DEPRECATED_IN_3_18
Matthias Clasen's avatar
Matthias Clasen committed
89
void       gtk_adjustment_value_changed         (GtkAdjustment   *adjustment);
90
GDK_AVAILABLE_IN_ALL
Matthias Clasen's avatar
Matthias Clasen committed
91 92 93
void       gtk_adjustment_clamp_page            (GtkAdjustment   *adjustment,
                                                 gdouble          lower,
                                                 gdouble          upper);
94

95
GDK_AVAILABLE_IN_ALL
Matthias Clasen's avatar
Matthias Clasen committed
96
gdouble    gtk_adjustment_get_value             (GtkAdjustment   *adjustment);
97
GDK_AVAILABLE_IN_ALL
Matthias Clasen's avatar
Matthias Clasen committed
98 99
void       gtk_adjustment_set_value             (GtkAdjustment   *adjustment,
                                                 gdouble          value);
100
GDK_AVAILABLE_IN_ALL
101
gdouble    gtk_adjustment_get_lower             (GtkAdjustment   *adjustment);
102
GDK_AVAILABLE_IN_ALL
103 104
void       gtk_adjustment_set_lower             (GtkAdjustment   *adjustment,
                                                 gdouble          lower);
105
GDK_AVAILABLE_IN_ALL
106
gdouble    gtk_adjustment_get_upper             (GtkAdjustment   *adjustment);
107
GDK_AVAILABLE_IN_ALL
108 109
void       gtk_adjustment_set_upper             (GtkAdjustment   *adjustment,
                                                 gdouble          upper);
110
GDK_AVAILABLE_IN_ALL
111
gdouble    gtk_adjustment_get_step_increment    (GtkAdjustment   *adjustment);
112
GDK_AVAILABLE_IN_ALL
113 114
void       gtk_adjustment_set_step_increment    (GtkAdjustment   *adjustment,
                                                 gdouble          step_increment);
115
GDK_AVAILABLE_IN_ALL
116
gdouble    gtk_adjustment_get_page_increment    (GtkAdjustment   *adjustment);
117
GDK_AVAILABLE_IN_ALL
118 119
void       gtk_adjustment_set_page_increment    (GtkAdjustment   *adjustment,
                                                 gdouble          page_increment);
120
GDK_AVAILABLE_IN_ALL
121
gdouble    gtk_adjustment_get_page_size         (GtkAdjustment   *adjustment);
122
GDK_AVAILABLE_IN_ALL
123 124 125
void       gtk_adjustment_set_page_size         (GtkAdjustment   *adjustment,
                                                 gdouble          page_size);

126
GDK_AVAILABLE_IN_ALL
127 128
void       gtk_adjustment_configure             (GtkAdjustment   *adjustment,
                                                 gdouble          value,
Matthias Clasen's avatar
Matthias Clasen committed
129 130 131 132 133
                                                 gdouble          lower,
                                                 gdouble          upper,
                                                 gdouble          step_increment,
                                                 gdouble          page_increment,
                                                 gdouble          page_size);
134
GDK_AVAILABLE_IN_3_2
135 136
gdouble    gtk_adjustment_get_minimum_increment (GtkAdjustment   *adjustment);

137
G_END_DECLS
Elliot Lee's avatar
Elliot Lee committed
138 139

#endif /* __GTK_ADJUSTMENT_H__ */