* Initial checkin.
[scdataviz] / graphwidget.h
1 /*
2 ** Graph.h
3 ** 
4 ** Made by Johnny Q. Hacker
5 ** Login   <solarion@johnathan>
6 ** 
7
8 Copyright (C) 2008 Joseph Pingenot
9
10 This program is free software: you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation, either version 3 of the License, or
13 (at your option) any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 GNU Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
23 ** Started on  Thu Jul 17 10:51:32 2008 Johnny Q. Hacker
24 ** Last update Thu Jul 17 10:51:32 2008 Johnny Q. Hacker
25 */
26
27 #ifndef         GRAPH_H_
28 # define        GRAPH_H_
29
30 #include <gtk/gtkdrawingarea.h>
31 #include <graph.h>
32
33 typedef struct _GraphWidget {
34   GtkDrawingArea parent;
35   Graph *graph;
36 } GraphWidget;
37
38 typedef struct _GraphWidgetClass {
39   GtkDrawingAreaClass parent_class;
40   
41 } GraphWidgetClass;
42
43 #define GRAPH_WIDGET_TYPE (graph_widget_get_type())
44 #define GRAPH_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GRAPH_WIDGET_TYPE, GraphWidget))
45 #define GRAPH_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GRAPH_WIDGET, GraphWidgetClass))
46 #define IS_GRAPH_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GRAPH_WIDGET_TYPE))
47 #define IS_GRAPH_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), GRAPH_WIDGET_CLASS_TYPE))
48 #define GRAPH_WIDGET_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), GRAPH_WIDGET, GraphWidgetClass))
49
50 GtkWidget* graph_widget_new(Graph* graph);
51
52 Graph* get_graph(GraphWidget* gw);
53
54 #endif      /* !GRAPH_H_ */