]> Pileus Git - ~andy/gtk/blob - gtk/gtkprogressbar.h
added args ::show_text, ::text_xalign, ::text_yalign, ::activity_mode.
[~andy/gtk] / gtk / gtkprogressbar.h
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 Library 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  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __GTK_PROGRESS_BAR_H__
21 #define __GTK_PROGRESS_BAR_H__
22
23
24 #include <gdk/gdk.h>
25 #include <gtk/gtkprogress.h>
26
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31
32
33 #define GTK_TYPE_PROGRESS_BAR            (gtk_progress_bar_get_type ())
34 #define GTK_PROGRESS_BAR(obj)            (GTK_CHECK_CAST ((obj), GTK_TYPE_PROGRESS_BAR, GtkProgressBar))
35 #define GTK_PROGRESS_BAR_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_PROGRESS_BAR, GtkProgressBarClass))
36 #define GTK_IS_PROGRESS_BAR(obj)         (GTK_CHECK_TYPE ((obj), GTK_TYPE_PROGRESS_BAR))
37 #define GTK_IS_PROGRESS_BAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PROGRESS_BAR))
38
39
40 typedef struct _GtkProgressBar       GtkProgressBar;
41 typedef struct _GtkProgressBarClass  GtkProgressBarClass;
42
43 typedef enum
44 {
45   GTK_PROGRESS_CONTINUOUS,
46   GTK_PROGRESS_DISCRETE
47 } GtkProgressBarStyle;
48
49 typedef enum
50 {
51   GTK_PROGRESS_LEFT_TO_RIGHT,
52   GTK_PROGRESS_RIGHT_TO_LEFT,
53   GTK_PROGRESS_BOTTOM_TO_TOP,
54   GTK_PROGRESS_TOP_TO_BOTTOM
55 } GtkProgressBarOrientation;
56
57 struct _GtkProgressBar
58 {
59   GtkProgress progress;
60
61   GtkProgressBarStyle bar_style;
62   GtkProgressBarOrientation orientation;
63
64   guint blocks;
65   gint  in_block;
66
67   gint  activity_pos;
68   guint activity_step;
69   guint activity_blocks;
70   guint activity_dir : 1;
71 };
72
73 struct _GtkProgressBarClass
74 {
75   GtkProgressClass parent_class;
76 };
77
78
79 GtkType    gtk_progress_bar_get_type             (void);
80 GtkWidget* gtk_progress_bar_new                  (void);
81 GtkWidget* gtk_progress_bar_new_with_adjustment  (GtkAdjustment  *adjustment);
82 void       gtk_progress_bar_set_bar_style        (GtkProgressBar *pbar,
83                                                   GtkProgressBarStyle style);
84 void       gtk_progress_bar_set_discrete_blocks  (GtkProgressBar *pbar,
85                                                   guint           blocks);
86 void       gtk_progress_bar_set_activity_step    (GtkProgressBar *pbar,
87                                                   guint           step);
88 void       gtk_progress_bar_set_activity_blocks  (GtkProgressBar *pbar,
89                                                   guint           blocks);
90 void       gtk_progress_bar_set_orientation      (GtkProgressBar *pbar,
91                                                   GtkProgressBarOrientation orientation);
92 void       gtk_progress_bar_update               (GtkProgressBar *pbar,
93                                                   gfloat          percentage);
94
95 /* deprecated */
96 void       gtk_progress_bar_construct            (GtkProgressBar *pbar,
97                                                   GtkAdjustment  *adjustment);
98
99
100 #ifdef __cplusplus
101 }
102 #endif /* __cplusplus */
103
104
105 #endif /* __GTK_PROGRESS_BAR_H__ */