To: lablgtk at kaba.or.jp Subject: Re: First cut at adding BonoboDock References: <87fz8o8io1.fsf at cs.cmu.edu> <20040622.113127.125104019.garrigue@kurims.kyoto-u.ac.jp> From: Michael Welsh Duggan Date: Wed, 23 Jun 2004 00:44:38 -0400 In-Reply-To: <20040622.113127.125104019.garrigue at kurims.kyoto-u.ac.jp> (Jacques GARRIGUE's message of "Tue, 22 Jun 2004 11:31:27 +0900 (JST)") Message-ID: <87n02u51e1.fsf at cs.cmu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Michael Welsh Duggan Jacques GARRIGUE writes: > From: Michael Welsh Duggan > >> I really wanted docking widgets, so I added BonoboDock, >> BonoboDockItem, and BonoboDockLayout from bonoboui-2.0 to lablgtk. >> This is an initial cut at the code, and I would appreciate any >> constructive criticism. > > This looks good enough to me. > When you think you are ready, we could include it in the distribution. > (lablgtk is still weak with external addons... need an infrastructure > for that) > > Note however that you must be very careful with the GC. > I see at least one error in Val_BonoboDockLayoutItem > > + v = alloc_small(3, 0); > + Field(v, 0) = Val_GtkAny(it->item); > > Your v is not registered as a root, but Val_GtkAny causes an > allocation: the block pointed by v may be moved around. > Better to register all your variables if you're not really sure of > where allocation occurs. > And you must also use the Store_field macro when allocation may occur > in the right hand side: > Store_field(v, 0, Val_GtkAny(it->item)); > > (Actually, your code is probably correct, because Val_GtkAny creates a > custom block, which must go in the old generation, while small blocks > like v go to the small generation. But I'd rather not depend on this > kind of reasonning...) Okay, I have made those changes and a few others. I want to add a couple of properties and signals, and have been looking at propcc and the props files. Could you please explain what the various class qualifiers and attributes mean? -- Michael Welsh Duggan (md5i@cs.cmu.edu)