/[paths]/src/egg_node.h
ViewVC logotype

Contents of /src/egg_node.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 72 - (show annotations)
Sun Aug 26 22:48:56 2012 UTC (6 years, 10 months ago) by ben
File MIME type: text/plain
File size: 1013 byte(s)
better structures for future
1 #ifndef EGG_NODE_H
2 #define EGG_NODE_H
3
4 #include <gtk/gtk.h>
5 #include "graph.h"
6
7 #define NODE_WIDTH 30
8 #define NODE_HEIGHT 30
9 /* object definition */
10 struct _EggNode
11 {
12 GtkDrawingArea parent;
13
14 /* private */
15 gdouble r;
16 gdouble g;
17 gdouble b;
18
19 gdouble x;
20 gdouble y;
21 gdouble dx;
22 gdouble dy;
23
24 struct event* event;
25 };
26
27 /* object class definition */
28 struct _EggNodeClass
29 {
30 GtkDrawingAreaClass parent_class;
31 };
32
33
34 typedef struct _EggNode EggNode;
35 typedef struct _EggNodeClass EggNodeClass;
36
37 /* public api */
38 GtkWidget *egg_node_new(void);
39
40 #define EGG_TYPE_NODE (egg_node_get_type ())
41 #define EGG_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_NODE, EggNode))
42 #define EGG_NODE_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), EGG_NODE, EggNodeClass))
43 #define EGG_IS_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_NODE))
44 #define EGG_IS_NODE_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), EGG_TYPE_NODE))
45 #define EGG_NODE_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_NODE, EggNodeClass))
46
47 #endif

  ViewVC Help
Powered by ViewVC 1.1.26