After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 596656 - [PATCH] Vala bindings for graphviz (libgvc)
[PATCH] Vala bindings for graphviz (libgvc)
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings
0.7.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-09-28 19:34 UTC by Martin Olsson
Modified: 2010-02-18 23:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libgvc.vapi (3.06 KB, text/x-vala)
2009-09-28 19:34 UTC, Martin Olsson
  Details
libgvc.vapi (8.00 KB, patch)
2009-10-04 20:28 UTC, Martin Olsson
none Details | Review

Description Martin Olsson 2009-09-28 19:34:47 UTC
Created attachment 144193 [details]
libgvc.vapi

These bindings are not complete (graphviz is pretty big) but they are
sufficient for many of the core use cases such as:

* rendering graphs to PNG or SVG etc
* extracting x,y coordinates (for custom rendering)
* setting attributes on nodes and edges (including graphviz so called "HTML
strings")

You can also do these things without getting GCC compiler warnings etc.

There is a code sample included in the top of the .vapi file for demo / getting
started purposes.
Comment 1 Martin Olsson 2009-10-04 20:28:58 UTC
Created attachment 144738 [details] [review]
libgvc.vapi

Here is a new version that includes the following improvements:

* add VAPI for aginitlib (optional low-level initialization of graphviz)
* change some return values from void to int (so errors can be read)
* add Error namespace for graphviz error handling
* add VAPI for layout_jobs/render_jobs (low-level functions used by valadoc code)
* declare free_function for node/edge/graph and remove explicit free functions
* add VAPI for Graph.read() function (used by valadoc code)

The main reason for doing this improved version is to cover the graphviz sufficiently well to eventually convert Valadoc to this VAPI (they currently have their own VAPI locally in their GIT). I ended up not merging their VAPI into mine because I don't want to add stuff to the VAPI which I havn't tested and they seem to have a lot stuff "translated from C but never tested".
Comment 2 Evan Nemerson 2009-11-01 21:48:11 UTC
I think it might be better to go ahead and include everything so that people will be able to test them. We can just make it clear (on http://live.gnome.org/Vala/BindingsStatus) that the binding is experimental, and fix bugs as they are reported.

Other than that, the only thing I would change is that some of your enum elements include the A prefix--it would be more vala-like to get rid of that and either use a cprefix on the enum or a cname on the member.
Comment 3 Evan Nemerson 2010-02-18 23:19:58 UTC
commit 629178ced95326c2161f61fabea3d231debe7711
Author: Martin Olsson <martin@minimum.se>
Date:   Thu Feb 18 15:14:01 2010 -0800

    Add libgvc (graphviz) bindings.
    
    Fixes bug 596656.