[vala] libgvc: add subgraph functionality and add name attribute for Gvc.Node



commit 8161aba2df9765bf3326df44e6c0d6a9b6565890
Author: Martin Olsson <martin minimum se>
Date:   Sun Jun 20 23:24:05 2010 +0200

    libgvc: add subgraph functionality and add name attribute for Gvc.Node
    
    Fixes bug 622233.

 vapi/libgvc.vapi |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/vapi/libgvc.vapi b/vapi/libgvc.vapi
index 36da041..b5aabc5 100644
--- a/vapi/libgvc.vapi
+++ b/vapi/libgvc.vapi
@@ -96,6 +96,9 @@ namespace Gvc {
 	[Compact]
 	[CCode (cname = "Agnode_t", ref_function = "", unref_function = "", free_function = "")]
 	public class Node {
+		[CCode (cname = "name")]
+		public string name;
+
 		[CCode (cname = "agget")]
 		public unowned string? get ([CCode (type = "char*")] string attribute_name);
 
@@ -137,6 +140,29 @@ namespace Gvc {
 		[CCode (cname = "agedge")]
 		public Edge create_edge (Node from, Node to);
 
+		/** Note: name set to "null" creates an anonymous subgraph. */
+		[CCode (cname = "agsubg")]
+		public unowned Graph create_subgraph ([CCode (type = "char*")] string? name);
+
+		[CCode (cname = "agfindsubg")]
+		public Graph find_subgraph ([CCode (type = "char*")] string name);
+
+		[CCode (cname = "agidsubg")]
+		public Graph create_subgraph_id (ulong id);
+
+		[CCode (cname = "agfstsubg")]
+		public Graph get_first_subgraph ();
+
+		[CCode (cname = "agnxtsubg")]
+		public Graph get_next_subgraph ();
+
+		[CCode (cname = "agparent")]
+		public Graph get_parent_graph ();
+
+		/** Note: agclose() is also allowed for subgraphs and has the same effect as agdelsubg(). */
+		[CCode (cname = "agdelsubg")]
+		public int delete_subgraph (Graph subgraph);
+
 		[CCode (cname = "agfindnode")]
 		public Node? find_node ([CCode (type = "char*")] string node_name);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]