diff options
Diffstat (limited to 'ufo/ufo-graph.c')
-rw-r--r-- | ufo/ufo-graph.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/ufo/ufo-graph.c b/ufo/ufo-graph.c index fe6644d..826f13f 100644 --- a/ufo/ufo-graph.c +++ b/ufo/ufo-graph.c @@ -31,12 +31,6 @@ G_DEFINE_TYPE (UfoGraph, ufo_graph, G_TYPE_OBJECT) #define UFO_GRAPH_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), UFO_TYPE_GRAPH, UfoGraphPrivate)) -typedef struct { - UfoNode *source; - UfoNode *target; - gpointer label; -} UfoEdge; - struct _UfoGraphPrivate { GList *node_types; GList *nodes; @@ -220,6 +214,22 @@ ufo_graph_get_num_edges (UfoGraph *graph) } /** + * ufo_graph_get_edges: + * @graph: A #UfoGraph + * + * Get all edges contained in @graph. + * + * Returns: (element-type UfoEdge): a list of #UfoEdge elements or %NULL on + * error. Release the list with g_list_free(). + */ +GList * +ufo_graph_get_edges (UfoGraph *graph) +{ + g_return_val_if_fail (UFO_IS_GRAPH (graph), NULL); + return g_list_copy (graph->priv->edges); +} + +/** * ufo_graph_get_nodes: * @graph: A #UfoGraph * |