Date: Tue, 14 Sep 2004 11:04:55 +0200 (CEST) Message-Id: <20040914.110455.71086831.oandrieu at nerim.net> To: maxence.guesdon at inria.fr Cc: lablgtk at kaba.or.jp Subject: Re: Missing functions in lablgtk2 From: Olivier Andrieu In-Reply-To: <20040914102536.23afe177 at tintin.inria.fr> References: <20040914084737.55f7720b at tintin.inria.fr> <20040914.093107.41631424.oandrieu@nerim.net> <20040914102536.23afe177@tintin.inria.fr> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Maxence Guesdon [Tue, 14 Sep 2004]: > On Tue, 14 Sep 2004 09:31:07 +0200 (CEST) > Olivier Andrieu wrote: > > Maxence Guesdon [Tue, 14 Sep 2004]: > > > could these functions be added in the future ? : > > > - misc_ops#has_focus > > > > hum, you can already do : > > misc_ops#get_flag `HAS_FOCUS > > But it is less convenient, compared to the old #has_focus function. > Well, I imagine a lot of functions would be more convenient and we don't > want to have hundreds of methods when one is enough. I agree. Hmm, GtkWidget has lots of properties and functions and signals, not all of them being wrapped in LablGTK. Maybe we should just wrap them all and be done with it. > > or > > Gobject.get GtkBase.Widget.P.has_focus w#as_widget > > A little too complicated, if there was only this solution, then > the has_focus method would be required ;-) Sure :) I just wanted to point out that even if the high-level object layer lacks something, it is sometimes accessible through the lower-level layer. > > > - GText.buffer#get_iter_insert > > > > would that be the same thing as > > buffer#get_iter `INSERT > > That's what I do, but from the Gtk docs about gtk_text_buffer_get_insert : > < calling gtk_text_buffer_get_mark() to get the mark named "insert", but very > slightly more efficient, and involves less typing.>> Yeah, notice the "very slightly more efficient". Actually, if you look at the GTK+ source code, you'll see there's a FIXME in there: right now this function is exactly doing like #get_iter `INSERT, ie lookup the mark by name. -- Olivier