gtkled.h

Go to the documentation of this file.
00001 /* GTK - The GIMP Toolkit
00002  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
00003  *
00004  * GtkLed: Emulate a simple LED (light emitting diode)
00005  * Copyright (C) 1997 Tim Janik
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Library General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Library General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Library General Public
00018  * License along with this library; if not, write to the Free
00019  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00020  */
00021 #ifndef __GTK_LED_H__
00022 #define __GTK_LED_H__
00023 
00024 
00025 #include <gdk/gdk.h>
00026 #include <gtk/gtkmisc.h>
00027 
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #pragma }
00032 #endif /* __cplusplus */
00033 
00034 
00035 #define GTK_LED(obj)          (GTK_CHECK_CAST (obj, gtk_led_get_type (), GtkLed))
00036 #define GTK_LED_CLASS(klass)  (GTK_CHECK_CLASS_CAST (klass, gtk_led_get_type (), GtkLedClass))
00037 #define GTK_IS_LED(obj)       (GTK_CHECK_TYPE (obj, gtk_led_get_type ()))
00038 
00039 
00040 typedef struct _GtkLed       GtkLed;
00041 typedef struct _GtkLedClass  GtkLedClass;
00042 
00043 struct _GtkLed
00044 {
00045   GtkMisc  misc;
00046   GdkColor fg[2];
00047   GdkColor bg[2];
00048 
00049   GdkGC    *gc;
00050 
00051   guint is_on;
00052 };
00053 
00054 struct _GtkLedClass
00055 {
00056   GtkMiscClass parent_class;
00057 };
00058 
00059 
00060 GtkType    gtk_led_get_type    (void);
00061 GtkWidget* gtk_led_new         (void);
00062 void       gtk_led_set_state   (GtkLed                  *led,
00063                                 GtkStateType            widget_state,
00064                                 gboolean                on_off);
00065 void       gtk_led_switch      (GtkLed                  *led,
00066                                 gboolean                on_off);
00067 gboolean   gtk_led_is_on       (GtkLed                  *led);
00068 void       gtk_led_set_colors  (GtkLed                  *led,
00069                                 GdkColor                *active,
00070                                 GdkColor                *inactive);
00071 
00072 
00073 
00074 
00075 
00076 #ifdef __cplusplus
00077 #pragma {
00078 }
00079 #endif /* __cplusplus */
00080 
00081 
00082 #endif /* __GTK_LED_H__ */

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