diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-04-06 11:09:00 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-04-06 11:09:00 (GMT) |
commit | 944225261e872785366d1df5377f59ea917a2195 (patch) | |
tree | fb6d2c12e22f368808bfb92557d647b1e5688a8a /src/gtkext/graph/node.c | |
parent | e108e192582aa1dbe020dfbc09bee5e6ab2cc534 (diff) |
Done some refactoring in order to make the code more GObject-friendly.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@506 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext/graph/node.c')
-rw-r--r-- | src/gtkext/graph/node.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gtkext/graph/node.c b/src/gtkext/graph/node.c index 439d4e7..4fd7a8e 100644 --- a/src/gtkext/graph/node.c +++ b/src/gtkext/graph/node.c @@ -159,7 +159,7 @@ static void g_graph_node_finalize(GGraphNode *node) unsigned int g_graph_node_get_rank(const GGraphNode *node) { - return node->get_rank(node); + return G_GRAPH_NODE_GET_CLASS(node)->get_rank(node); } @@ -183,8 +183,8 @@ void g_graph_node_reset_position(GGraphNode *node) node->pending_flag = PPF_NONE; - if (node->reset_pos != NULL) - node->reset_pos(node); + if (G_GRAPH_NODE_GET_CLASS(node)->reset_pos != NULL) + G_GRAPH_NODE_GET_CLASS(node)->reset_pos(node); } @@ -204,7 +204,7 @@ void g_graph_node_reset_position(GGraphNode *node) void g_graph_node_prepare_x_line(GGraphNode *node, GGraphNode *nodes) { - node->prepare_x(node, nodes); + G_GRAPH_NODE_GET_CLASS(node)->prepare_x(node, nodes); } @@ -226,8 +226,8 @@ void g_graph_node_apply_position(GGraphNode *node) gint x_pos; /* Position de référence */ GGraphNode *ref; /* Accès rapide */ - if (node->apply_pos != NULL) - node->apply_pos(node); + if (G_GRAPH_NODE_GET_CLASS(node)->apply_pos != NULL) + G_GRAPH_NODE_GET_CLASS(node)->apply_pos(node); switch (node->pending_flag) { @@ -289,8 +289,8 @@ void g_graph_node_apply_position(GGraphNode *node) void g_graph_node_set_x_position(GGraphNode *node, gint x) { - if (node->set_pos != NULL && x != GRAPH_HORIZONTAL_MARGIN) - node->set_pos(node, x); + if (G_GRAPH_NODE_GET_CLASS(node)->set_pos != NULL && x != GRAPH_HORIZONTAL_MARGIN) + G_GRAPH_NODE_GET_CLASS(node)->set_pos(node, x); node->alloc.x = x; @@ -403,7 +403,7 @@ GtkAllocation g_graph_node_get_allocation(const GGraphNode *node) bool g_graph_node_visit_nodes(GGraphNode *node, graph_node_visitor_cb callback, void *data) { - return node->visit(node, callback, data); + return G_GRAPH_NODE_GET_CLASS(node)->visit(node, callback, data); } @@ -427,8 +427,8 @@ GGraphNode *g_graph_node_find_container(GGraphNode *nodes, GGraphNode *target) result = NULL; - if (nodes->contain != NULL) - result = nodes->contain(nodes, target); + if (G_GRAPH_NODE_GET_CLASS(nodes)->contain != NULL) + result = G_GRAPH_NODE_GET_CLASS(nodes)->contain(nodes, target); return result; |