summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ganv/box.h13
-rw-r--r--ganv/circle.h13
-rw-r--r--ganv/edge.h13
-rw-r--r--ganv/module.h13
-rw-r--r--ganv/node.h1
-rw-r--r--ganv/port.h13
-rw-r--r--ganv/text.h13
-rw-r--r--src/box.c3
-rw-r--r--src/circle.c3
-rw-r--r--src/edge.c4
-rw-r--r--src/module.c4
-rw-r--r--src/node.c4
-rw-r--r--src/port.c4
-rw-r--r--src/text.c4
14 files changed, 55 insertions, 50 deletions
diff --git a/ganv/box.h b/ganv/box.h
index 5961afd..84fcb8a 100644
--- a/ganv/box.h
+++ b/ganv/box.h
@@ -20,13 +20,12 @@
G_BEGIN_DECLS
-#define GANV_TYPE_BOX (ganv_box_get_type())
-#define GANV_BOX(obj) (GTK_CHECK_CAST((obj), GANV_TYPE_BOX, GanvBox))
-#define GANV_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), GANV_TYPE_BOX, GanvBoxClass))
-#define GANV_IS_BOX(obj) (GTK_CHECK_TYPE((obj), GANV_TYPE_BOX))
-#define GANV_IS_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_BOX))
-#define GANV_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_BOX, GanvBoxClass))
-#define GANV_BOX_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), GANV_TYPE_BOX, GanvBoxImpl))
+#define GANV_TYPE_BOX (ganv_box_get_type())
+#define GANV_BOX(obj) (GTK_CHECK_CAST((obj), GANV_TYPE_BOX, GanvBox))
+#define GANV_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), GANV_TYPE_BOX, GanvBoxClass))
+#define GANV_IS_BOX(obj) (GTK_CHECK_TYPE((obj), GANV_TYPE_BOX))
+#define GANV_IS_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_BOX))
+#define GANV_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_BOX, GanvBoxClass))
typedef struct _GanvBoxClass GanvBoxClass;
typedef struct _GanvBoxImpl GanvBoxImpl;
diff --git a/ganv/circle.h b/ganv/circle.h
index f02f475..b55fb44 100644
--- a/ganv/circle.h
+++ b/ganv/circle.h
@@ -20,13 +20,12 @@
G_BEGIN_DECLS
-#define GANV_TYPE_CIRCLE (ganv_circle_get_type())
-#define GANV_CIRCLE(obj) (GTK_CHECK_CAST((obj), GANV_TYPE_CIRCLE, GanvCircle))
-#define GANV_CIRCLE_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), GANV_TYPE_CIRCLE, GanvCircleClass))
-#define GANV_IS_CIRCLE(obj) (GTK_CHECK_TYPE((obj), GANV_TYPE_CIRCLE))
-#define GANV_IS_CIRCLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_CIRCLE))
-#define GANV_CIRCLE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_CIRCLE, GanvCircleClass))
-#define GANV_CIRCLE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), GANV_TYPE_CIRCLE, GanvCircleImpl))
+#define GANV_TYPE_CIRCLE (ganv_circle_get_type())
+#define GANV_CIRCLE(obj) (GTK_CHECK_CAST((obj), GANV_TYPE_CIRCLE, GanvCircle))
+#define GANV_CIRCLE_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), GANV_TYPE_CIRCLE, GanvCircleClass))
+#define GANV_IS_CIRCLE(obj) (GTK_CHECK_TYPE((obj), GANV_TYPE_CIRCLE))
+#define GANV_IS_CIRCLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_CIRCLE))
+#define GANV_CIRCLE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_CIRCLE, GanvCircleClass))
typedef struct _GanvCircle GanvCircle;
typedef struct _GanvCircleClass GanvCircleClass;
diff --git a/ganv/edge.h b/ganv/edge.h
index fa1b7b9..8e6c6cb 100644
--- a/ganv/edge.h
+++ b/ganv/edge.h
@@ -23,13 +23,12 @@
G_BEGIN_DECLS
-#define GANV_TYPE_EDGE (ganv_edge_get_type())
-#define GANV_EDGE(obj) (GTK_CHECK_CAST((obj), GANV_TYPE_EDGE, GanvEdge))
-#define GANV_EDGE_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), GANV_TYPE_EDGE, GanvEdgeClass))
-#define GANV_IS_EDGE(obj) (GTK_CHECK_TYPE((obj), GANV_TYPE_EDGE))
-#define GANV_IS_EDGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_EDGE))
-#define GANV_EDGE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_EDGE, GanvEdgeClass))
-#define GANV_EDGE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), GANV_TYPE_EDGE, GanvEdgeImpl))
+#define GANV_TYPE_EDGE (ganv_edge_get_type())
+#define GANV_EDGE(obj) (GTK_CHECK_CAST((obj), GANV_TYPE_EDGE, GanvEdge))
+#define GANV_EDGE_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), GANV_TYPE_EDGE, GanvEdgeClass))
+#define GANV_IS_EDGE(obj) (GTK_CHECK_TYPE((obj), GANV_TYPE_EDGE))
+#define GANV_IS_EDGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_EDGE))
+#define GANV_EDGE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_EDGE, GanvEdgeClass))
typedef struct _GanvEdgeClass GanvEdgeClass;
typedef struct _GanvEdgeImpl GanvEdgeImpl;
diff --git a/ganv/module.h b/ganv/module.h
index 7811504..4f8014d 100644
--- a/ganv/module.h
+++ b/ganv/module.h
@@ -23,13 +23,12 @@
G_BEGIN_DECLS
-#define GANV_TYPE_MODULE (ganv_module_get_type())
-#define GANV_MODULE(obj) (GTK_CHECK_CAST((obj), GANV_TYPE_MODULE, GanvModule))
-#define GANV_MODULE_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), GANV_TYPE_MODULE, GanvModuleClass))
-#define GANV_IS_MODULE(obj) (GTK_CHECK_TYPE((obj), GANV_TYPE_MODULE))
-#define GANV_IS_MODULE_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_MODULE))
-#define GANV_MODULE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_MODULE, GanvModuleClass))
-#define GANV_MODULE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), GANV_TYPE_MODULE, GanvModuleImpl))
+#define GANV_TYPE_MODULE (ganv_module_get_type())
+#define GANV_MODULE(obj) (GTK_CHECK_CAST((obj), GANV_TYPE_MODULE, GanvModule))
+#define GANV_MODULE_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), GANV_TYPE_MODULE, GanvModuleClass))
+#define GANV_IS_MODULE(obj) (GTK_CHECK_TYPE((obj), GANV_TYPE_MODULE))
+#define GANV_IS_MODULE_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_MODULE))
+#define GANV_MODULE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_MODULE, GanvModuleClass))
typedef struct _GanvModuleClass GanvModuleClass;
typedef struct _GanvModuleImpl GanvModuleImpl;
diff --git a/ganv/node.h b/ganv/node.h
index fb7dd4c..fb093cd 100644
--- a/ganv/node.h
+++ b/ganv/node.h
@@ -29,7 +29,6 @@ G_BEGIN_DECLS
#define GANV_IS_NODE(obj) (GTK_CHECK_TYPE((obj), GANV_TYPE_NODE))
#define GANV_IS_NODE_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_NODE))
#define GANV_NODE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_NODE, GanvNodeClass))
-#define GANV_NODE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), GANV_TYPE_NODE, GanvNodeImpl))
typedef struct _GanvNodeClass GanvNodeClass;
typedef struct _GanvNodeImpl GanvNodeImpl;
diff --git a/ganv/port.h b/ganv/port.h
index 1ae7673..8c3de24 100644
--- a/ganv/port.h
+++ b/ganv/port.h
@@ -22,13 +22,12 @@ struct _GanvModule;
G_BEGIN_DECLS
-#define GANV_TYPE_PORT (ganv_port_get_type())
-#define GANV_PORT(obj) (GTK_CHECK_CAST((obj), GANV_TYPE_PORT, GanvPort))
-#define GANV_PORT_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), GANV_TYPE_PORT, GanvPortClass))
-#define GANV_IS_PORT(obj) (GTK_CHECK_TYPE((obj), GANV_TYPE_PORT))
-#define GANV_IS_PORT_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_PORT))
-#define GANV_PORT_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_PORT, GanvPortClass))
-#define GANV_PORT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), GANV_TYPE_PORT, GanvPortImpl))
+#define GANV_TYPE_PORT (ganv_port_get_type())
+#define GANV_PORT(obj) (GTK_CHECK_CAST((obj), GANV_TYPE_PORT, GanvPort))
+#define GANV_PORT_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), GANV_TYPE_PORT, GanvPortClass))
+#define GANV_IS_PORT(obj) (GTK_CHECK_TYPE((obj), GANV_TYPE_PORT))
+#define GANV_IS_PORT_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_PORT))
+#define GANV_PORT_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_PORT, GanvPortClass))
typedef struct _GanvPortClass GanvPortClass;
typedef struct _GanvPortImpl GanvPortImpl;
diff --git a/ganv/text.h b/ganv/text.h
index 6926ab1..78b25ba 100644
--- a/ganv/text.h
+++ b/ganv/text.h
@@ -20,13 +20,12 @@
G_BEGIN_DECLS
-#define GANV_TYPE_TEXT (ganv_text_get_type())
-#define GANV_TEXT(obj) (GTK_CHECK_CAST((obj), GANV_TYPE_TEXT, GanvText))
-#define GANV_TEXT_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), GANV_TYPE_TEXT, GanvTextClass))
-#define GANV_IS_TEXT(obj) (GTK_CHECK_TYPE((obj), GANV_TYPE_TEXT))
-#define GANV_IS_TEXT_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_TEXT))
-#define GANV_TEXT_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_TEXT, GanvTextClass))
-#define GANV_TEXT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), GANV_TYPE_TEXT, GanvTextImpl))
+#define GANV_TYPE_TEXT (ganv_text_get_type())
+#define GANV_TEXT(obj) (GTK_CHECK_CAST((obj), GANV_TYPE_TEXT, GanvText))
+#define GANV_TEXT_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), GANV_TYPE_TEXT, GanvTextClass))
+#define GANV_IS_TEXT(obj) (GTK_CHECK_TYPE((obj), GANV_TYPE_TEXT))
+#define GANV_IS_TEXT_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_TEXT))
+#define GANV_TEXT_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_TEXT, GanvTextClass))
typedef struct _GanvText GanvText;
typedef struct _GanvTextClass GanvTextClass;
diff --git a/src/box.c b/src/box.c
index 2b4f5ef..a6cdb85 100644
--- a/src/box.c
+++ b/src/box.c
@@ -47,7 +47,8 @@ enum {
static void
ganv_box_init(GanvBox* box)
{
- box->impl = GANV_BOX_GET_PRIVATE(box);
+ box->impl = G_TYPE_INSTANCE_GET_PRIVATE(
+ box, GANV_TYPE_BOX, GanvBoxImpl);
memset(&box->impl->coords, '\0', sizeof(GanvBoxCoords));
box->impl->coords.border_width = box->node.impl->border_width;
diff --git a/src/circle.c b/src/circle.c
index c04e2d1..3c461c3 100644
--- a/src/circle.c
+++ b/src/circle.c
@@ -35,7 +35,8 @@ enum {
static void
ganv_circle_init(GanvCircle* circle)
{
- circle->impl = GANV_CIRCLE_GET_PRIVATE(circle);
+ circle->impl = G_TYPE_INSTANCE_GET_PRIVATE(
+ circle, GANV_TYPE_CIRCLE, GanvCircleImpl);
memset(&circle->impl->coords, '\0', sizeof(GanvCircleCoords));
circle->impl->coords.radius = 8.0;
diff --git a/src/edge.c b/src/edge.c
index 89c99fa..d2cbe5b 100644
--- a/src/edge.c
+++ b/src/edge.c
@@ -59,7 +59,9 @@ static GnomeCanvasItemClass* parent_class;
static void
ganv_edge_init(GanvEdge* edge)
{
- GanvEdgeImpl* impl = GANV_EDGE_GET_PRIVATE(edge);
+ GanvEdgeImpl* impl = G_TYPE_INSTANCE_GET_PRIVATE(
+ edge, GANV_TYPE_EDGE, GanvEdgeImpl);
+
edge->impl = impl;
impl->tail = NULL;
diff --git a/src/module.c b/src/module.c
index c4e72b1..21fca0a 100644
--- a/src/module.c
+++ b/src/module.c
@@ -47,7 +47,9 @@ enum {
static void
ganv_module_init(GanvModule* module)
{
- GanvModuleImpl* impl = GANV_MODULE_GET_PRIVATE(module);
+ GanvModuleImpl* impl = G_TYPE_INSTANCE_GET_PRIVATE(
+ module, GANV_TYPE_MODULE, GanvModuleImpl);
+
module->impl = impl;
GANV_NODE(module)->impl->can_head = FALSE;
diff --git a/src/node.c b/src/node.c
index 5dabd2a..7d2c7b9 100644
--- a/src/node.c
+++ b/src/node.c
@@ -55,7 +55,9 @@ on_event(GanvNode* node, GdkEvent* event)
static void
ganv_node_init(GanvNode* node)
{
- GanvNodeImpl* impl = GANV_NODE_GET_PRIVATE(node);
+ GanvNodeImpl* impl = G_TYPE_INSTANCE_GET_PRIVATE(
+ node, GANV_TYPE_NODE, GanvNodeImpl);
+
node->impl = impl;
impl->partner = NULL;
diff --git a/src/port.c b/src/port.c
index dc4aed7..63efd2e 100644
--- a/src/port.c
+++ b/src/port.c
@@ -38,7 +38,9 @@ enum {
static void
ganv_port_init(GanvPort* port)
{
- port->impl = GANV_PORT_GET_PRIVATE(port);
+ port->impl = G_TYPE_INSTANCE_GET_PRIVATE(
+ port, GANV_TYPE_PORT, GanvPortImpl);
+
port->impl->is_input = TRUE;
}
diff --git a/src/text.c b/src/text.c
index b2e956c..0a616d2 100644
--- a/src/text.c
+++ b/src/text.c
@@ -45,7 +45,9 @@ enum {
static void
ganv_text_init(GanvText* text)
{
- GanvTextImpl* impl = GANV_TEXT_GET_PRIVATE(text);
+ GanvTextImpl* impl = G_TYPE_INSTANCE_GET_PRIVATE(
+ text, GANV_TYPE_TEXT, GanvTextImpl);
+
text->impl = impl;
memset(&impl->coords, '\0', sizeof(GanvTextCoords));