gtkledbar.h

Go to the documentation of this file.
00001 /*
00002  * $Id: gtkledbar.h,v 1.1.1.1 2002/11/03 00:51:52 zahl Exp $
00003  * GTKEXT - Extensions to The GIMP Toolkit
00004  * Copyright (C) 1998 Gregory McLean
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public
00017  * License along with this library; if not, write to the Free
00018  * Software Foundation, Inc., 59 Temple Place - Suite 330, Cambridge, MA 
00019  * 02139, USA.
00020  *
00021  * Eye candy!
00022  */
00023 #ifndef __GTKLEDBAR_H__
00024 #define __GTKLEDBAR_H__
00025 
00026 #include <gdk/gdk.h>
00027 #include <gtk/gtkvbox.h>
00028 #include "gtkled.h"
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00034 #define LEDBAR(obj)          GTK_CHECK_CAST (obj, led_bar_get_type (), LedBar)
00035 #define LEDBAR_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, led_bar_get_type (), LedBarClass)
00036 #define IS_LEDBAR(obj)       GTK_CHECK_TYPE (obj, led_bar_get_type ())
00037 
00038 #define MAX_SEGMENTS         64
00039 
00040 typedef struct _LedBar       LedBar;
00041 typedef struct _LedBarClass  LedBarClass;
00042 
00043 struct _LedBar
00044 {
00045   GtkVBox   vbox;
00046 
00047   GtkWidget *segments[MAX_SEGMENTS];
00048   gint      num_segments;         /* How many segmanets in this bar */
00049   gint      lit_segments;         /* last segment that is lit */
00050   gint      seq_segment;          /* which led in the sequence we are at */
00051   gint      seq_dir;              /* direction */
00052   gint      orientation;          /* horizontal (0), or vertical (1) */
00053 };
00054 
00055 struct _LedBarClass
00056 {
00057   GtkVBoxClass   parent_class;
00058 };
00059 
00060 guint         led_bar_get_type            (void);
00061 GtkWidget*    led_bar_new                 (gint       segments,
00062                                            gint       orientation);
00063 GtkWidget*    led_bar_new_with_decades    (gint       segments, gint decades, gint firstdecade,
00064                                            gint       orientation);
00065 gint          led_bar_get_num_segments    (GtkWidget  *bar);
00066 void          led_bar_light_segments      (GtkWidget  *bar,
00067                                            gint       num);
00068 void          led_bar_unlight_segments    (GtkWidget  *bar,
00069                                            gint       num);
00070 void          led_bar_light_segment       (GtkWidget  *bar,
00071                                            gint       segment);
00072 void          led_bar_unlight_segment     (GtkWidget  *bar,
00073                                            gint       segment);
00074 void          led_bar_light_percent       (GtkWidget  *bar,
00075                                            gfloat     percent);
00076 void          led_bar_sequence_step       (GtkWidget  *bar);
00077 void          led_bar_clear               (GtkWidget  *bar);
00078 
00079 #ifdef __cplusplus
00080 }
00081 #endif
00082 
00083 #endif
00084 
00085 /* EOF */
00086 

Generated on Sat Apr 1 09:04:12 2006 for GXSM by  doxygen 1.4.6