gntprogressbar.h

Go to the documentation of this file.
00001 
00005 /*
00006  * GNT - The GLib Ncurses Toolkit
00007  *
00008  * GNT is the legal property of its developers, whose names are too numerous
00009  * to list here.  Please refer to the COPYRIGHT file distributed with this
00010  * source distribution.
00011  *
00012  * This library is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 2 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * This program is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program; if not, write to the Free Software
00024  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
00025  */
00026 
00027 #ifndef GNT_PROGRESS_BAR_H
00028 #define GNT_PROGRESS_BAR_H
00029 
00030 #include "gnt.h"
00031 #include "gntwidget.h"
00032 
00033 #define GNT_TYPE_PROGRESS_BAR          (gnt_progress_bar_get_type ())
00034 #define GNT_PROGRESS_BAR(o)            (G_TYPE_CHECK_INSTANCE_CAST ((o), GNT_TYPE_PROGRESS_BAR, GntProgressBar))
00035 #define GNT_PROGRESS_BAR_CLASS(k)      (G_TYPE_CHECK_CLASS_CAST ((k), GNT_TYPE_PROGRESS_BAR, GntProgressBarClass))
00036 #define GNT_IS_PROGRESS_BAR(o)         (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNT_TYPE_PROGRESS_BAR))
00037 #define GNT_IS_PROGRESS_BAR_CLASS(k)   (G_TYPE_CHECK_CLASS_TYPE ((k), GNT_TYPE_PROGRESS_BAR))
00038 #define GNT_PROGRESS_BAR_GET_CLASS(o)  (G_TYPE_INSTANCE_GET_CLASS ((o), GNT_TYPE_PROGRESS_BAR, GntProgressBarClass))
00039 
00040 typedef enum _GntProgressBarOrientation
00041 {
00042    GNT_PROGRESS_LEFT_TO_RIGHT,
00043    GNT_PROGRESS_RIGHT_TO_LEFT,
00044    GNT_PROGRESS_BOTTOM_TO_TOP,
00045    GNT_PROGRESS_TOP_TO_BOTTOM,
00046 } GntProgressBarOrientation;
00047 
00048 typedef struct _GntProgressBar GntProgressBar;
00049 
00050 typedef struct _GntProgressBarClass
00051 {
00052    GntWidgetClass parent;
00053 
00054    void (*gnt_reserved1)(void);
00055    void (*gnt_reserved2)(void);
00056    void (*gnt_reserved3)(void);
00057    void (*gnt_reserved4)(void);
00058 } GntProgressBarClass;
00059 
00060 G_BEGIN_DECLS
00061 
00066 GType
00067 gnt_progress_bar_get_type (void);
00068 
00073 GntWidget *
00074 gnt_progress_bar_new (void);
00075 
00082 void
00083 gnt_progress_bar_set_fraction (GntProgressBar *pbar, gdouble fraction);
00084 
00091 void
00092 gnt_progress_bar_set_orientation (GntProgressBar *pbar, GntProgressBarOrientation orientation);
00093 
00100 void
00101 gnt_progress_bar_set_show_progress (GntProgressBar *pbar, gboolean show);
00102 
00109 gdouble
00110 gnt_progress_bar_get_fraction (GntProgressBar *pbar);
00111 
00118 GntProgressBarOrientation
00119 gnt_progress_bar_get_orientation (GntProgressBar *pbar);
00120 
00127 gboolean
00128 gnt_progress_bar_get_show_progress (GntProgressBar *pbar);
00129 
00130 G_END_DECLS
00131 
00132 #endif /* GNT_PROGRESS_BAR_H */