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 | |
30 | G_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 | |
66 | typedef struct _GtkLevelBarClass GtkLevelBarClass; |
67 | typedef struct _GtkLevelBar GtkLevelBar; |
68 | typedef struct _GtkLevelBarPrivate GtkLevelBarPrivate; |
69 | |
70 | struct _GtkLevelBar { |
71 | /*< private >*/ |
72 | GtkWidget parent; |
73 | |
74 | GtkLevelBarPrivate *priv; |
75 | }; |
76 | |
77 | struct _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 | |
88 | GDK_AVAILABLE_IN_3_6 |
89 | GType gtk_level_bar_get_type (void) G_GNUC_CONST; |
90 | |
91 | GDK_AVAILABLE_IN_3_6 |
92 | GtkWidget *gtk_level_bar_new (void); |
93 | |
94 | GDK_AVAILABLE_IN_3_6 |
95 | GtkWidget *gtk_level_bar_new_for_interval (gdouble min_value, |
96 | gdouble max_value); |
97 | |
98 | GDK_AVAILABLE_IN_3_6 |
99 | void gtk_level_bar_set_mode (GtkLevelBar *self, |
100 | GtkLevelBarMode mode); |
101 | GDK_AVAILABLE_IN_3_6 |
102 | GtkLevelBarMode gtk_level_bar_get_mode (GtkLevelBar *self); |
103 | |
104 | GDK_AVAILABLE_IN_3_6 |
105 | void gtk_level_bar_set_value (GtkLevelBar *self, |
106 | gdouble value); |
107 | GDK_AVAILABLE_IN_3_6 |
108 | gdouble gtk_level_bar_get_value (GtkLevelBar *self); |
109 | |
110 | GDK_AVAILABLE_IN_3_6 |
111 | void gtk_level_bar_set_min_value (GtkLevelBar *self, |
112 | gdouble value); |
113 | GDK_AVAILABLE_IN_3_6 |
114 | gdouble gtk_level_bar_get_min_value (GtkLevelBar *self); |
115 | |
116 | GDK_AVAILABLE_IN_3_6 |
117 | void gtk_level_bar_set_max_value (GtkLevelBar *self, |
118 | gdouble value); |
119 | GDK_AVAILABLE_IN_3_6 |
120 | gdouble gtk_level_bar_get_max_value (GtkLevelBar *self); |
121 | |
122 | GDK_AVAILABLE_IN_3_8 |
123 | void gtk_level_bar_set_inverted (GtkLevelBar *self, |
124 | gboolean inverted); |
125 | |
126 | GDK_AVAILABLE_IN_3_8 |
127 | gboolean gtk_level_bar_get_inverted (GtkLevelBar *self); |
128 | |
129 | GDK_AVAILABLE_IN_3_6 |
130 | void gtk_level_bar_add_offset_value (GtkLevelBar *self, |
131 | const gchar *name, |
132 | gdouble value); |
133 | GDK_AVAILABLE_IN_3_6 |
134 | void gtk_level_bar_remove_offset_value (GtkLevelBar *self, |
135 | const gchar *name); |
136 | GDK_AVAILABLE_IN_3_6 |
137 | gboolean gtk_level_bar_get_offset_value (GtkLevelBar *self, |
138 | const gchar *name, |
139 | gdouble *value); |
140 | |
141 | G_END_DECLS |
142 | |
143 | #endif /* __GTK_LEVEL_BAR_H__ */ |
144 | |