The Gnome Chemistry Utils  0.14.0
gcuperiodic.h
Go to the documentation of this file.
1 // -*- C -*-
2 
3 /*
4  * Gnome Chemisty Utils
5  * gcuperiodic.h
6  *
7  * Copyright (C) 2002-2012 Jean Bréfort <jean.brefort@normalesup.org>
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License as
11  * published by the Free Software Foundation; either version 3 of the
12  * License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
22  * USA
23  */
24 
25 #ifndef GCU_PERIODIC_H
26 #define GCU_PERIODIC_H
27 
28 #include <gdk/gdk.h>
29 #include <gtk/gtk.h>
30 
31 G_BEGIN_DECLS
32 
44 {
45  GCU_PERIODIC_COLOR_NONE,
46  GCU_PERIODIC_COLOR_DEFAULT,
47  GCU_PERIODIC_COLOR_MAX,
48 };
49 
54 {
64 };
65 
67 #define GCU_TYPE_PERIODIC (gcu_periodic_get_type ())
68 
73 #define GCU_PERIODIC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCU_TYPE_PERIODIC, GcuPeriodic))
74 
78 #define GCU_PERIODIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCU_TYPE_PERIODIC, GcuPeriodicClass))
79 
82 #define GCU_IS_PERIODIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCU_TYPE_PERIODIC))
83 
86 #define GCU_IS_PERIODIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCU_TYPE_PERIODIC))
87 
91 #define GCU_PERIODIC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCU_TYPE_PERIODIC, GcuPeriodicClass))
92 
94 typedef struct _GcuPeriodic GcuPeriodic;
96 typedef struct _GcuPeriodicClass GcuPeriodicClass;
97 
140 typedef void (*GcuPeriodicColorFunc) (int, GdkRGBA*, gpointer);
141 
143 GType gcu_periodic_get_type (void) G_GNUC_CONST;
145 GtkWidget* gcu_periodic_new (void);
146 
155 guint gcu_periodic_get_element (GcuPeriodic* periodic);
164 void gcu_periodic_set_element (GcuPeriodic* periodic, guint element);
165 
176 int gcu_periodic_add_color_scheme (GcuPeriodic *periodic,
178  GtkWidget *extra_widget,
179  gpointer user_data);
180 
187 void gcu_periodic_set_colors (GcuPeriodic *periodic);
188 
196 void gcu_periodic_set_tips (GcuPeriodic *periodic, unsigned scheme);
197 
198 G_END_DECLS
199 
200 #endif //GCU_PERIODIC_H