1/* GTK - The GIMP Toolkit
2 * Copyright © 2012 Red Hat, Inc.
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 * Author: Cosimo Cecchi <[email protected]>
18 *
19 */
20
21#ifndef __GTK_LEVEL_BAR_H__
22#define __GTK_LEVEL_BAR_H__
23
24#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
25#error "Only <gtk/gtk.h> can be included directly."
26#endif
27
28#include <gtk/gtkwidget.h>
29
30G_BEGIN_DECLS
31
32#define GTK_TYPE_LEVEL_BAR (gtk_level_bar_get_type ())
33#define GTK_LEVEL_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_LEVEL_BAR, GtkLevelBar))
34#define GTK_LEVEL_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_LEVEL_BAR, GtkLevelBarClass))
35#define GTK_IS_LEVEL_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_LEVEL_BAR))
36#define GTK_IS_LEVEL_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LEVEL_BAR))
37#define GTK_LEVEL_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_LEVEL_BAR, GtkLevelBarClass))
38
39/**
40 * GTK_LEVEL_BAR_OFFSET_LOW:
41 *
42 * The name used for the stock low offset included by #GtkLevelBar.
43 *
44 * Since: 3.6
45 */
46#define GTK_LEVEL_BAR_OFFSET_LOW "low"
47
48/**
49 * GTK_LEVEL_BAR_OFFSET_HIGH:
50 *
51 * The name used for the stock high offset included by #GtkLevelBar.
52 *
53 * Since: 3.6
54 */
55#define GTK_LEVEL_BAR_OFFSET_HIGH "high"
56
57/**
58 * GTK_LEVEL_BAR_OFFSET_FULL:
59 *
60 * The name used for the stock full offset included by #GtkLevelBar.
61 *
62 * Since: 3.20
63 */
64#define GTK_LEVEL_BAR_OFFSET_FULL "full"
65
66typedef struct _GtkLevelBarClass GtkLevelBarClass;
67typedef struct _GtkLevelBar GtkLevelBar;
68typedef struct _GtkLevelBarPrivate GtkLevelBarPrivate;
69
70struct _GtkLevelBar {
71 /*< private >*/
72 GtkWidget parent;
73
74 GtkLevelBarPrivate *priv;
75};
76
77struct _GtkLevelBarClass {
78 /*< private >*/
79 GtkWidgetClass parent_class;
80
81 void (* offset_changed) (GtkLevelBar *self,
82 const gchar *name);
83
84 /* padding for future class expansion */
85 gpointer padding[16];
86};
87
88GDK_AVAILABLE_IN_3_6
89GType gtk_level_bar_get_type (void) G_GNUC_CONST;
90
91GDK_AVAILABLE_IN_3_6
92GtkWidget *gtk_level_bar_new (void);
93
94GDK_AVAILABLE_IN_3_6
95GtkWidget *gtk_level_bar_new_for_interval (gdouble min_value,
96 gdouble max_value);
97
98GDK_AVAILABLE_IN_3_6
99void gtk_level_bar_set_mode (GtkLevelBar *self,
100 GtkLevelBarMode mode);
101GDK_AVAILABLE_IN_3_6
102GtkLevelBarMode gtk_level_bar_get_mode (GtkLevelBar *self);
103
104GDK_AVAILABLE_IN_3_6
105void gtk_level_bar_set_value (GtkLevelBar *self,
106 gdouble value);
107GDK_AVAILABLE_IN_3_6
108gdouble gtk_level_bar_get_value (GtkLevelBar *self);
109
110GDK_AVAILABLE_IN_3_6
111void gtk_level_bar_set_min_value (GtkLevelBar *self,
112 gdouble value);
113GDK_AVAILABLE_IN_3_6
114gdouble gtk_level_bar_get_min_value (GtkLevelBar *self);
115
116GDK_AVAILABLE_IN_3_6
117void gtk_level_bar_set_max_value (GtkLevelBar *self,
118 gdouble value);
119GDK_AVAILABLE_IN_3_6
120gdouble gtk_level_bar_get_max_value (GtkLevelBar *self);
121
122GDK_AVAILABLE_IN_3_8
123void gtk_level_bar_set_inverted (GtkLevelBar *self,
124 gboolean inverted);
125
126GDK_AVAILABLE_IN_3_8
127gboolean gtk_level_bar_get_inverted (GtkLevelBar *self);
128
129GDK_AVAILABLE_IN_3_6
130void gtk_level_bar_add_offset_value (GtkLevelBar *self,
131 const gchar *name,
132 gdouble value);
133GDK_AVAILABLE_IN_3_6
134void gtk_level_bar_remove_offset_value (GtkLevelBar *self,
135 const gchar *name);
136GDK_AVAILABLE_IN_3_6
137gboolean gtk_level_bar_get_offset_value (GtkLevelBar *self,
138 const gchar *name,
139 gdouble *value);
140
141G_END_DECLS
142
143#endif /* __GTK_LEVEL_BAR_H__ */
144