gnomemm r1584 - in geglmm/trunk: . examples libgegl/src
- From: hub svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1584 - in geglmm/trunk: . examples libgegl/src
- Date: Tue, 24 Jun 2008 04:41:27 +0000 (UTC)
Author: hub
Date: Tue Jun 24 04:41:26 2008
New Revision: 1584
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1584&view=rev
Log:
* configure.in:
* examples/geglbuffer-add-image.cc:
* examples/geglbuffer-clock.cc:
* examples/hello-world.cc:
* libgegl/src/node.hg:
* libgegl/src/node.ccg: Node::link() now return the sink to chain it.
Node::new_child() put a reference on the Node prior return.
Modified:
geglmm/trunk/ChangeLog
geglmm/trunk/NEWS
geglmm/trunk/configure.in
geglmm/trunk/examples/geglbuffer-add-image.cc
geglmm/trunk/examples/geglbuffer-clock.cc
geglmm/trunk/examples/hello-world.cc
geglmm/trunk/libgegl/src/node.ccg
geglmm/trunk/libgegl/src/node.hg
Modified: geglmm/trunk/NEWS
==============================================================================
--- geglmm/trunk/NEWS (original)
+++ geglmm/trunk/NEWS Tue Jun 24 04:41:26 2008
@@ -11,6 +11,8 @@
- BUG: remove spurious ';' in buffer.hg
- BUG: fix some other warnings in node.hg
- BUG: the headers are in libgeglmm/
+ - BUG: Node::new_child() must add a reference.
+ - API: Node::link() now return the sink for chaining.
0.0.16
Modified: geglmm/trunk/configure.in
==============================================================================
--- geglmm/trunk/configure.in (original)
+++ geglmm/trunk/configure.in Tue Jun 24 04:41:26 2008
@@ -33,7 +33,7 @@
# ? :+1 : ? == just some internal changes, nothing breaks but might work
# better
# CURRENT : REVISION : AGE
-LIBGEGLMM_SO_VERSION=0:0:0
+LIBGEGLMM_SO_VERSION=1:0:0
AC_SUBST(LIBGEGLMM_VERSION)
AC_SUBST(LIBGEGLMM_RELEASE)
Modified: geglmm/trunk/examples/geglbuffer-add-image.cc
==============================================================================
--- geglmm/trunk/examples/geglbuffer-add-image.cc (original)
+++ geglmm/trunk/examples/geglbuffer-add-image.cc Tue Jun 24 04:41:26 2008
@@ -44,8 +44,7 @@
load = gegl->new_child ("operation", "load");
load->set ("path", Glib::ustring(in_file));
- load->link(shift);
- load->link(write_buffer);
+ load->link(shift)->link(write_buffer);
write_buffer->process ();
/* free resources used by the graph and the nodes it owns */
Modified: geglmm/trunk/examples/geglbuffer-clock.cc
==============================================================================
--- geglmm/trunk/examples/geglbuffer-clock.cc (original)
+++ geglmm/trunk/examples/geglbuffer-clock.cc Tue Jun 24 04:41:26 2008
@@ -51,12 +51,9 @@
display = gegl->new_child ("operation", "composite-buffer");
display->set ("path", Glib::ustring(argv[1]));
- blank->link(crop);
- blank->link(layer);
- blank->link(shift);
- blank->link(display);
+ blank->link(crop)->link(layer)->link(shift)->link(display);
text->connect_to("output", layer, "aux");
-
+
/* request that the save node is processed, all dependencies will
* be processed as well
*/
Modified: geglmm/trunk/examples/hello-world.cc
==============================================================================
--- geglmm/trunk/examples/hello-world.cc (original)
+++ geglmm/trunk/examples/hello-world.cc Tue Jun 24 04:41:26 2008
@@ -46,10 +46,9 @@
Glib::RefPtr<Gegl::Node> mandelbrot = gegl->new_child ("operation", "fractal-explorer");
mandelbrot->set ("width", 512).set ("height", 384);
- mandelbrot->link (layer);
- mandelbrot->link (display);
+ mandelbrot->link(layer)->link(display);
text->connect_to ("output", layer, "aux");
-
+
/* request that the save node is processed, all dependencies will
* be processed as well
*/
@@ -76,7 +75,7 @@
if (ymin<-3.0)
ymin=-3.0;
-
+
mandelbrot->set ("xmin", xmin).set ("ymin", ymin).set ("xmax", xmax).set ("ymax", ymax);
snprintf (string, sizeof string, "%1.3f,%1.3f %1.3fÃ%1.3f", xmin, ymin, xmax-xmin, ymax-ymin);
text->set ("string", Glib::ustring(string));
Modified: geglmm/trunk/libgegl/src/node.ccg
==============================================================================
--- geglmm/trunk/libgegl/src/node.ccg (original)
+++ geglmm/trunk/libgegl/src/node.ccg Tue Jun 24 04:41:26 2008
@@ -32,6 +32,8 @@
gegl_node_new_child(gobj(),
first_property_name.c_str(),
first_value.c_str(), NULL)));
+ // the node is refcounted owned by the node. Make sure the pointer won't free it too early.
+ node->reference();
return node;
}
@@ -48,6 +50,11 @@
}
+ Glib::RefPtr<Node> Node::link(const Glib::RefPtr<Node> & sink)
+ {
+ gegl_node_link(gobj(), sink->gobj());
+ return sink;
+ }
}
Modified: geglmm/trunk/libgegl/src/node.hg
==============================================================================
--- geglmm/trunk/libgegl/src/node.hg (original)
+++ geglmm/trunk/libgegl/src/node.hg Tue Jun 24 04:41:26 2008
@@ -54,8 +54,9 @@
_WRAP_METHOD(bool connect_from(const Glib::ustring & input_pad_name, const Glib::RefPtr<Node> & source, const Glib::ustring & output_pad_name), gegl_node_connect_from)
_WRAP_METHOD(bool connect_to(const Glib::ustring & output_pad_name, const Glib::RefPtr<Node> & sink, const Glib::ustring & input_pad_name), gegl_node_connect_to)
-//TODO: Return this, and throw an exception, to allow node->link(node2)->link(node3), like in gstreammermm?
- _WRAP_METHOD(void link(const Glib::RefPtr<Node> & sink), gegl_node_link)
+ /** link the object to a sink. Return the %sink. */
+ Glib::RefPtr<Node> link(const Glib::RefPtr<Node> & sink);
+ _IGNORE(gegl_node_link)
_IGNORE(gegl_node_link_many)
// _WRAP_METHOD(void link_many(const Glib::RefPtr<Node> & first_sink, ...) G_GNUC_NULL_TERMINATED, gegl_node_link_many)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]