The Gnome Chemistry Utils  0.13.7
gcuperiodic.h
Go to the documentation of this file.
00001 // -*- C -*-
00002 
00003 /*
00004  * Gnome Chemisty Utils
00005  * gcuperiodic.h
00006  *
00007  * Copyright (C) 2002-2012 Jean Bréfort <jean.brefort@normalesup.org>
00008  *
00009  * This program is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU General Public License as
00011  * published by the Free Software Foundation; either version 3 of the
00012  * License, or (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
00022  * USA
00023  */
00024 
00025 #ifndef GCU_PERIODIC_H
00026 #define GCU_PERIODIC_H
00027 
00028 #include <gdk/gdk.h>
00029 #include <gtk/gtk.h>
00030 
00031 G_BEGIN_DECLS
00032 
00043 enum GcuPeriodicColorSchemes
00044 {
00045   GCU_PERIODIC_COLOR_NONE,
00046   GCU_PERIODIC_COLOR_DEFAULT,
00047   GCU_PERIODIC_COLOR_MAX,
00048 };
00049 
00053 enum GcuPeriodicTipSchemes
00054 {
00058         GCU_PERIODIC_TIP_NAME,
00063         GCU_PERIODIC_TIP_STANDARD
00064 };
00065 
00067 #define GCU_TYPE_PERIODIC                 (gcu_periodic_get_type ())
00068 
00073 #define GCU_PERIODIC(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCU_TYPE_PERIODIC, GcuPeriodic))
00074 
00078 #define GCU_PERIODIC_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), GCU_TYPE_PERIODIC, GcuPeriodicClass))
00079 
00082 #define GCU_IS_PERIODIC(obj)      (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCU_TYPE_PERIODIC))
00083 
00086 #define GCU_IS_PERIODIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCU_TYPE_PERIODIC))
00087 
00091 #define GCU_PERIODIC_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GCU_TYPE_PERIODIC, GcuPeriodicClass))
00092 
00094 typedef struct _GcuPeriodic       GcuPeriodic;
00096 typedef struct _GcuPeriodicClass  GcuPeriodicClass;
00097 
00140 typedef void (*GcuPeriodicColorFunc) (int, GdkRGBA*, gpointer);
00141 
00143 GType               gcu_periodic_get_type          (void) G_GNUC_CONST;
00145 GtkWidget*            gcu_periodic_new               (void);
00146 
00155 guint                           gcu_periodic_get_element                (GcuPeriodic* periodic);
00164 void                            gcu_periodic_set_element                (GcuPeriodic* periodic, guint element);
00165 
00176 int                                     gcu_periodic_add_color_scheme   (GcuPeriodic *periodic,
00177                                                                                         GcuPeriodicColorFunc func,
00178                                                                                         GtkWidget *extra_widget,
00179                                                                                 gpointer user_data);
00180 
00187 void                            gcu_periodic_set_colors (GcuPeriodic *periodic);
00188 
00196 void                            gcu_periodic_set_tips (GcuPeriodic *periodic, unsigned scheme);
00197 
00198 G_END_DECLS
00199 
00200 #endif //GCU_PERIODIC_H