| 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 | GDK_AVAILABLE_IN_ALL |
| 77 | GType gtk_adjustment_get_type (void) G_GNUC_CONST; |
| 78 | GDK_AVAILABLE_IN_ALL |
| 79 | GtkAdjustment* gtk_adjustment_new (gdouble value, |
| 80 | gdouble lower, |
| 81 | gdouble upper, |
| 82 | gdouble step_increment, |
| 83 | gdouble page_increment, |
| 84 | gdouble page_size); |
| 85 | |
| 86 | GDK_DEPRECATED_IN_3_18 |
| 87 | void gtk_adjustment_changed (GtkAdjustment *adjustment); |
| 88 | GDK_DEPRECATED_IN_3_18 |
| 89 | void gtk_adjustment_value_changed (GtkAdjustment *adjustment); |
| 90 | GDK_AVAILABLE_IN_ALL |
| 91 | void gtk_adjustment_clamp_page (GtkAdjustment *adjustment, |
| 92 | gdouble lower, |
| 93 | gdouble upper); |
| 94 | |
| 95 | GDK_AVAILABLE_IN_ALL |
| 96 | gdouble gtk_adjustment_get_value (GtkAdjustment *adjustment); |
| 97 | GDK_AVAILABLE_IN_ALL |
| 98 | void gtk_adjustment_set_value (GtkAdjustment *adjustment, |
| 99 | gdouble value); |
| 100 | GDK_AVAILABLE_IN_ALL |
| 101 | gdouble gtk_adjustment_get_lower (GtkAdjustment *adjustment); |
| 102 | GDK_AVAILABLE_IN_ALL |
| 103 | void gtk_adjustment_set_lower (GtkAdjustment *adjustment, |
| 104 | gdouble lower); |
| 105 | GDK_AVAILABLE_IN_ALL |
| 106 | gdouble gtk_adjustment_get_upper (GtkAdjustment *adjustment); |
| 107 | GDK_AVAILABLE_IN_ALL |
| 108 | void gtk_adjustment_set_upper (GtkAdjustment *adjustment, |
| 109 | gdouble upper); |
| 110 | GDK_AVAILABLE_IN_ALL |
| 111 | gdouble gtk_adjustment_get_step_increment (GtkAdjustment *adjustment); |
| 112 | GDK_AVAILABLE_IN_ALL |
| 113 | void gtk_adjustment_set_step_increment (GtkAdjustment *adjustment, |
| 114 | gdouble step_increment); |
| 115 | GDK_AVAILABLE_IN_ALL |
| 116 | gdouble gtk_adjustment_get_page_increment (GtkAdjustment *adjustment); |
| 117 | GDK_AVAILABLE_IN_ALL |
| 118 | void gtk_adjustment_set_page_increment (GtkAdjustment *adjustment, |
| 119 | gdouble page_increment); |
| 120 | GDK_AVAILABLE_IN_ALL |
| 121 | gdouble gtk_adjustment_get_page_size (GtkAdjustment *adjustment); |
| 122 | GDK_AVAILABLE_IN_ALL |
| 123 | void gtk_adjustment_set_page_size (GtkAdjustment *adjustment, |
| 124 | gdouble page_size); |
| 125 | |
| 126 | GDK_AVAILABLE_IN_ALL |
| 127 | void 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); |
| 134 | GDK_AVAILABLE_IN_3_2 |
| 135 | gdouble gtk_adjustment_get_minimum_increment (GtkAdjustment *adjustment); |
| 136 | |
| 137 | G_END_DECLS |
| 138 | |
| 139 | #endif /* __GTK_ADJUSTMENT_H__ */ |
| 140 | |