Re: [Goocanvas-devel] goo_canvas_*_new() and Reference Counting
Status: Beta
Brought to you by:
dachaplin
From: Damon C. <da...@ka...> - 2008-04-18 13:49:28
|
On Wed, 2008-04-16 at 14:14 +0200, Rodney Lorrimar wrote: > > > Is it possible to create another set of functions, > > > e.g. goo_canvas_*_new_orphan(), which create items without a parent, > > > and always return a floating reference? These functions would have the > > > GTK+ reference semantics. > > Damon, if you think this might be a somewhat useful addition then I > can prepare a patch. I wouldn't want to add a bunch of functions that just help one language binding (unless it won't work any other way). But if the bindings authors agreed on an API for creating objects that helped all/most of them I'd accept a patch. I think the standard GTK+ thing is to add *_construct() functions to help language bindings. These do most of the stuff currently done in the _new() functions, but without creating the object, e.g. goo_canvas_rect_construct (GooCanvasRect *rect, gdouble x, gdouble y, gdouble width, gdouble height); I don't really know how much that would help though. (Also, should it include a parent argument, or the vararg list for setting properties?) Damon |