gntprogressbar.h
Go to the documentation of this file.
1 
5 /*
6  * GNT - The GLib Ncurses Toolkit
7  *
8  * GNT is the legal property of its developers, whose names are too numerous
9  * to list here. Please refer to the COPYRIGHT file distributed with this
10  * source distribution.
11  *
12  * This library is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25  */
26 
27 #ifndef GNT_PROGRESS_BAR_H
28 #define GNT_PROGRESS_BAR_H
29 
30 #include "gnt.h"
31 #include "gntwidget.h"
32 
33 #define GNT_TYPE_PROGRESS_BAR (gnt_progress_bar_get_type ())
34 #define GNT_PROGRESS_BAR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNT_TYPE_PROGRESS_BAR, GntProgressBar))
35 #define GNT_PROGRESS_BAR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNT_TYPE_PROGRESS_BAR, GntProgressBarClass))
36 #define GNT_IS_PROGRESS_BAR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNT_TYPE_PROGRESS_BAR))
37 #define GNT_IS_PROGRESS_BAR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNT_TYPE_PROGRESS_BAR))
38 #define GNT_PROGRESS_BAR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GNT_TYPE_PROGRESS_BAR, GntProgressBarClass))
39 
40 typedef enum _GntProgressBarOrientation
41 {
42  GNT_PROGRESS_LEFT_TO_RIGHT,
43  GNT_PROGRESS_RIGHT_TO_LEFT,
44  GNT_PROGRESS_BOTTOM_TO_TOP,
45  GNT_PROGRESS_TOP_TO_BOTTOM,
46 } GntProgressBarOrientation;
47 
48 typedef struct _GntProgressBar GntProgressBar;
49 
50 typedef struct _GntProgressBarClass
51 {
52  GntWidgetClass parent;
53 
54  void (*gnt_reserved1)(void);
55  void (*gnt_reserved2)(void);
56  void (*gnt_reserved3)(void);
57  void (*gnt_reserved4)(void);
59 
60 G_BEGIN_DECLS
61 
66 GType
68 
73 GntWidget *
75 
82 void
83 gnt_progress_bar_set_fraction (GntProgressBar *pbar, gdouble fraction);
84 
91 void
92 gnt_progress_bar_set_orientation (GntProgressBar *pbar, GntProgressBarOrientation orientation);
93 
100 void
101 gnt_progress_bar_set_show_progress (GntProgressBar *pbar, gboolean show);
102 
109 gdouble
110 gnt_progress_bar_get_fraction (GntProgressBar *pbar);
111 
118 GntProgressBarOrientation
119 gnt_progress_bar_get_orientation (GntProgressBar *pbar);
120 
127 gboolean
128 gnt_progress_bar_get_show_progress (GntProgressBar *pbar);
129 
130 G_END_DECLS
131 
132 #endif /* GNT_PROGRESS_BAR_H */
Widget API.
GNT API.
void gnt_progress_bar_set_orientation(GntProgressBar *pbar, GntProgressBarOrientation orientation)
Set the orientation for a progress bar.
void gnt_progress_bar_set_show_progress(GntProgressBar *pbar, gboolean show)
Controls whether the progress value is shown.
GntProgressBarOrientation gnt_progress_bar_get_orientation(GntProgressBar *pbar)
Get the orientation for the progress bar.
G_BEGIN_DECLS GType gnt_progress_bar_get_type(void)
Get the GType for GntProgressBar.
GntWidget * gnt_progress_bar_new(void)
Create a new GntProgressBar.
void gnt_progress_bar_set_fraction(GntProgressBar *pbar, gdouble fraction)
Set the progress for a progress bar.
gdouble gnt_progress_bar_get_fraction(GntProgressBar *pbar)
Get the progress that is displayed.
gboolean gnt_progress_bar_get_show_progress(GntProgressBar *pbar)
Get a boolean describing if the progress value is shown.